dex-python-sdk 0.0.2__cp311-abi3-win_amd64.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.
Files changed (121) hide show
  1. dex/__init__.py +146 -0
  2. dex/_grpc_errors.py +73 -0
  3. dex/_invocation_context.py +269 -0
  4. dex/_native.pyd +0 -0
  5. dex/_native.pyi +20 -0
  6. dex/_utils.py +18 -0
  7. dex/_value_hydrator.py +223 -0
  8. dex/_value_mapper.py +174 -0
  9. dex/_worker_dispatcher.py +451 -0
  10. dex/_worker_service.py +60 -0
  11. dex/attribute.py +87 -0
  12. dex/blob_cache.py +73 -0
  13. dex/channel.py +165 -0
  14. dex/client.py +715 -0
  15. dex/client_options.py +19 -0
  16. dex/codec.py +286 -0
  17. dex/command_request.py +120 -0
  18. dex/command_results.py +107 -0
  19. dex/communication.py +136 -0
  20. dex/communication_schema.py +54 -0
  21. dex/condition.py +74 -0
  22. dex/context.py +86 -0
  23. dex/data_attributes.py +70 -0
  24. dex/dexpb/__init__.py +1 -0
  25. dex/dexpb/dex_pb2.py +381 -0
  26. dex/dexpb/dex_pb2.pyi +1734 -0
  27. dex/dexpb/dex_pb2_grpc.py +1298 -0
  28. dex/errors.py +109 -0
  29. dex/flow.py +456 -0
  30. dex/flow_config.py +29 -0
  31. dex/flow_info.py +51 -0
  32. dex/flow_options.py +122 -0
  33. dex/object_encoder.py +799 -0
  34. dex/persistence.py +89 -0
  35. dex/persistence_options.py +12 -0
  36. dex/persistence_schema.py +51 -0
  37. dex/py.typed +1 -0
  38. dex/registry.py +204 -0
  39. dex/reset_workflow_type_and_options.py +67 -0
  40. dex/rpc.py +93 -0
  41. dex/runtime_errors.py +81 -0
  42. dex/search_attributes.py +184 -0
  43. dex/state_decision.py +153 -0
  44. dex/state_execution_locals.py +66 -0
  45. dex/state_movement.py +115 -0
  46. dex/state_schema.py +48 -0
  47. dex/step.py +194 -0
  48. dex/step_execution.py +42 -0
  49. dex/stop_workflow_options.py +18 -0
  50. dex/tests/__init__.py +80 -0
  51. dex/tests/dex-service-env/.env +7 -0
  52. dex/tests/dex-service-env/docker-compose-init.sh +44 -0
  53. dex/tests/dex-service-env/docker-compose.yml +97 -0
  54. dex/tests/dex-service-env/dynamicconfig/README.md +39 -0
  55. dex/tests/dex-service-env/dynamicconfig/development-sql.yaml +9 -0
  56. dex/tests/dex-service-env/dynamicconfig/docker.yaml +2 -0
  57. dex/tests/test_abnormal_exit_workflow.py +43 -0
  58. dex/tests/test_basic_workflow.py +70 -0
  59. dex/tests/test_conditional_complete.py +50 -0
  60. dex/tests/test_describe_workflow.py +40 -0
  61. dex/tests/test_empty_data_decodes_properly.py +74 -0
  62. dex/tests/test_internal_channel.py +28 -0
  63. dex/tests/test_internal_channel_with_no_prefix_channel.py +41 -0
  64. dex/tests/test_persistence_data_attributes.py +62 -0
  65. dex/tests/test_persistence_search_attributes.py +127 -0
  66. dex/tests/test_persistence_state_execution_locals.py +38 -0
  67. dex/tests/test_rpc.py +64 -0
  68. dex/tests/test_rpc_with_memo.py +195 -0
  69. dex/tests/test_rpc_with_memo_duplicate_java_tests.py +117 -0
  70. dex/tests/test_signal.py +51 -0
  71. dex/tests/test_skip_wait_until.py +76 -0
  72. dex/tests/test_state_failure_recovery.py +28 -0
  73. dex/tests/test_timer.py +35 -0
  74. dex/tests/test_wait_for_state_execution_completion.py +53 -0
  75. dex/tests/test_workflow_errors.py +87 -0
  76. dex/tests/test_workflow_state_options.py +118 -0
  77. dex/tests/test_workflow_state_options_override.py +44 -0
  78. dex/tests/worker_server.py +64 -0
  79. dex/tests/workflows/abnormal_exit_workflow.py +42 -0
  80. dex/tests/workflows/basic_workflow.py +62 -0
  81. dex/tests/workflows/conditional_complete_workflow.py +95 -0
  82. dex/tests/workflows/describe_workflow.py +46 -0
  83. dex/tests/workflows/empty_data_workflow.py +45 -0
  84. dex/tests/workflows/internal_channel_workflow.py +129 -0
  85. dex/tests/workflows/internal_channel_workflow_with_no_prefix_channel.py +100 -0
  86. dex/tests/workflows/java_duplicate_rpc_memo_workflow.py +276 -0
  87. dex/tests/workflows/persistence_data_attributes_workflow.py +98 -0
  88. dex/tests/workflows/persistence_search_attributes_workflow.py +159 -0
  89. dex/tests/workflows/persistence_state_execution_local_workflow.py +63 -0
  90. dex/tests/workflows/recovery_workflow.py +82 -0
  91. dex/tests/workflows/rpc_memo_workflow.py +231 -0
  92. dex/tests/workflows/rpc_workflow.py +117 -0
  93. dex/tests/workflows/state_options_override_workflow.py +93 -0
  94. dex/tests/workflows/state_options_workflow.py +84 -0
  95. dex/tests/workflows/timer_workflow.py +46 -0
  96. dex/tests/workflows/wait_for_state_with_state_execution_id_workflow.py +70 -0
  97. dex/tests/workflows/wait_for_state_with_wait_for_key_workflow.py +71 -0
  98. dex/tests/workflows/wait_internal_channel_workflow.py +47 -0
  99. dex/tests/workflows/wait_signal_workflow.py +147 -0
  100. dex/timer.py +21 -0
  101. dex/type_store.py +99 -0
  102. dex/unregistered_client.py +585 -0
  103. dex/utils/__init__.py +3 -0
  104. dex/utils/dex_typing.py +25 -0
  105. dex/utils/persistence_utils.py +32 -0
  106. dex/wait.py +49 -0
  107. dex/worker.py +121 -0
  108. dex/worker_options.py +22 -0
  109. dex/worker_service.py +432 -0
  110. dex/workflow.py +79 -0
  111. dex/workflow_context.py +44 -0
  112. dex/workflow_info.py +16 -0
  113. dex/workflow_options.py +74 -0
  114. dex/workflow_state.py +123 -0
  115. dex/workflow_state_options.py +154 -0
  116. dex_python_sdk-0.0.2.dist-info/METADATA +202 -0
  117. dex_python_sdk-0.0.2.dist-info/RECORD +121 -0
  118. dex_python_sdk-0.0.2.dist-info/WHEEL +4 -0
  119. dex_python_sdk-0.0.2.dist-info/licenses/LEGACY_NOTICES.md +61 -0
  120. dex_python_sdk-0.0.2.dist-info/licenses/LICENSE +192 -0
  121. dex_python_sdk-0.0.2.dist-info/sboms/dex-blob-cache-python.cyclonedx.json +2406 -0
