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