openfeature-provider-flagd 0.1.5__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openfeature/.gitignore +2 -0
- openfeature/contrib/provider/flagd/config.py +214 -23
- openfeature/contrib/provider/flagd/provider.py +88 -12
- openfeature/contrib/provider/flagd/resolvers/__init__.py +1 -47
- openfeature/contrib/provider/flagd/resolvers/grpc.py +229 -17
- openfeature/contrib/provider/flagd/resolvers/in_process.py +40 -31
- openfeature/contrib/provider/flagd/resolvers/process/connector/__init__.py +11 -0
- openfeature/contrib/provider/flagd/resolvers/process/connector/file_watcher.py +107 -0
- openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py +218 -0
- openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py +58 -19
- openfeature/contrib/provider/flagd/resolvers/process/flags.py +50 -6
- openfeature/contrib/provider/flagd/resolvers/process/targeting.py +35 -0
- openfeature/contrib/provider/flagd/resolvers/protocol.py +47 -0
- openfeature/contrib/provider/flagd/sync_metadata_hook.py +14 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.py +72 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.pyi +450 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.py +358 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.pyi +155 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.py +50 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.pyi +148 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.py +186 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.pyi +86 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2.py +72 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2.pyi +451 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.py +358 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.pyi +156 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2.py +47 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2.pyi +174 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.py +143 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.pyi +70 -0
- {openfeature_provider_flagd-0.1.5.dist-info → openfeature_provider_flagd-0.2.1.dist-info}/METADATA +116 -15
- openfeature_provider_flagd-0.2.1.dist-info/RECORD +36 -0
- {openfeature_provider_flagd-0.1.5.dist-info → openfeature_provider_flagd-0.2.1.dist-info}/WHEEL +1 -1
- {openfeature_provider_flagd-0.1.5.dist-info → openfeature_provider_flagd-0.2.1.dist-info}/licenses/LICENSE +1 -1
- openfeature/contrib/provider/flagd/proto/flagd/evaluation/v1/evaluation_pb2.py +0 -62
- openfeature/contrib/provider/flagd/proto/flagd/evaluation/v1/evaluation_pb2_grpc.py +0 -267
- openfeature/contrib/provider/flagd/proto/flagd/sync/v1/sync_pb2.py +0 -40
- openfeature/contrib/provider/flagd/proto/flagd/sync/v1/sync_pb2_grpc.py +0 -135
- openfeature/contrib/provider/flagd/proto/schema/v1/schema_pb2.py +0 -62
- openfeature/contrib/provider/flagd/proto/schema/v1/schema_pb2_grpc.py +0 -267
- openfeature/contrib/provider/flagd/proto/sync/v1/sync_service_pb2.py +0 -37
- openfeature/contrib/provider/flagd/proto/sync/v1/sync_service_pb2_grpc.py +0 -102
- openfeature/contrib/provider/flagd/resolvers/process/file_watcher.py +0 -89
- openfeature_provider_flagd-0.1.5.dist-info/RECORD +0 -22
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from openfeature.schemas.protobuf.schema.v1 import schema_pb2 as openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.70.0'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ f' but the generated code in openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ServiceStub(object):
|
|
29
|
+
"""Service defines the exposed rpcs of flagd
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(self, channel):
|
|
33
|
+
"""Constructor.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
channel: A grpc.Channel.
|
|
37
|
+
"""
|
|
38
|
+
self.ResolveAll = channel.unary_unary(
|
|
39
|
+
'/schema.v1.Service/ResolveAll',
|
|
40
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllRequest.SerializeToString,
|
|
41
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllResponse.FromString,
|
|
42
|
+
_registered_method=True)
|
|
43
|
+
self.ResolveBoolean = channel.unary_unary(
|
|
44
|
+
'/schema.v1.Service/ResolveBoolean',
|
|
45
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanRequest.SerializeToString,
|
|
46
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanResponse.FromString,
|
|
47
|
+
_registered_method=True)
|
|
48
|
+
self.ResolveString = channel.unary_unary(
|
|
49
|
+
'/schema.v1.Service/ResolveString',
|
|
50
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringRequest.SerializeToString,
|
|
51
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringResponse.FromString,
|
|
52
|
+
_registered_method=True)
|
|
53
|
+
self.ResolveFloat = channel.unary_unary(
|
|
54
|
+
'/schema.v1.Service/ResolveFloat',
|
|
55
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatRequest.SerializeToString,
|
|
56
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatResponse.FromString,
|
|
57
|
+
_registered_method=True)
|
|
58
|
+
self.ResolveInt = channel.unary_unary(
|
|
59
|
+
'/schema.v1.Service/ResolveInt',
|
|
60
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntRequest.SerializeToString,
|
|
61
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntResponse.FromString,
|
|
62
|
+
_registered_method=True)
|
|
63
|
+
self.ResolveObject = channel.unary_unary(
|
|
64
|
+
'/schema.v1.Service/ResolveObject',
|
|
65
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectRequest.SerializeToString,
|
|
66
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectResponse.FromString,
|
|
67
|
+
_registered_method=True)
|
|
68
|
+
self.EventStream = channel.unary_stream(
|
|
69
|
+
'/schema.v1.Service/EventStream',
|
|
70
|
+
request_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamRequest.SerializeToString,
|
|
71
|
+
response_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamResponse.FromString,
|
|
72
|
+
_registered_method=True)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class ServiceServicer(object):
|
|
76
|
+
"""Service defines the exposed rpcs of flagd
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
def ResolveAll(self, request, context):
|
|
80
|
+
"""Missing associated documentation comment in .proto file."""
|
|
81
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
82
|
+
context.set_details('Method not implemented!')
|
|
83
|
+
raise NotImplementedError('Method not implemented!')
|
|
84
|
+
|
|
85
|
+
def ResolveBoolean(self, request, context):
|
|
86
|
+
"""Missing associated documentation comment in .proto file."""
|
|
87
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
88
|
+
context.set_details('Method not implemented!')
|
|
89
|
+
raise NotImplementedError('Method not implemented!')
|
|
90
|
+
|
|
91
|
+
def ResolveString(self, request, context):
|
|
92
|
+
"""Missing associated documentation comment in .proto file."""
|
|
93
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
94
|
+
context.set_details('Method not implemented!')
|
|
95
|
+
raise NotImplementedError('Method not implemented!')
|
|
96
|
+
|
|
97
|
+
def ResolveFloat(self, request, context):
|
|
98
|
+
"""Missing associated documentation comment in .proto file."""
|
|
99
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
100
|
+
context.set_details('Method not implemented!')
|
|
101
|
+
raise NotImplementedError('Method not implemented!')
|
|
102
|
+
|
|
103
|
+
def ResolveInt(self, request, context):
|
|
104
|
+
"""Missing associated documentation comment in .proto file."""
|
|
105
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
106
|
+
context.set_details('Method not implemented!')
|
|
107
|
+
raise NotImplementedError('Method not implemented!')
|
|
108
|
+
|
|
109
|
+
def ResolveObject(self, request, context):
|
|
110
|
+
"""Missing associated documentation comment in .proto file."""
|
|
111
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
112
|
+
context.set_details('Method not implemented!')
|
|
113
|
+
raise NotImplementedError('Method not implemented!')
|
|
114
|
+
|
|
115
|
+
def EventStream(self, request, context):
|
|
116
|
+
"""Missing associated documentation comment in .proto file."""
|
|
117
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
118
|
+
context.set_details('Method not implemented!')
|
|
119
|
+
raise NotImplementedError('Method not implemented!')
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def add_ServiceServicer_to_server(servicer, server):
|
|
123
|
+
rpc_method_handlers = {
|
|
124
|
+
'ResolveAll': grpc.unary_unary_rpc_method_handler(
|
|
125
|
+
servicer.ResolveAll,
|
|
126
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllRequest.FromString,
|
|
127
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllResponse.SerializeToString,
|
|
128
|
+
),
|
|
129
|
+
'ResolveBoolean': grpc.unary_unary_rpc_method_handler(
|
|
130
|
+
servicer.ResolveBoolean,
|
|
131
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanRequest.FromString,
|
|
132
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanResponse.SerializeToString,
|
|
133
|
+
),
|
|
134
|
+
'ResolveString': grpc.unary_unary_rpc_method_handler(
|
|
135
|
+
servicer.ResolveString,
|
|
136
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringRequest.FromString,
|
|
137
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringResponse.SerializeToString,
|
|
138
|
+
),
|
|
139
|
+
'ResolveFloat': grpc.unary_unary_rpc_method_handler(
|
|
140
|
+
servicer.ResolveFloat,
|
|
141
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatRequest.FromString,
|
|
142
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatResponse.SerializeToString,
|
|
143
|
+
),
|
|
144
|
+
'ResolveInt': grpc.unary_unary_rpc_method_handler(
|
|
145
|
+
servicer.ResolveInt,
|
|
146
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntRequest.FromString,
|
|
147
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntResponse.SerializeToString,
|
|
148
|
+
),
|
|
149
|
+
'ResolveObject': grpc.unary_unary_rpc_method_handler(
|
|
150
|
+
servicer.ResolveObject,
|
|
151
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectRequest.FromString,
|
|
152
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectResponse.SerializeToString,
|
|
153
|
+
),
|
|
154
|
+
'EventStream': grpc.unary_stream_rpc_method_handler(
|
|
155
|
+
servicer.EventStream,
|
|
156
|
+
request_deserializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamRequest.FromString,
|
|
157
|
+
response_serializer=openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamResponse.SerializeToString,
|
|
158
|
+
),
|
|
159
|
+
}
|
|
160
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
161
|
+
'schema.v1.Service', rpc_method_handlers)
|
|
162
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
163
|
+
server.add_registered_method_handlers('schema.v1.Service', rpc_method_handlers)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
# This class is part of an EXPERIMENTAL API.
|
|
167
|
+
class Service(object):
|
|
168
|
+
"""Service defines the exposed rpcs of flagd
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
@staticmethod
|
|
172
|
+
def ResolveAll(request,
|
|
173
|
+
target,
|
|
174
|
+
options=(),
|
|
175
|
+
channel_credentials=None,
|
|
176
|
+
call_credentials=None,
|
|
177
|
+
insecure=False,
|
|
178
|
+
compression=None,
|
|
179
|
+
wait_for_ready=None,
|
|
180
|
+
timeout=None,
|
|
181
|
+
metadata=None):
|
|
182
|
+
return grpc.experimental.unary_unary(
|
|
183
|
+
request,
|
|
184
|
+
target,
|
|
185
|
+
'/schema.v1.Service/ResolveAll',
|
|
186
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllRequest.SerializeToString,
|
|
187
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveAllResponse.FromString,
|
|
188
|
+
options,
|
|
189
|
+
channel_credentials,
|
|
190
|
+
insecure,
|
|
191
|
+
call_credentials,
|
|
192
|
+
compression,
|
|
193
|
+
wait_for_ready,
|
|
194
|
+
timeout,
|
|
195
|
+
metadata,
|
|
196
|
+
_registered_method=True)
|
|
197
|
+
|
|
198
|
+
@staticmethod
|
|
199
|
+
def ResolveBoolean(request,
|
|
200
|
+
target,
|
|
201
|
+
options=(),
|
|
202
|
+
channel_credentials=None,
|
|
203
|
+
call_credentials=None,
|
|
204
|
+
insecure=False,
|
|
205
|
+
compression=None,
|
|
206
|
+
wait_for_ready=None,
|
|
207
|
+
timeout=None,
|
|
208
|
+
metadata=None):
|
|
209
|
+
return grpc.experimental.unary_unary(
|
|
210
|
+
request,
|
|
211
|
+
target,
|
|
212
|
+
'/schema.v1.Service/ResolveBoolean',
|
|
213
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanRequest.SerializeToString,
|
|
214
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveBooleanResponse.FromString,
|
|
215
|
+
options,
|
|
216
|
+
channel_credentials,
|
|
217
|
+
insecure,
|
|
218
|
+
call_credentials,
|
|
219
|
+
compression,
|
|
220
|
+
wait_for_ready,
|
|
221
|
+
timeout,
|
|
222
|
+
metadata,
|
|
223
|
+
_registered_method=True)
|
|
224
|
+
|
|
225
|
+
@staticmethod
|
|
226
|
+
def ResolveString(request,
|
|
227
|
+
target,
|
|
228
|
+
options=(),
|
|
229
|
+
channel_credentials=None,
|
|
230
|
+
call_credentials=None,
|
|
231
|
+
insecure=False,
|
|
232
|
+
compression=None,
|
|
233
|
+
wait_for_ready=None,
|
|
234
|
+
timeout=None,
|
|
235
|
+
metadata=None):
|
|
236
|
+
return grpc.experimental.unary_unary(
|
|
237
|
+
request,
|
|
238
|
+
target,
|
|
239
|
+
'/schema.v1.Service/ResolveString',
|
|
240
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringRequest.SerializeToString,
|
|
241
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveStringResponse.FromString,
|
|
242
|
+
options,
|
|
243
|
+
channel_credentials,
|
|
244
|
+
insecure,
|
|
245
|
+
call_credentials,
|
|
246
|
+
compression,
|
|
247
|
+
wait_for_ready,
|
|
248
|
+
timeout,
|
|
249
|
+
metadata,
|
|
250
|
+
_registered_method=True)
|
|
251
|
+
|
|
252
|
+
@staticmethod
|
|
253
|
+
def ResolveFloat(request,
|
|
254
|
+
target,
|
|
255
|
+
options=(),
|
|
256
|
+
channel_credentials=None,
|
|
257
|
+
call_credentials=None,
|
|
258
|
+
insecure=False,
|
|
259
|
+
compression=None,
|
|
260
|
+
wait_for_ready=None,
|
|
261
|
+
timeout=None,
|
|
262
|
+
metadata=None):
|
|
263
|
+
return grpc.experimental.unary_unary(
|
|
264
|
+
request,
|
|
265
|
+
target,
|
|
266
|
+
'/schema.v1.Service/ResolveFloat',
|
|
267
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatRequest.SerializeToString,
|
|
268
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveFloatResponse.FromString,
|
|
269
|
+
options,
|
|
270
|
+
channel_credentials,
|
|
271
|
+
insecure,
|
|
272
|
+
call_credentials,
|
|
273
|
+
compression,
|
|
274
|
+
wait_for_ready,
|
|
275
|
+
timeout,
|
|
276
|
+
metadata,
|
|
277
|
+
_registered_method=True)
|
|
278
|
+
|
|
279
|
+
@staticmethod
|
|
280
|
+
def ResolveInt(request,
|
|
281
|
+
target,
|
|
282
|
+
options=(),
|
|
283
|
+
channel_credentials=None,
|
|
284
|
+
call_credentials=None,
|
|
285
|
+
insecure=False,
|
|
286
|
+
compression=None,
|
|
287
|
+
wait_for_ready=None,
|
|
288
|
+
timeout=None,
|
|
289
|
+
metadata=None):
|
|
290
|
+
return grpc.experimental.unary_unary(
|
|
291
|
+
request,
|
|
292
|
+
target,
|
|
293
|
+
'/schema.v1.Service/ResolveInt',
|
|
294
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntRequest.SerializeToString,
|
|
295
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveIntResponse.FromString,
|
|
296
|
+
options,
|
|
297
|
+
channel_credentials,
|
|
298
|
+
insecure,
|
|
299
|
+
call_credentials,
|
|
300
|
+
compression,
|
|
301
|
+
wait_for_ready,
|
|
302
|
+
timeout,
|
|
303
|
+
metadata,
|
|
304
|
+
_registered_method=True)
|
|
305
|
+
|
|
306
|
+
@staticmethod
|
|
307
|
+
def ResolveObject(request,
|
|
308
|
+
target,
|
|
309
|
+
options=(),
|
|
310
|
+
channel_credentials=None,
|
|
311
|
+
call_credentials=None,
|
|
312
|
+
insecure=False,
|
|
313
|
+
compression=None,
|
|
314
|
+
wait_for_ready=None,
|
|
315
|
+
timeout=None,
|
|
316
|
+
metadata=None):
|
|
317
|
+
return grpc.experimental.unary_unary(
|
|
318
|
+
request,
|
|
319
|
+
target,
|
|
320
|
+
'/schema.v1.Service/ResolveObject',
|
|
321
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectRequest.SerializeToString,
|
|
322
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.ResolveObjectResponse.FromString,
|
|
323
|
+
options,
|
|
324
|
+
channel_credentials,
|
|
325
|
+
insecure,
|
|
326
|
+
call_credentials,
|
|
327
|
+
compression,
|
|
328
|
+
wait_for_ready,
|
|
329
|
+
timeout,
|
|
330
|
+
metadata,
|
|
331
|
+
_registered_method=True)
|
|
332
|
+
|
|
333
|
+
@staticmethod
|
|
334
|
+
def EventStream(request,
|
|
335
|
+
target,
|
|
336
|
+
options=(),
|
|
337
|
+
channel_credentials=None,
|
|
338
|
+
call_credentials=None,
|
|
339
|
+
insecure=False,
|
|
340
|
+
compression=None,
|
|
341
|
+
wait_for_ready=None,
|
|
342
|
+
timeout=None,
|
|
343
|
+
metadata=None):
|
|
344
|
+
return grpc.experimental.unary_stream(
|
|
345
|
+
request,
|
|
346
|
+
target,
|
|
347
|
+
'/schema.v1.Service/EventStream',
|
|
348
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamRequest.SerializeToString,
|
|
349
|
+
openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2.EventStreamResponse.FromString,
|
|
350
|
+
options,
|
|
351
|
+
channel_credentials,
|
|
352
|
+
insecure,
|
|
353
|
+
call_credentials,
|
|
354
|
+
compression,
|
|
355
|
+
wait_for_ready,
|
|
356
|
+
timeout,
|
|
357
|
+
metadata,
|
|
358
|
+
_registered_method=True)
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
*
|
|
5
|
+
DEPRECATED; use flagd.evaluation.v1
|
|
6
|
+
Flag evaluation API
|
|
7
|
+
|
|
8
|
+
This proto forms the basis of a flag-evaluation API.
|
|
9
|
+
It supports single and bulk evaluation RPCs, and flags of various types, as well as establishing a stream for getting notifications about changes in a flag definition.
|
|
10
|
+
It supports the inclusion of a "context" with each evaluation, which may contain arbitrary attributes relevant to flag evaluation.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import abc
|
|
14
|
+
import collections.abc
|
|
15
|
+
import grpc
|
|
16
|
+
import grpc.aio
|
|
17
|
+
import openfeature.schemas.protobuf.schema.v1.schema_pb2
|
|
18
|
+
import typing
|
|
19
|
+
|
|
20
|
+
_T = typing.TypeVar("_T")
|
|
21
|
+
|
|
22
|
+
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
|
|
23
|
+
|
|
24
|
+
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
|
|
25
|
+
...
|
|
26
|
+
|
|
27
|
+
class ServiceStub:
|
|
28
|
+
"""Service defines the exposed rpcs of flagd"""
|
|
29
|
+
|
|
30
|
+
def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
|
|
31
|
+
ResolveAll: grpc.UnaryUnaryMultiCallable[
|
|
32
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
|
|
33
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
ResolveBoolean: grpc.UnaryUnaryMultiCallable[
|
|
37
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
|
|
38
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
ResolveString: grpc.UnaryUnaryMultiCallable[
|
|
42
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
|
|
43
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
ResolveFloat: grpc.UnaryUnaryMultiCallable[
|
|
47
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
|
|
48
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
ResolveInt: grpc.UnaryUnaryMultiCallable[
|
|
52
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
|
|
53
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
ResolveObject: grpc.UnaryUnaryMultiCallable[
|
|
57
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
|
|
58
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
EventStream: grpc.UnaryStreamMultiCallable[
|
|
62
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
|
|
63
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
class ServiceAsyncStub:
|
|
67
|
+
"""Service defines the exposed rpcs of flagd"""
|
|
68
|
+
|
|
69
|
+
ResolveAll: grpc.aio.UnaryUnaryMultiCallable[
|
|
70
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
|
|
71
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
ResolveBoolean: grpc.aio.UnaryUnaryMultiCallable[
|
|
75
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
|
|
76
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
ResolveString: grpc.aio.UnaryUnaryMultiCallable[
|
|
80
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
|
|
81
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
ResolveFloat: grpc.aio.UnaryUnaryMultiCallable[
|
|
85
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
|
|
86
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
ResolveInt: grpc.aio.UnaryUnaryMultiCallable[
|
|
90
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
|
|
91
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
ResolveObject: grpc.aio.UnaryUnaryMultiCallable[
|
|
95
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
|
|
96
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
EventStream: grpc.aio.UnaryStreamMultiCallable[
|
|
100
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
|
|
101
|
+
openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
class ServiceServicer(metaclass=abc.ABCMeta):
|
|
105
|
+
"""Service defines the exposed rpcs of flagd"""
|
|
106
|
+
|
|
107
|
+
@abc.abstractmethod
|
|
108
|
+
def ResolveAll(
|
|
109
|
+
self,
|
|
110
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
|
|
111
|
+
context: _ServicerContext,
|
|
112
|
+
) -> typing.Union[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse]]: ...
|
|
113
|
+
|
|
114
|
+
@abc.abstractmethod
|
|
115
|
+
def ResolveBoolean(
|
|
116
|
+
self,
|
|
117
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
|
|
118
|
+
context: _ServicerContext,
|
|
119
|
+
) -> typing.Union[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse]]: ...
|
|
120
|
+
|
|
121
|
+
@abc.abstractmethod
|
|
122
|
+
def ResolveString(
|
|
123
|
+
self,
|
|
124
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
|
|
125
|
+
context: _ServicerContext,
|
|
126
|
+
) -> typing.Union[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse]]: ...
|
|
127
|
+
|
|
128
|
+
@abc.abstractmethod
|
|
129
|
+
def ResolveFloat(
|
|
130
|
+
self,
|
|
131
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
|
|
132
|
+
context: _ServicerContext,
|
|
133
|
+
) -> typing.Union[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse]]: ...
|
|
134
|
+
|
|
135
|
+
@abc.abstractmethod
|
|
136
|
+
def ResolveInt(
|
|
137
|
+
self,
|
|
138
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
|
|
139
|
+
context: _ServicerContext,
|
|
140
|
+
) -> typing.Union[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse]]: ...
|
|
141
|
+
|
|
142
|
+
@abc.abstractmethod
|
|
143
|
+
def ResolveObject(
|
|
144
|
+
self,
|
|
145
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
|
|
146
|
+
context: _ServicerContext,
|
|
147
|
+
) -> typing.Union[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse, collections.abc.Awaitable[openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse]]: ...
|
|
148
|
+
|
|
149
|
+
@abc.abstractmethod
|
|
150
|
+
def EventStream(
|
|
151
|
+
self,
|
|
152
|
+
request: openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
|
|
153
|
+
context: _ServicerContext,
|
|
154
|
+
) -> typing.Union[collections.abc.Iterator[openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse], collections.abc.AsyncIterator[openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse]]: ...
|
|
155
|
+
|
|
156
|
+
def add_ServiceServicer_to_server(servicer: ServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: openfeature/schemas/protobuf/sync/v1/sync_service.proto
|
|
5
|
+
# Protobuf Python Version: 5.29.0
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
29,
|
|
16
|
+
0,
|
|
17
|
+
'',
|
|
18
|
+
'openfeature/schemas/protobuf/sync/v1/sync_service.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7openfeature/schemas/protobuf/sync/v1/sync_service.proto\x12\x07sync.v1\"9\n\x10SyncFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x10\n\x08selector\x18\x02 \x01(\t\"R\n\x11SyncFlagsResponse\x12\x1a\n\x12\x66lag_configuration\x18\x01 \x01(\t\x12!\n\x05state\x18\x02 \x01(\x0e\x32\x12.sync.v1.SyncState\"=\n\x14\x46\x65tchAllFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x10\n\x08selector\x18\x02 \x01(\t\"3\n\x15\x46\x65tchAllFlagsResponse\x12\x1a\n\x12\x66lag_configuration\x18\x01 \x01(\t*\x92\x01\n\tSyncState\x12\x1a\n\x16SYNC_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSYNC_STATE_ALL\x10\x01\x12\x12\n\x0eSYNC_STATE_ADD\x10\x02\x12\x15\n\x11SYNC_STATE_UPDATE\x10\x03\x12\x15\n\x11SYNC_STATE_DELETE\x10\x04\x12\x13\n\x0fSYNC_STATE_PING\x10\x05\x32\xab\x01\n\x0f\x46lagSyncService\x12\x46\n\tSyncFlags\x12\x19.sync.v1.SyncFlagsRequest\x1a\x1a.sync.v1.SyncFlagsResponse\"\x00\x30\x01\x12P\n\rFetchAllFlags\x12\x1d.sync.v1.FetchAllFlagsRequest\x1a\x1e.sync.v1.FetchAllFlagsResponse\"\x00\x42\x97\x01\n\x1a\x64\x65v.openfeature.flagd.syncZ\x0e\x66lagd/grpcsync\xb8\x01\x01\xaa\x02\x16OpenFeature.Flagd.Sync\xca\x02\'OpenFeature\\Providers\\Flagd\\Schema\\Sync\xea\x02\"OpenFeature::FlagD::Provider::Syncb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openfeature.schemas.protobuf.sync.v1.sync_service_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\032dev.openfeature.flagd.syncZ\016flagd/grpcsync\270\001\001\252\002\026OpenFeature.Flagd.Sync\312\002\'OpenFeature\\Providers\\Flagd\\Schema\\Sync\352\002\"OpenFeature::FlagD::Provider::Sync'
|
|
35
|
+
_globals['_SYNCSTATE']._serialized_start=328
|
|
36
|
+
_globals['_SYNCSTATE']._serialized_end=474
|
|
37
|
+
_globals['_SYNCFLAGSREQUEST']._serialized_start=68
|
|
38
|
+
_globals['_SYNCFLAGSREQUEST']._serialized_end=125
|
|
39
|
+
_globals['_SYNCFLAGSRESPONSE']._serialized_start=127
|
|
40
|
+
_globals['_SYNCFLAGSRESPONSE']._serialized_end=209
|
|
41
|
+
_globals['_FETCHALLFLAGSREQUEST']._serialized_start=211
|
|
42
|
+
_globals['_FETCHALLFLAGSREQUEST']._serialized_end=272
|
|
43
|
+
_globals['_FETCHALLFLAGSRESPONSE']._serialized_start=274
|
|
44
|
+
_globals['_FETCHALLFLAGSRESPONSE']._serialized_end=325
|
|
45
|
+
_globals['_FLAGSYNCSERVICE']._serialized_start=477
|
|
46
|
+
_globals['_FLAGSYNCSERVICE']._serialized_end=648
|
|
47
|
+
# @@protoc_insertion_point(module_scope)
|