@@ -0,0 +1,1298 @@
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 . import dex_pb2 as dex__pb2
7
+ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
8
+
9
+ GRPC_GENERATED_VERSION = '1.83.0'
10
+ GRPC_VERSION = grpc.__version__
11
+ _version_not_supported = False
12
+
13
+ try:
14
+ from grpc._utilities import first_version_is_lower
15
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16
+ except ImportError:
17
+ _version_not_supported = True
18
+
19
+ if _version_not_supported:
20
+ raise RuntimeError(
21
+ f'The grpc package installed is at version {GRPC_VERSION},'
22
+ + ' but the generated code in dex_pb2_grpc.py depends on'
23
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
24
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26
+ )
27
+
28
+
29
+ class FlowServiceStub:
30
+ """---------------------------------------------------------------------------
31
+ FlowService error handling
32
+
33
+ Failures return a gRPC status with dexpb.ErrorResponse in status details
34
+ (see ErrorResponse / ErrorSubStatus). Clients should read both the gRPC code
35
+ and ErrorResponse.sub_status / detail / original_worker_error_*.
36
+
37
+ Common gRPC codes (all RPCs unless noted):
38
+ InvalidArgument — bad request / invalid Value / empty lock keys, etc.
39
+ sub_status usually UNCATEGORIZED
40
+ AlreadyExists — StartFlow when ID already running
41
+ sub_status FLOW_ALREADY_STARTED
42
+ NotFound — unknown flow/run
43
+ sub_status FLOW_NOT_EXISTS
44
+ FailedPrecondition — closed/invalid flow state; blob-backed WaitForAttribute;
45
+ Dex application WorkerService failures (business errors
46
+ and unreachable/dial/transport to the app worker). These
47
+ must not use Unavailable so they do not count against
48
+ server SLA/SLO. sub_status WORKER_API_ERROR when from
49
+ WorkerService; raw worker code/detail/type in
50
+ original_worker_error_* when available
51
+ Aborted — locking RPC attribute lock contention
52
+ sub_status WORKER_API_ERROR
53
+ ResourceExhausted — worker connection pool / message size limits
54
+ DeadlineExceeded — wait past effective deadline (WaitForFlow,
55
+ WaitForStepCompletion, WaitForAttribute)
56
+ sub_status LONG_POLL_TIME_OUT
57
+ Canceled — caller canceled the RPC context
58
+ Unavailable — Temporal/Cadence backend (workflow engine) unavailable
59
+ only — never Dex application WorkerService
60
+ Internal — unexpected / violated trusted invariant
61
+ Unimplemented — Cadence: WaitForStepCompletion, WaitForAttribute,
62
+ locking InvokeRPC (Temporal sync update required)
63
+
64
+ Notable per-RPC behavior:
65
+ InvokeRPC — empty LockAttributeKeys: API calls WorkerService then may signal;
66
+ WorkerService errors (app or transport-to-worker) → FailedPrecondition +
67
+ WORKER_API_ERROR + OriginalWorker* when present.
68
+ non-empty LockAttributeKeys: Temporal sync update; same worker mapping via
69
+ handleError; Cadence → Unimplemented.
70
+ WaitForStepCompletion / WaitForAttribute — Temporal-only sync updates; API
71
+ retries CONTINUE_AS_NEW_PREEMPTED (not exposed as Internal). Timeout →
72
+ DeadlineExceeded + LONG_POLL_TIME_OUT. WaitForAttribute rejects waiting on
73
+ blob-backed stored attributes with FailedPrecondition.
74
+ WaitForFlow — long-poll timeout while still running → DeadlineExceeded +
75
+ LONG_POLL_TIME_OUT.
76
+ ---------------------------------------------------------------------------
77
+
78
+ Hosted by Dex server; SDKs call these RPCs.
79
+ """
80
+
81
+ def __init__(self, channel):
82
+ """Constructor.
83
+
84
+ Args:
85
+ channel: A grpc.Channel.
86
+ """
87
+ self.StartFlow = channel.unary_unary(
88
+ '/dex.FlowService/StartFlow',
89
+ request_serializer=dex__pb2.StartFlowRequest.SerializeToString,
90
+ response_deserializer=dex__pb2.StartFlowResponse.FromString,
91
+ _registered_method=True)
92
+ self.PublishToChannel = channel.unary_unary(
93
+ '/dex.FlowService/PublishToChannel',
94
+ request_serializer=dex__pb2.PublishToChannelRequest.SerializeToString,
95
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
96
+ _registered_method=True)
97
+ self.StopFlow = channel.unary_unary(
98
+ '/dex.FlowService/StopFlow',
99
+ request_serializer=dex__pb2.StopFlowRequest.SerializeToString,
100
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
101
+ _registered_method=True)
102
+ self.GetAttributes = channel.unary_unary(
103
+ '/dex.FlowService/GetAttributes',
104
+ request_serializer=dex__pb2.GetAttributesRequest.SerializeToString,
105
+ response_deserializer=dex__pb2.GetAttributesResponse.FromString,
106
+ _registered_method=True)
107
+ self.SetAttributes = channel.unary_unary(
108
+ '/dex.FlowService/SetAttributes',
109
+ request_serializer=dex__pb2.SetAttributesRequest.SerializeToString,
110
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
111
+ _registered_method=True)
112
+ self.LoadBlobs = channel.unary_unary(
113
+ '/dex.FlowService/LoadBlobs',
114
+ request_serializer=dex__pb2.LoadBlobsRequest.SerializeToString,
115
+ response_deserializer=dex__pb2.LoadBlobsResponse.FromString,
116
+ _registered_method=True)
117
+ self.WaitForFlow = channel.unary_unary(
118
+ '/dex.FlowService/WaitForFlow',
119
+ request_serializer=dex__pb2.WaitForFlowRequest.SerializeToString,
120
+ response_deserializer=dex__pb2.WaitForFlowResponse.FromString,
121
+ _registered_method=True)
122
+ self.SearchFlows = channel.unary_unary(
123
+ '/dex.FlowService/SearchFlows',
124
+ request_serializer=dex__pb2.SearchFlowsRequest.SerializeToString,
125
+ response_deserializer=dex__pb2.SearchFlowsResponse.FromString,
126
+ _registered_method=True)
127
+ self.GetFlowSummary = channel.unary_unary(
128
+ '/dex.FlowService/GetFlowSummary',
129
+ request_serializer=dex__pb2.GetFlowSummaryRequest.SerializeToString,
130
+ response_deserializer=dex__pb2.GetFlowSummaryResponse.FromString,
131
+ _registered_method=True)
132
+ self.GetHistoryEvents = channel.unary_unary(
133
+ '/dex.FlowService/GetHistoryEvents',
134
+ request_serializer=dex__pb2.GetHistoryEventsRequest.SerializeToString,
135
+ response_deserializer=dex__pb2.GetHistoryEventsResponse.FromString,
136
+ _registered_method=True)
137
+ self.WaitForHistoryEvent = channel.unary_unary(
138
+ '/dex.FlowService/WaitForHistoryEvent',
139
+ request_serializer=dex__pb2.WaitForHistoryEventRequest.SerializeToString,
140
+ response_deserializer=dex__pb2.WaitForHistoryEventResponse.FromString,
141
+ _registered_method=True)
142
+ self.GetFlowState = channel.unary_unary(
143
+ '/dex.FlowService/GetFlowState',
144
+ request_serializer=dex__pb2.GetFlowStateRequest.SerializeToString,
145
+ response_deserializer=dex__pb2.GetFlowStateResponse.FromString,
146
+ _registered_method=True)
147
+ self.ResetFlow = channel.unary_unary(
148
+ '/dex.FlowService/ResetFlow',
149
+ request_serializer=dex__pb2.ResetFlowRequest.SerializeToString,
150
+ response_deserializer=dex__pb2.ResetFlowResponse.FromString,
151
+ _registered_method=True)
152
+ self.InvokeRPC = channel.unary_unary(
153
+ '/dex.FlowService/InvokeRPC',
154
+ request_serializer=dex__pb2.InvokeRPCRequest.SerializeToString,
155
+ response_deserializer=dex__pb2.InvokeRPCResponse.FromString,
156
+ _registered_method=True)
157
+ self.SkipTimer = channel.unary_unary(
158
+ '/dex.FlowService/SkipTimer',
159
+ request_serializer=dex__pb2.SkipTimerRequest.SerializeToString,
160
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
161
+ _registered_method=True)
162
+ self.UpdateFlowConfig = channel.unary_unary(
163
+ '/dex.FlowService/UpdateFlowConfig',
164
+ request_serializer=dex__pb2.UpdateFlowConfigRequest.SerializeToString,
165
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
166
+ _registered_method=True)
167
+ self.WaitForStepCompletion = channel.unary_unary(
168
+ '/dex.FlowService/WaitForStepCompletion',
169
+ request_serializer=dex__pb2.WaitForStepCompletionRequest.SerializeToString,
170
+ response_deserializer=dex__pb2.WaitForStepCompletionResponse.FromString,
171
+ _registered_method=True)
172
+ self.WaitForAttribute = channel.unary_unary(
173
+ '/dex.FlowService/WaitForAttribute',
174
+ request_serializer=dex__pb2.WaitForAttributeRequest.SerializeToString,
175
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
176
+ _registered_method=True)
177
+ self.TriggerContinueAsNew = channel.unary_unary(
178
+ '/dex.FlowService/TriggerContinueAsNew',
179
+ request_serializer=dex__pb2.TriggerContinueAsNewRequest.SerializeToString,
180
+ response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
181
+ _registered_method=True)
182
+ self.HealthCheck = channel.unary_unary(
183
+ '/dex.FlowService/HealthCheck',
184
+ request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
185
+ response_deserializer=dex__pb2.HealthInfo.FromString,
186
+ _registered_method=True)
187
+
188
+
189
+ class FlowServiceServicer:
190
+ """---------------------------------------------------------------------------
191
+ FlowService error handling
192
+
193
+ Failures return a gRPC status with dexpb.ErrorResponse in status details
194
+ (see ErrorResponse / ErrorSubStatus). Clients should read both the gRPC code
195
+ and ErrorResponse.sub_status / detail / original_worker_error_*.
196
+
197
+ Common gRPC codes (all RPCs unless noted):
198
+ InvalidArgument — bad request / invalid Value / empty lock keys, etc.
199
+ sub_status usually UNCATEGORIZED
200
+ AlreadyExists — StartFlow when ID already running
201
+ sub_status FLOW_ALREADY_STARTED
202
+ NotFound — unknown flow/run
203
+ sub_status FLOW_NOT_EXISTS
204
+ FailedPrecondition — closed/invalid flow state; blob-backed WaitForAttribute;
205
+ Dex application WorkerService failures (business errors
206
+ and unreachable/dial/transport to the app worker). These
207
+ must not use Unavailable so they do not count against
208
+ server SLA/SLO. sub_status WORKER_API_ERROR when from
209
+ WorkerService; raw worker code/detail/type in
210
+ original_worker_error_* when available
211
+ Aborted — locking RPC attribute lock contention
212
+ sub_status WORKER_API_ERROR
213
+ ResourceExhausted — worker connection pool / message size limits
214
+ DeadlineExceeded — wait past effective deadline (WaitForFlow,
215
+ WaitForStepCompletion, WaitForAttribute)
216
+ sub_status LONG_POLL_TIME_OUT
217
+ Canceled — caller canceled the RPC context
218
+ Unavailable — Temporal/Cadence backend (workflow engine) unavailable
219
+ only — never Dex application WorkerService
220
+ Internal — unexpected / violated trusted invariant
221
+ Unimplemented — Cadence: WaitForStepCompletion, WaitForAttribute,
222
+ locking InvokeRPC (Temporal sync update required)
223
+
224
+ Notable per-RPC behavior:
225
+ InvokeRPC — empty LockAttributeKeys: API calls WorkerService then may signal;
226
+ WorkerService errors (app or transport-to-worker) → FailedPrecondition +
227
+ WORKER_API_ERROR + OriginalWorker* when present.
228
+ non-empty LockAttributeKeys: Temporal sync update; same worker mapping via
229
+ handleError; Cadence → Unimplemented.
230
+ WaitForStepCompletion / WaitForAttribute — Temporal-only sync updates; API
231
+ retries CONTINUE_AS_NEW_PREEMPTED (not exposed as Internal). Timeout →
232
+ DeadlineExceeded + LONG_POLL_TIME_OUT. WaitForAttribute rejects waiting on
233
+ blob-backed stored attributes with FailedPrecondition.
234
+ WaitForFlow — long-poll timeout while still running → DeadlineExceeded +
235
+ LONG_POLL_TIME_OUT.
236
+ ---------------------------------------------------------------------------
237
+
238
+ Hosted by Dex server; SDKs call these RPCs.
239
+ """
240
+
241
+ def StartFlow(self, request, context):
242
+ """Missing associated documentation comment in .proto file."""
243
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
244
+ context.set_details('Method not implemented!')
245
+ raise NotImplementedError('Method not implemented!')
246
+
247
+ def PublishToChannel(self, request, context):
248
+ """Missing associated documentation comment in .proto file."""
249
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
250
+ context.set_details('Method not implemented!')
251
+ raise NotImplementedError('Method not implemented!')
252
+
253
+ def StopFlow(self, request, context):
254
+ """Missing associated documentation comment in .proto file."""
255
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
256
+ context.set_details('Method not implemented!')
257
+ raise NotImplementedError('Method not implemented!')
258
+
259
+ def GetAttributes(self, request, context):
260
+ """Missing associated documentation comment in .proto file."""
261
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
262
+ context.set_details('Method not implemented!')
263
+ raise NotImplementedError('Method not implemented!')
264
+
265
+ def SetAttributes(self, request, context):
266
+ """Missing associated documentation comment in .proto file."""
267
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
268
+ context.set_details('Method not implemented!')
269
+ raise NotImplementedError('Method not implemented!')
270
+
271
+ def LoadBlobs(self, request, context):
272
+ """Missing associated documentation comment in .proto file."""
273
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
274
+ context.set_details('Method not implemented!')
275
+ raise NotImplementedError('Method not implemented!')
276
+
277
+ def WaitForFlow(self, request, context):
278
+ """Missing associated documentation comment in .proto file."""
279
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
280
+ context.set_details('Method not implemented!')
281
+ raise NotImplementedError('Method not implemented!')
282
+
283
+ def SearchFlows(self, request, context):
284
+ """Missing associated documentation comment in .proto file."""
285
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
286
+ context.set_details('Method not implemented!')
287
+ raise NotImplementedError('Method not implemented!')
288
+
289
+ def GetFlowSummary(self, request, context):
290
+ """Missing associated documentation comment in .proto file."""
291
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
292
+ context.set_details('Method not implemented!')
293
+ raise NotImplementedError('Method not implemented!')
294
+
295
+ def GetHistoryEvents(self, request, context):
296
+ """Missing associated documentation comment in .proto file."""
297
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
298
+ context.set_details('Method not implemented!')
299
+ raise NotImplementedError('Method not implemented!')
300
+
301
+ def WaitForHistoryEvent(self, request, context):
302
+ """Missing associated documentation comment in .proto file."""
303
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
304
+ context.set_details('Method not implemented!')
305
+ raise NotImplementedError('Method not implemented!')
306
+
307
+ def GetFlowState(self, request, context):
308
+ """Missing associated documentation comment in .proto file."""
309
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
310
+ context.set_details('Method not implemented!')
311
+ raise NotImplementedError('Method not implemented!')
312
+
313
+ def ResetFlow(self, request, context):
314
+ """Missing associated documentation comment in .proto file."""
315
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
316
+ context.set_details('Method not implemented!')
317
+ raise NotImplementedError('Method not implemented!')
318
+
319
+ def InvokeRPC(self, request, context):
320
+ """Missing associated documentation comment in .proto file."""
321
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
322
+ context.set_details('Method not implemented!')
323
+ raise NotImplementedError('Method not implemented!')
324
+
325
+ def SkipTimer(self, request, context):
326
+ """Missing associated documentation comment in .proto file."""
327
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
328
+ context.set_details('Method not implemented!')
329
+ raise NotImplementedError('Method not implemented!')
330
+
331
+ def UpdateFlowConfig(self, request, context):
332
+ """Missing associated documentation comment in .proto file."""
333
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
334
+ context.set_details('Method not implemented!')
335
+ raise NotImplementedError('Method not implemented!')
336
+
337
+ def WaitForStepCompletion(self, request, context):
338
+ """Missing associated documentation comment in .proto file."""
339
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
340
+ context.set_details('Method not implemented!')
341
+ raise NotImplementedError('Method not implemented!')
342
+
343
+ def WaitForAttribute(self, request, context):
344
+ """Missing associated documentation comment in .proto file."""
345
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
346
+ context.set_details('Method not implemented!')
347
+ raise NotImplementedError('Method not implemented!')
348
+
349
+ def TriggerContinueAsNew(self, request, context):
350
+ """Missing associated documentation comment in .proto file."""
351
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
352
+ context.set_details('Method not implemented!')
353
+ raise NotImplementedError('Method not implemented!')
354
+
355
+ def HealthCheck(self, request, context):
356
+ """Missing associated documentation comment in .proto file."""
357
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
358
+ context.set_details('Method not implemented!')
359
+ raise NotImplementedError('Method not implemented!')
360
+
361
+
362
+ def add_FlowServiceServicer_to_server(servicer, server):
363
+ rpc_method_handlers = {
364
+ 'StartFlow': grpc.unary_unary_rpc_method_handler(
365
+ servicer.StartFlow,
366
+ request_deserializer=dex__pb2.StartFlowRequest.FromString,
367
+ response_serializer=dex__pb2.StartFlowResponse.SerializeToString,
368
+ ),
369
+ 'PublishToChannel': grpc.unary_unary_rpc_method_handler(
370
+ servicer.PublishToChannel,
371
+ request_deserializer=dex__pb2.PublishToChannelRequest.FromString,
372
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
373
+ ),
374
+ 'StopFlow': grpc.unary_unary_rpc_method_handler(
375
+ servicer.StopFlow,
376
+ request_deserializer=dex__pb2.StopFlowRequest.FromString,
377
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
378
+ ),
379
+ 'GetAttributes': grpc.unary_unary_rpc_method_handler(
380
+ servicer.GetAttributes,
381
+ request_deserializer=dex__pb2.GetAttributesRequest.FromString,
382
+ response_serializer=dex__pb2.GetAttributesResponse.SerializeToString,
383
+ ),
384
+ 'SetAttributes': grpc.unary_unary_rpc_method_handler(
385
+ servicer.SetAttributes,
386
+ request_deserializer=dex__pb2.SetAttributesRequest.FromString,
387
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
388
+ ),
389
+ 'LoadBlobs': grpc.unary_unary_rpc_method_handler(
390
+ servicer.LoadBlobs,
391
+ request_deserializer=dex__pb2.LoadBlobsRequest.FromString,
392
+ response_serializer=dex__pb2.LoadBlobsResponse.SerializeToString,
393
+ ),
394
+ 'WaitForFlow': grpc.unary_unary_rpc_method_handler(
395
+ servicer.WaitForFlow,
396
+ request_deserializer=dex__pb2.WaitForFlowRequest.FromString,
397
+ response_serializer=dex__pb2.WaitForFlowResponse.SerializeToString,
398
+ ),
399
+ 'SearchFlows': grpc.unary_unary_rpc_method_handler(
400
+ servicer.SearchFlows,
401
+ request_deserializer=dex__pb2.SearchFlowsRequest.FromString,
402
+ response_serializer=dex__pb2.SearchFlowsResponse.SerializeToString,
403
+ ),
404
+ 'GetFlowSummary': grpc.unary_unary_rpc_method_handler(
405
+ servicer.GetFlowSummary,
406
+ request_deserializer=dex__pb2.GetFlowSummaryRequest.FromString,
407
+ response_serializer=dex__pb2.GetFlowSummaryResponse.SerializeToString,
408
+ ),
409
+ 'GetHistoryEvents': grpc.unary_unary_rpc_method_handler(
410
+ servicer.GetHistoryEvents,
411
+ request_deserializer=dex__pb2.GetHistoryEventsRequest.FromString,
412
+ response_serializer=dex__pb2.GetHistoryEventsResponse.SerializeToString,
413
+ ),
414
+ 'WaitForHistoryEvent': grpc.unary_unary_rpc_method_handler(
415
+ servicer.WaitForHistoryEvent,
416
+ request_deserializer=dex__pb2.WaitForHistoryEventRequest.FromString,
417
+ response_serializer=dex__pb2.WaitForHistoryEventResponse.SerializeToString,
418
+ ),
419
+ 'GetFlowState': grpc.unary_unary_rpc_method_handler(
420
+ servicer.GetFlowState,
421
+ request_deserializer=dex__pb2.GetFlowStateRequest.FromString,
422
+ response_serializer=dex__pb2.GetFlowStateResponse.SerializeToString,
423
+ ),
424
+ 'ResetFlow': grpc.unary_unary_rpc_method_handler(
425
+ servicer.ResetFlow,
426
+ request_deserializer=dex__pb2.ResetFlowRequest.FromString,
427
+ response_serializer=dex__pb2.ResetFlowResponse.SerializeToString,
428
+ ),
429
+ 'InvokeRPC': grpc.unary_unary_rpc_method_handler(
430
+ servicer.InvokeRPC,
431
+ request_deserializer=dex__pb2.InvokeRPCRequest.FromString,
432
+ response_serializer=dex__pb2.InvokeRPCResponse.SerializeToString,
433
+ ),
434
+ 'SkipTimer': grpc.unary_unary_rpc_method_handler(
435
+ servicer.SkipTimer,
436
+ request_deserializer=dex__pb2.SkipTimerRequest.FromString,
437
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
438
+ ),
439
+ 'UpdateFlowConfig': grpc.unary_unary_rpc_method_handler(
440
+ servicer.UpdateFlowConfig,
441
+ request_deserializer=dex__pb2.UpdateFlowConfigRequest.FromString,
442
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
443
+ ),
444
+ 'WaitForStepCompletion': grpc.unary_unary_rpc_method_handler(
445
+ servicer.WaitForStepCompletion,
446
+ request_deserializer=dex__pb2.WaitForStepCompletionRequest.FromString,
447
+ response_serializer=dex__pb2.WaitForStepCompletionResponse.SerializeToString,
448
+ ),
449
+ 'WaitForAttribute': grpc.unary_unary_rpc_method_handler(
450
+ servicer.WaitForAttribute,
451
+ request_deserializer=dex__pb2.WaitForAttributeRequest.FromString,
452
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
453
+ ),
454
+ 'TriggerContinueAsNew': grpc.unary_unary_rpc_method_handler(
455
+ servicer.TriggerContinueAsNew,
456
+ request_deserializer=dex__pb2.TriggerContinueAsNewRequest.FromString,
457
+ response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
458
+ ),
459
+ 'HealthCheck': grpc.unary_unary_rpc_method_handler(
460
+ servicer.HealthCheck,
461
+ request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
462
+ response_serializer=dex__pb2.HealthInfo.SerializeToString,
463
+ ),
464
+ }
465
+ generic_handler = grpc.method_handlers_generic_handler(
466
+ 'dex.FlowService', rpc_method_handlers)
467
+ server.add_generic_rpc_handlers((generic_handler,))
468
+ server.add_registered_method_handlers('dex.FlowService', rpc_method_handlers)
469
+
470
+
471
+ # This class is part of an EXPERIMENTAL API.
472
+ class FlowService:
473
+ """---------------------------------------------------------------------------
474
+ FlowService error handling
475
+
476
+ Failures return a gRPC status with dexpb.ErrorResponse in status details
477
+ (see ErrorResponse / ErrorSubStatus). Clients should read both the gRPC code
478
+ and ErrorResponse.sub_status / detail / original_worker_error_*.
479
+
480
+ Common gRPC codes (all RPCs unless noted):
481
+ InvalidArgument — bad request / invalid Value / empty lock keys, etc.
482
+ sub_status usually UNCATEGORIZED
483
+ AlreadyExists — StartFlow when ID already running
484
+ sub_status FLOW_ALREADY_STARTED
485
+ NotFound — unknown flow/run
486
+ sub_status FLOW_NOT_EXISTS
487
+ FailedPrecondition — closed/invalid flow state; blob-backed WaitForAttribute;
488
+ Dex application WorkerService failures (business errors
489
+ and unreachable/dial/transport to the app worker). These
490
+ must not use Unavailable so they do not count against
491
+ server SLA/SLO. sub_status WORKER_API_ERROR when from
492
+ WorkerService; raw worker code/detail/type in
493
+ original_worker_error_* when available
494
+ Aborted — locking RPC attribute lock contention
495
+ sub_status WORKER_API_ERROR
496
+ ResourceExhausted — worker connection pool / message size limits
497
+ DeadlineExceeded — wait past effective deadline (WaitForFlow,
498
+ WaitForStepCompletion, WaitForAttribute)
499
+ sub_status LONG_POLL_TIME_OUT
500
+ Canceled — caller canceled the RPC context
501
+ Unavailable — Temporal/Cadence backend (workflow engine) unavailable
502
+ only — never Dex application WorkerService
503
+ Internal — unexpected / violated trusted invariant
504
+ Unimplemented — Cadence: WaitForStepCompletion, WaitForAttribute,
505
+ locking InvokeRPC (Temporal sync update required)
506
+
507
+ Notable per-RPC behavior:
508
+ InvokeRPC — empty LockAttributeKeys: API calls WorkerService then may signal;
509
+ WorkerService errors (app or transport-to-worker) → FailedPrecondition +
510
+ WORKER_API_ERROR + OriginalWorker* when present.
511
+ non-empty LockAttributeKeys: Temporal sync update; same worker mapping via
512
+ handleError; Cadence → Unimplemented.
513
+ WaitForStepCompletion / WaitForAttribute — Temporal-only sync updates; API
514
+ retries CONTINUE_AS_NEW_PREEMPTED (not exposed as Internal). Timeout →
515
+ DeadlineExceeded + LONG_POLL_TIME_OUT. WaitForAttribute rejects waiting on
516
+ blob-backed stored attributes with FailedPrecondition.
517
+ WaitForFlow — long-poll timeout while still running → DeadlineExceeded +
518
+ LONG_POLL_TIME_OUT.
519
+ ---------------------------------------------------------------------------
520
+
521
+ Hosted by Dex server; SDKs call these RPCs.
522
+ """
523
+
524
+ @staticmethod
525
+ def StartFlow(request,
526
+ target,
527
+ options=(),
528
+ channel_credentials=None,
529
+ call_credentials=None,
530
+ insecure=False,
531
+ compression=None,
532
+ wait_for_ready=None,
533
+ timeout=None,
534
+ metadata=None):
535
+ return grpc.experimental.unary_unary(
536
+ request,
537
+ target,
538
+ '/dex.FlowService/StartFlow',
539
+ dex__pb2.StartFlowRequest.SerializeToString,
540
+ dex__pb2.StartFlowResponse.FromString,
541
+ options,
542
+ channel_credentials,
543
+ insecure,
544
+ call_credentials,
545
+ compression,
546
+ wait_for_ready,
547
+ timeout,
548
+ metadata,
549
+ _registered_method=True)
550
+
551
+ @staticmethod
552
+ def PublishToChannel(request,
553
+ target,
554
+ options=(),
555
+ channel_credentials=None,
556
+ call_credentials=None,
557
+ insecure=False,
558
+ compression=None,
559
+ wait_for_ready=None,
560
+ timeout=None,
561
+ metadata=None):
562
+ return grpc.experimental.unary_unary(
563
+ request,
564
+ target,
565
+ '/dex.FlowService/PublishToChannel',
566
+ dex__pb2.PublishToChannelRequest.SerializeToString,
567
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
568
+ options,
569
+ channel_credentials,
570
+ insecure,
571
+ call_credentials,
572
+ compression,
573
+ wait_for_ready,
574
+ timeout,
575
+ metadata,
576
+ _registered_method=True)
577
+
578
+ @staticmethod
579
+ def StopFlow(request,
580
+ target,
581
+ options=(),
582
+ channel_credentials=None,
583
+ call_credentials=None,
584
+ insecure=False,
585
+ compression=None,
586
+ wait_for_ready=None,
587
+ timeout=None,
588
+ metadata=None):
589
+ return grpc.experimental.unary_unary(
590
+ request,
591
+ target,
592
+ '/dex.FlowService/StopFlow',
593
+ dex__pb2.StopFlowRequest.SerializeToString,
594
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
595
+ options,
596
+ channel_credentials,
597
+ insecure,
598
+ call_credentials,
599
+ compression,
600
+ wait_for_ready,
601
+ timeout,
602
+ metadata,
603
+ _registered_method=True)
604
+
605
+ @staticmethod
606
+ def GetAttributes(request,
607
+ target,
608
+ options=(),
609
+ channel_credentials=None,
610
+ call_credentials=None,
611
+ insecure=False,
612
+ compression=None,
613
+ wait_for_ready=None,
614
+ timeout=None,
615
+ metadata=None):
616
+ return grpc.experimental.unary_unary(
617
+ request,
618
+ target,
619
+ '/dex.FlowService/GetAttributes',
620
+ dex__pb2.GetAttributesRequest.SerializeToString,
621
+ dex__pb2.GetAttributesResponse.FromString,
622
+ options,
623
+ channel_credentials,
624
+ insecure,
625
+ call_credentials,
626
+ compression,
627
+ wait_for_ready,
628
+ timeout,
629
+ metadata,
630
+ _registered_method=True)
631
+
632
+ @staticmethod
633
+ def SetAttributes(request,
634
+ target,
635
+ options=(),
636
+ channel_credentials=None,
637
+ call_credentials=None,
638
+ insecure=False,
639
+ compression=None,
640
+ wait_for_ready=None,
641
+ timeout=None,
642
+ metadata=None):
643
+ return grpc.experimental.unary_unary(
644
+ request,
645
+ target,
646
+ '/dex.FlowService/SetAttributes',
647
+ dex__pb2.SetAttributesRequest.SerializeToString,
648
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
649
+ options,
650
+ channel_credentials,
651
+ insecure,
652
+ call_credentials,
653
+ compression,
654
+ wait_for_ready,
655
+ timeout,
656
+ metadata,
657
+ _registered_method=True)
658
+
659
+ @staticmethod
660
+ def LoadBlobs(request,
661
+ target,
662
+ options=(),
663
+ channel_credentials=None,
664
+ call_credentials=None,
665
+ insecure=False,
666
+ compression=None,
667
+ wait_for_ready=None,
668
+ timeout=None,
669
+ metadata=None):
670
+ return grpc.experimental.unary_unary(
671
+ request,
672
+ target,
673
+ '/dex.FlowService/LoadBlobs',
674
+ dex__pb2.LoadBlobsRequest.SerializeToString,
675
+ dex__pb2.LoadBlobsResponse.FromString,
676
+ options,
677
+ channel_credentials,
678
+ insecure,
679
+ call_credentials,
680
+ compression,
681
+ wait_for_ready,
682
+ timeout,
683
+ metadata,
684
+ _registered_method=True)
685
+
686
+ @staticmethod
687
+ def WaitForFlow(request,
688
+ target,
689
+ options=(),
690
+ channel_credentials=None,
691
+ call_credentials=None,
692
+ insecure=False,
693
+ compression=None,
694
+ wait_for_ready=None,
695
+ timeout=None,
696
+ metadata=None):
697
+ return grpc.experimental.unary_unary(
698
+ request,
699
+ target,
700
+ '/dex.FlowService/WaitForFlow',
701
+ dex__pb2.WaitForFlowRequest.SerializeToString,
702
+ dex__pb2.WaitForFlowResponse.FromString,
703
+ options,
704
+ channel_credentials,
705
+ insecure,
706
+ call_credentials,
707
+ compression,
708
+ wait_for_ready,
709
+ timeout,
710
+ metadata,
711
+ _registered_method=True)
712
+
713
+ @staticmethod
714
+ def SearchFlows(request,
715
+ target,
716
+ options=(),
717
+ channel_credentials=None,
718
+ call_credentials=None,
719
+ insecure=False,
720
+ compression=None,
721
+ wait_for_ready=None,
722
+ timeout=None,
723
+ metadata=None):
724
+ return grpc.experimental.unary_unary(
725
+ request,
726
+ target,
727
+ '/dex.FlowService/SearchFlows',
728
+ dex__pb2.SearchFlowsRequest.SerializeToString,
729
+ dex__pb2.SearchFlowsResponse.FromString,
730
+ options,
731
+ channel_credentials,
732
+ insecure,
733
+ call_credentials,
734
+ compression,
735
+ wait_for_ready,
736
+ timeout,
737
+ metadata,
738
+ _registered_method=True)
739
+
740
+ @staticmethod
741
+ def GetFlowSummary(request,
742
+ target,
743
+ options=(),
744
+ channel_credentials=None,
745
+ call_credentials=None,
746
+ insecure=False,
747
+ compression=None,
748
+ wait_for_ready=None,
749
+ timeout=None,
750
+ metadata=None):
751
+ return grpc.experimental.unary_unary(
752
+ request,
753
+ target,
754
+ '/dex.FlowService/GetFlowSummary',
755
+ dex__pb2.GetFlowSummaryRequest.SerializeToString,
756
+ dex__pb2.GetFlowSummaryResponse.FromString,
757
+ options,
758
+ channel_credentials,
759
+ insecure,
760
+ call_credentials,
761
+ compression,
762
+ wait_for_ready,
763
+ timeout,
764
+ metadata,
765
+ _registered_method=True)
766
+
767
+ @staticmethod
768
+ def GetHistoryEvents(request,
769
+ target,
770
+ options=(),
771
+ channel_credentials=None,
772
+ call_credentials=None,
773
+ insecure=False,
774
+ compression=None,
775
+ wait_for_ready=None,
776
+ timeout=None,
777
+ metadata=None):
778
+ return grpc.experimental.unary_unary(
779
+ request,
780
+ target,
781
+ '/dex.FlowService/GetHistoryEvents',
782
+ dex__pb2.GetHistoryEventsRequest.SerializeToString,
783
+ dex__pb2.GetHistoryEventsResponse.FromString,
784
+ options,
785
+ channel_credentials,
786
+ insecure,
787
+ call_credentials,
788
+ compression,
789
+ wait_for_ready,
790
+ timeout,
791
+ metadata,
792
+ _registered_method=True)
793
+
794
+ @staticmethod
795
+ def WaitForHistoryEvent(request,
796
+ target,
797
+ options=(),
798
+ channel_credentials=None,
799
+ call_credentials=None,
800
+ insecure=False,
801
+ compression=None,
802
+ wait_for_ready=None,
803
+ timeout=None,
804
+ metadata=None):
805
+ return grpc.experimental.unary_unary(
806
+ request,
807
+ target,
808
+ '/dex.FlowService/WaitForHistoryEvent',
809
+ dex__pb2.WaitForHistoryEventRequest.SerializeToString,
810
+ dex__pb2.WaitForHistoryEventResponse.FromString,
811
+ options,
812
+ channel_credentials,
813
+ insecure,
814
+ call_credentials,
815
+ compression,
816
+ wait_for_ready,
817
+ timeout,
818
+ metadata,
819
+ _registered_method=True)
820
+
821
+ @staticmethod
822
+ def GetFlowState(request,
823
+ target,
824
+ options=(),
825
+ channel_credentials=None,
826
+ call_credentials=None,
827
+ insecure=False,
828
+ compression=None,
829
+ wait_for_ready=None,
830
+ timeout=None,
831
+ metadata=None):
832
+ return grpc.experimental.unary_unary(
833
+ request,
834
+ target,
835
+ '/dex.FlowService/GetFlowState',
836
+ dex__pb2.GetFlowStateRequest.SerializeToString,
837
+ dex__pb2.GetFlowStateResponse.FromString,
838
+ options,
839
+ channel_credentials,
840
+ insecure,
841
+ call_credentials,
842
+ compression,
843
+ wait_for_ready,
844
+ timeout,
845
+ metadata,
846
+ _registered_method=True)
847
+
848
+ @staticmethod
849
+ def ResetFlow(request,
850
+ target,
851
+ options=(),
852
+ channel_credentials=None,
853
+ call_credentials=None,
854
+ insecure=False,
855
+ compression=None,
856
+ wait_for_ready=None,
857
+ timeout=None,
858
+ metadata=None):
859
+ return grpc.experimental.unary_unary(
860
+ request,
861
+ target,
862
+ '/dex.FlowService/ResetFlow',
863
+ dex__pb2.ResetFlowRequest.SerializeToString,
864
+ dex__pb2.ResetFlowResponse.FromString,
865
+ options,
866
+ channel_credentials,
867
+ insecure,
868
+ call_credentials,
869
+ compression,
870
+ wait_for_ready,
871
+ timeout,
872
+ metadata,
873
+ _registered_method=True)
874
+
875
+ @staticmethod
876
+ def InvokeRPC(request,
877
+ target,
878
+ options=(),
879
+ channel_credentials=None,
880
+ call_credentials=None,
881
+ insecure=False,
882
+ compression=None,
883
+ wait_for_ready=None,
884
+ timeout=None,
885
+ metadata=None):
886
+ return grpc.experimental.unary_unary(
887
+ request,
888
+ target,
889
+ '/dex.FlowService/InvokeRPC',
890
+ dex__pb2.InvokeRPCRequest.SerializeToString,
891
+ dex__pb2.InvokeRPCResponse.FromString,
892
+ options,
893
+ channel_credentials,
894
+ insecure,
895
+ call_credentials,
896
+ compression,
897
+ wait_for_ready,
898
+ timeout,
899
+ metadata,
900
+ _registered_method=True)
901
+
902
+ @staticmethod
903
+ def SkipTimer(request,
904
+ target,
905
+ options=(),
906
+ channel_credentials=None,
907
+ call_credentials=None,
908
+ insecure=False,
909
+ compression=None,
910
+ wait_for_ready=None,
911
+ timeout=None,
912
+ metadata=None):
913
+ return grpc.experimental.unary_unary(
914
+ request,
915
+ target,
916
+ '/dex.FlowService/SkipTimer',
917
+ dex__pb2.SkipTimerRequest.SerializeToString,
918
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
919
+ options,
920
+ channel_credentials,
921
+ insecure,
922
+ call_credentials,
923
+ compression,
924
+ wait_for_ready,
925
+ timeout,
926
+ metadata,
927
+ _registered_method=True)
928
+
929
+ @staticmethod
930
+ def UpdateFlowConfig(request,
931
+ target,
932
+ options=(),
933
+ channel_credentials=None,
934
+ call_credentials=None,
935
+ insecure=False,
936
+ compression=None,
937
+ wait_for_ready=None,
938
+ timeout=None,
939
+ metadata=None):
940
+ return grpc.experimental.unary_unary(
941
+ request,
942
+ target,
943
+ '/dex.FlowService/UpdateFlowConfig',
944
+ dex__pb2.UpdateFlowConfigRequest.SerializeToString,
945
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
946
+ options,
947
+ channel_credentials,
948
+ insecure,
949
+ call_credentials,
950
+ compression,
951
+ wait_for_ready,
952
+ timeout,
953
+ metadata,
954
+ _registered_method=True)
955
+
956
+ @staticmethod
957
+ def WaitForStepCompletion(request,
958
+ target,
959
+ options=(),
960
+ channel_credentials=None,
961
+ call_credentials=None,
962
+ insecure=False,
963
+ compression=None,
964
+ wait_for_ready=None,
965
+ timeout=None,
966
+ metadata=None):
967
+ return grpc.experimental.unary_unary(
968
+ request,
969
+ target,
970
+ '/dex.FlowService/WaitForStepCompletion',
971
+ dex__pb2.WaitForStepCompletionRequest.SerializeToString,
972
+ dex__pb2.WaitForStepCompletionResponse.FromString,
973
+ options,
974
+ channel_credentials,
975
+ insecure,
976
+ call_credentials,
977
+ compression,
978
+ wait_for_ready,
979
+ timeout,
980
+ metadata,
981
+ _registered_method=True)
982
+
983
+ @staticmethod
984
+ def WaitForAttribute(request,
985
+ target,
986
+ options=(),
987
+ channel_credentials=None,
988
+ call_credentials=None,
989
+ insecure=False,
990
+ compression=None,
991
+ wait_for_ready=None,
992
+ timeout=None,
993
+ metadata=None):
994
+ return grpc.experimental.unary_unary(
995
+ request,
996
+ target,
997
+ '/dex.FlowService/WaitForAttribute',
998
+ dex__pb2.WaitForAttributeRequest.SerializeToString,
999
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
1000
+ options,
1001
+ channel_credentials,
1002
+ insecure,
1003
+ call_credentials,
1004
+ compression,
1005
+ wait_for_ready,
1006
+ timeout,
1007
+ metadata,
1008
+ _registered_method=True)
1009
+
1010
+ @staticmethod
1011
+ def TriggerContinueAsNew(request,
1012
+ target,
1013
+ options=(),
1014
+ channel_credentials=None,
1015
+ call_credentials=None,
1016
+ insecure=False,
1017
+ compression=None,
1018
+ wait_for_ready=None,
1019
+ timeout=None,
1020
+ metadata=None):
1021
+ return grpc.experimental.unary_unary(
1022
+ request,
1023
+ target,
1024
+ '/dex.FlowService/TriggerContinueAsNew',
1025
+ dex__pb2.TriggerContinueAsNewRequest.SerializeToString,
1026
+ google_dot_protobuf_dot_empty__pb2.Empty.FromString,
1027
+ options,
1028
+ channel_credentials,
1029
+ insecure,
1030
+ call_credentials,
1031
+ compression,
1032
+ wait_for_ready,
1033
+ timeout,
1034
+ metadata,
1035
+ _registered_method=True)
1036
+
1037
+ @staticmethod
1038
+ def HealthCheck(request,
1039
+ target,
1040
+ options=(),
1041
+ channel_credentials=None,
1042
+ call_credentials=None,
1043
+ insecure=False,
1044
+ compression=None,
1045
+ wait_for_ready=None,
1046
+ timeout=None,
1047
+ metadata=None):
1048
+ return grpc.experimental.unary_unary(
1049
+ request,
1050
+ target,
1051
+ '/dex.FlowService/HealthCheck',
1052
+ google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
1053
+ dex__pb2.HealthInfo.FromString,
1054
+ options,
1055
+ channel_credentials,
1056
+ insecure,
1057
+ call_credentials,
1058
+ compression,
1059
+ wait_for_ready,
1060
+ timeout,
1061
+ metadata,
1062
+ _registered_method=True)
1063
+
1064
+
1065
+ class WorkerServiceStub:
1066
+ """Hosted by Dex worker; server calls these RPCs.
1067
+ """
1068
+
1069
+ def __init__(self, channel):
1070
+ """Constructor.
1071
+
1072
+ Args:
1073
+ channel: A grpc.Channel.
1074
+ """
1075
+ self.InvokeWaitForMethod = channel.unary_unary(
1076
+ '/dex.WorkerService/InvokeWaitForMethod',
1077
+ request_serializer=dex__pb2.InvokeWaitForMethodRequest.SerializeToString,
1078
+ response_deserializer=dex__pb2.InvokeWaitForMethodResponse.FromString,
1079
+ _registered_method=True)
1080
+ self.InvokeExecuteMethod = channel.unary_unary(
1081
+ '/dex.WorkerService/InvokeExecuteMethod',
1082
+ request_serializer=dex__pb2.InvokeExecuteMethodRequest.SerializeToString,
1083
+ response_deserializer=dex__pb2.InvokeExecuteMethodResponse.FromString,
1084
+ _registered_method=True)
1085
+ self.InvokeWorkerRPC = channel.unary_unary(
1086
+ '/dex.WorkerService/InvokeWorkerRPC',
1087
+ request_serializer=dex__pb2.InvokeWorkerRPCRequest.SerializeToString,
1088
+ response_deserializer=dex__pb2.InvokeWorkerRPCResponse.FromString,
1089
+ _registered_method=True)
1090
+
1091
+
1092
+ class WorkerServiceServicer:
1093
+ """Hosted by Dex worker; server calls these RPCs.
1094
+ """
1095
+
1096
+ def InvokeWaitForMethod(self, request, context):
1097
+ """Missing associated documentation comment in .proto file."""
1098
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1099
+ context.set_details('Method not implemented!')
1100
+ raise NotImplementedError('Method not implemented!')
1101
+
1102
+ def InvokeExecuteMethod(self, request, context):
1103
+ """Missing associated documentation comment in .proto file."""
1104
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1105
+ context.set_details('Method not implemented!')
1106
+ raise NotImplementedError('Method not implemented!')
1107
+
1108
+ def InvokeWorkerRPC(self, request, context):
1109
+ """Missing associated documentation comment in .proto file."""
1110
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1111
+ context.set_details('Method not implemented!')
1112
+ raise NotImplementedError('Method not implemented!')
1113
+
1114
+
1115
+ def add_WorkerServiceServicer_to_server(servicer, server):
1116
+ rpc_method_handlers = {
1117
+ 'InvokeWaitForMethod': grpc.unary_unary_rpc_method_handler(
1118
+ servicer.InvokeWaitForMethod,
1119
+ request_deserializer=dex__pb2.InvokeWaitForMethodRequest.FromString,
1120
+ response_serializer=dex__pb2.InvokeWaitForMethodResponse.SerializeToString,
1121
+ ),
1122
+ 'InvokeExecuteMethod': grpc.unary_unary_rpc_method_handler(
1123
+ servicer.InvokeExecuteMethod,
1124
+ request_deserializer=dex__pb2.InvokeExecuteMethodRequest.FromString,
1125
+ response_serializer=dex__pb2.InvokeExecuteMethodResponse.SerializeToString,
1126
+ ),
1127
+ 'InvokeWorkerRPC': grpc.unary_unary_rpc_method_handler(
1128
+ servicer.InvokeWorkerRPC,
1129
+ request_deserializer=dex__pb2.InvokeWorkerRPCRequest.FromString,
1130
+ response_serializer=dex__pb2.InvokeWorkerRPCResponse.SerializeToString,
1131
+ ),
1132
+ }
1133
+ generic_handler = grpc.method_handlers_generic_handler(
1134
+ 'dex.WorkerService', rpc_method_handlers)
1135
+ server.add_generic_rpc_handlers((generic_handler,))
1136
+ server.add_registered_method_handlers('dex.WorkerService', rpc_method_handlers)
1137
+
1138
+
1139
+ # This class is part of an EXPERIMENTAL API.
1140
+ class WorkerService:
1141
+ """Hosted by Dex worker; server calls these RPCs.
1142
+ """
1143
+
1144
+ @staticmethod
1145
+ def InvokeWaitForMethod(request,
1146
+ target,
1147
+ options=(),
1148
+ channel_credentials=None,
1149
+ call_credentials=None,
1150
+ insecure=False,
1151
+ compression=None,
1152
+ wait_for_ready=None,
1153
+ timeout=None,
1154
+ metadata=None):
1155
+ return grpc.experimental.unary_unary(
1156
+ request,
1157
+ target,
1158
+ '/dex.WorkerService/InvokeWaitForMethod',
1159
+ dex__pb2.InvokeWaitForMethodRequest.SerializeToString,
1160
+ dex__pb2.InvokeWaitForMethodResponse.FromString,
1161
+ options,
1162
+ channel_credentials,
1163
+ insecure,
1164
+ call_credentials,
1165
+ compression,
1166
+ wait_for_ready,
1167
+ timeout,
1168
+ metadata,
1169
+ _registered_method=True)
1170
+
1171
+ @staticmethod
1172
+ def InvokeExecuteMethod(request,
1173
+ target,
1174
+ options=(),
1175
+ channel_credentials=None,
1176
+ call_credentials=None,
1177
+ insecure=False,
1178
+ compression=None,
1179
+ wait_for_ready=None,
1180
+ timeout=None,
1181
+ metadata=None):
1182
+ return grpc.experimental.unary_unary(
1183
+ request,
1184
+ target,
1185
+ '/dex.WorkerService/InvokeExecuteMethod',
1186
+ dex__pb2.InvokeExecuteMethodRequest.SerializeToString,
1187
+ dex__pb2.InvokeExecuteMethodResponse.FromString,
1188
+ options,
1189
+ channel_credentials,
1190
+ insecure,
1191
+ call_credentials,
1192
+ compression,
1193
+ wait_for_ready,
1194
+ timeout,
1195
+ metadata,
1196
+ _registered_method=True)
1197
+
1198
+ @staticmethod
1199
+ def InvokeWorkerRPC(request,
1200
+ target,
1201
+ options=(),
1202
+ channel_credentials=None,
1203
+ call_credentials=None,
1204
+ insecure=False,
1205
+ compression=None,
1206
+ wait_for_ready=None,
1207
+ timeout=None,
1208
+ metadata=None):
1209
+ return grpc.experimental.unary_unary(
1210
+ request,
1211
+ target,
1212
+ '/dex.WorkerService/InvokeWorkerRPC',
1213
+ dex__pb2.InvokeWorkerRPCRequest.SerializeToString,
1214
+ dex__pb2.InvokeWorkerRPCResponse.FromString,
1215
+ options,
1216
+ channel_credentials,
1217
+ insecure,
1218
+ call_credentials,
1219
+ compression,
1220
+ wait_for_ready,
1221
+ timeout,
1222
+ metadata,
1223
+ _registered_method=True)
1224
+
1225
+
1226
+ class InternalServiceStub:
1227
+ """Server-internal only (interpreter CAN activity → API). Not SDK-facing.
1228
+ """
1229
+
1230
+ def __init__(self, channel):
1231
+ """Constructor.
1232
+
1233
+ Args:
1234
+ channel: A grpc.Channel.
1235
+ """
1236
+ self.DumpFlowForContinueAsNew = channel.unary_unary(
1237
+ '/dex.InternalService/DumpFlowForContinueAsNew',
1238
+ request_serializer=dex__pb2.ContinueAsNewDumpRequest.SerializeToString,
1239
+ response_deserializer=dex__pb2.ContinueAsNewDumpResponse.FromString,
1240
+ _registered_method=True)
1241
+
1242
+
1243
+ class InternalServiceServicer:
1244
+ """Server-internal only (interpreter CAN activity → API). Not SDK-facing.
1245
+ """
1246
+
1247
+ def DumpFlowForContinueAsNew(self, request, context):
1248
+ """Missing associated documentation comment in .proto file."""
1249
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1250
+ context.set_details('Method not implemented!')
1251
+ raise NotImplementedError('Method not implemented!')
1252
+
1253
+
1254
+ def add_InternalServiceServicer_to_server(servicer, server):
1255
+ rpc_method_handlers = {
1256
+ 'DumpFlowForContinueAsNew': grpc.unary_unary_rpc_method_handler(
1257
+ servicer.DumpFlowForContinueAsNew,
1258
+ request_deserializer=dex__pb2.ContinueAsNewDumpRequest.FromString,
1259
+ response_serializer=dex__pb2.ContinueAsNewDumpResponse.SerializeToString,
1260
+ ),
1261
+ }
1262
+ generic_handler = grpc.method_handlers_generic_handler(
1263
+ 'dex.InternalService', rpc_method_handlers)
1264
+ server.add_generic_rpc_handlers((generic_handler,))
1265
+ server.add_registered_method_handlers('dex.InternalService', rpc_method_handlers)
1266
+
1267
+
1268
+ # This class is part of an EXPERIMENTAL API.
1269
+ class InternalService:
1270
+ """Server-internal only (interpreter CAN activity → API). Not SDK-facing.
1271
+ """
1272
+
1273
+ @staticmethod
1274
+ def DumpFlowForContinueAsNew(request,
1275
+ target,
1276
+ options=(),
1277
+ channel_credentials=None,
1278
+ call_credentials=None,
1279
+ insecure=False,
1280
+ compression=None,
1281
+ wait_for_ready=None,
1282
+ timeout=None,
1283
+ metadata=None):
1284
+ return grpc.experimental.unary_unary(
1285
+ request,
1286
+ target,
1287
+ '/dex.InternalService/DumpFlowForContinueAsNew',
1288
+ dex__pb2.ContinueAsNewDumpRequest.SerializeToString,
1289
+ dex__pb2.ContinueAsNewDumpResponse.FromString,
1290
+ options,
1291
+ channel_credentials,
1292
+ insecure,
1293
+ call_credentials,
1294
+ compression,
1295
+ wait_for_ready,
1296
+ timeout,
1297
+ metadata,
1298
+ _registered_method=True)