orca-python 0.2.0__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.
service_pb2_grpc.py ADDED
@@ -0,0 +1,293 @@
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
+ import service_pb2 as service__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.70.0'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + f' but the generated code in service_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class OrcaCoreStub(object):
29
+ """OrcaCore is the central orchestration service that:
30
+ - Manages the lifecycle of processing windows
31
+ - Coordinates algorithm execution across distributed processors
32
+ - Tracks DAG dependencies and execution state
33
+ - Routes results between dependent algorithms
34
+ """
35
+
36
+ def __init__(self, channel):
37
+ """Constructor.
38
+
39
+ Args:
40
+ channel: A grpc.Channel.
41
+ """
42
+ self.RegisterProcessor = channel.unary_unary(
43
+ '/OrcaCore/RegisterProcessor',
44
+ request_serializer=service__pb2.ProcessorRegistration.SerializeToString,
45
+ response_deserializer=service__pb2.Status.FromString,
46
+ _registered_method=True)
47
+ self.EmitWindow = channel.unary_unary(
48
+ '/OrcaCore/EmitWindow',
49
+ request_serializer=service__pb2.Window.SerializeToString,
50
+ response_deserializer=service__pb2.WindowEmitStatus.FromString,
51
+ _registered_method=True)
52
+
53
+
54
+ class OrcaCoreServicer(object):
55
+ """OrcaCore is the central orchestration service that:
56
+ - Manages the lifecycle of processing windows
57
+ - Coordinates algorithm execution across distributed processors
58
+ - Tracks DAG dependencies and execution state
59
+ - Routes results between dependent algorithms
60
+ """
61
+
62
+ def RegisterProcessor(self, request, context):
63
+ """Register a processor node and its supported algorithms
64
+ """
65
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
66
+ context.set_details('Method not implemented!')
67
+ raise NotImplementedError('Method not implemented!')
68
+
69
+ def EmitWindow(self, request, context):
70
+ """Submit a window for processing
71
+ """
72
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
73
+ context.set_details('Method not implemented!')
74
+ raise NotImplementedError('Method not implemented!')
75
+
76
+
77
+ def add_OrcaCoreServicer_to_server(servicer, server):
78
+ rpc_method_handlers = {
79
+ 'RegisterProcessor': grpc.unary_unary_rpc_method_handler(
80
+ servicer.RegisterProcessor,
81
+ request_deserializer=service__pb2.ProcessorRegistration.FromString,
82
+ response_serializer=service__pb2.Status.SerializeToString,
83
+ ),
84
+ 'EmitWindow': grpc.unary_unary_rpc_method_handler(
85
+ servicer.EmitWindow,
86
+ request_deserializer=service__pb2.Window.FromString,
87
+ response_serializer=service__pb2.WindowEmitStatus.SerializeToString,
88
+ ),
89
+ }
90
+ generic_handler = grpc.method_handlers_generic_handler(
91
+ 'OrcaCore', rpc_method_handlers)
92
+ server.add_generic_rpc_handlers((generic_handler,))
93
+ server.add_registered_method_handlers('OrcaCore', rpc_method_handlers)
94
+
95
+
96
+ # This class is part of an EXPERIMENTAL API.
97
+ class OrcaCore(object):
98
+ """OrcaCore is the central orchestration service that:
99
+ - Manages the lifecycle of processing windows
100
+ - Coordinates algorithm execution across distributed processors
101
+ - Tracks DAG dependencies and execution state
102
+ - Routes results between dependent algorithms
103
+ """
104
+
105
+ @staticmethod
106
+ def RegisterProcessor(request,
107
+ target,
108
+ options=(),
109
+ channel_credentials=None,
110
+ call_credentials=None,
111
+ insecure=False,
112
+ compression=None,
113
+ wait_for_ready=None,
114
+ timeout=None,
115
+ metadata=None):
116
+ return grpc.experimental.unary_unary(
117
+ request,
118
+ target,
119
+ '/OrcaCore/RegisterProcessor',
120
+ service__pb2.ProcessorRegistration.SerializeToString,
121
+ service__pb2.Status.FromString,
122
+ options,
123
+ channel_credentials,
124
+ insecure,
125
+ call_credentials,
126
+ compression,
127
+ wait_for_ready,
128
+ timeout,
129
+ metadata,
130
+ _registered_method=True)
131
+
132
+ @staticmethod
133
+ def EmitWindow(request,
134
+ target,
135
+ options=(),
136
+ channel_credentials=None,
137
+ call_credentials=None,
138
+ insecure=False,
139
+ compression=None,
140
+ wait_for_ready=None,
141
+ timeout=None,
142
+ metadata=None):
143
+ return grpc.experimental.unary_unary(
144
+ request,
145
+ target,
146
+ '/OrcaCore/EmitWindow',
147
+ service__pb2.Window.SerializeToString,
148
+ service__pb2.WindowEmitStatus.FromString,
149
+ options,
150
+ channel_credentials,
151
+ insecure,
152
+ call_credentials,
153
+ compression,
154
+ wait_for_ready,
155
+ timeout,
156
+ metadata,
157
+ _registered_method=True)
158
+
159
+
160
+ class OrcaProcessorStub(object):
161
+ """OrcaProcessor defines the interface that each processing node must implement.
162
+ Processors are language-agnostic services that:
163
+ - Execute individual algorithms
164
+ - Handle their own internal state
165
+ - Report results back to the orchestrator
166
+ Orca will schedule processors asynchronously as per the DAG
167
+ """
168
+
169
+ def __init__(self, channel):
170
+ """Constructor.
171
+
172
+ Args:
173
+ channel: A grpc.Channel.
174
+ """
175
+ self.ExecuteDagPart = channel.unary_stream(
176
+ '/OrcaProcessor/ExecuteDagPart',
177
+ request_serializer=service__pb2.ExecutionRequest.SerializeToString,
178
+ response_deserializer=service__pb2.ExecutionResult.FromString,
179
+ _registered_method=True)
180
+ self.HealthCheck = channel.unary_unary(
181
+ '/OrcaProcessor/HealthCheck',
182
+ request_serializer=service__pb2.HealthCheckRequest.SerializeToString,
183
+ response_deserializer=service__pb2.HealthCheckResponse.FromString,
184
+ _registered_method=True)
185
+
186
+
187
+ class OrcaProcessorServicer(object):
188
+ """OrcaProcessor defines the interface that each processing node must implement.
189
+ Processors are language-agnostic services that:
190
+ - Execute individual algorithms
191
+ - Handle their own internal state
192
+ - Report results back to the orchestrator
193
+ Orca will schedule processors asynchronously as per the DAG
194
+ """
195
+
196
+ def ExecuteDagPart(self, request, context):
197
+ """Execute part of a DAG with streaming results
198
+ Server streams back execution results as they become available
199
+ """
200
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
201
+ context.set_details('Method not implemented!')
202
+ raise NotImplementedError('Method not implemented!')
203
+
204
+ def HealthCheck(self, request, context):
205
+ """Check health/status of processor. i.e. a heartbeat
206
+ """
207
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
208
+ context.set_details('Method not implemented!')
209
+ raise NotImplementedError('Method not implemented!')
210
+
211
+
212
+ def add_OrcaProcessorServicer_to_server(servicer, server):
213
+ rpc_method_handlers = {
214
+ 'ExecuteDagPart': grpc.unary_stream_rpc_method_handler(
215
+ servicer.ExecuteDagPart,
216
+ request_deserializer=service__pb2.ExecutionRequest.FromString,
217
+ response_serializer=service__pb2.ExecutionResult.SerializeToString,
218
+ ),
219
+ 'HealthCheck': grpc.unary_unary_rpc_method_handler(
220
+ servicer.HealthCheck,
221
+ request_deserializer=service__pb2.HealthCheckRequest.FromString,
222
+ response_serializer=service__pb2.HealthCheckResponse.SerializeToString,
223
+ ),
224
+ }
225
+ generic_handler = grpc.method_handlers_generic_handler(
226
+ 'OrcaProcessor', rpc_method_handlers)
227
+ server.add_generic_rpc_handlers((generic_handler,))
228
+ server.add_registered_method_handlers('OrcaProcessor', rpc_method_handlers)
229
+
230
+
231
+ # This class is part of an EXPERIMENTAL API.
232
+ class OrcaProcessor(object):
233
+ """OrcaProcessor defines the interface that each processing node must implement.
234
+ Processors are language-agnostic services that:
235
+ - Execute individual algorithms
236
+ - Handle their own internal state
237
+ - Report results back to the orchestrator
238
+ Orca will schedule processors asynchronously as per the DAG
239
+ """
240
+
241
+ @staticmethod
242
+ def ExecuteDagPart(request,
243
+ target,
244
+ options=(),
245
+ channel_credentials=None,
246
+ call_credentials=None,
247
+ insecure=False,
248
+ compression=None,
249
+ wait_for_ready=None,
250
+ timeout=None,
251
+ metadata=None):
252
+ return grpc.experimental.unary_stream(
253
+ request,
254
+ target,
255
+ '/OrcaProcessor/ExecuteDagPart',
256
+ service__pb2.ExecutionRequest.SerializeToString,
257
+ service__pb2.ExecutionResult.FromString,
258
+ options,
259
+ channel_credentials,
260
+ insecure,
261
+ call_credentials,
262
+ compression,
263
+ wait_for_ready,
264
+ timeout,
265
+ metadata,
266
+ _registered_method=True)
267
+
268
+ @staticmethod
269
+ def HealthCheck(request,
270
+ target,
271
+ options=(),
272
+ channel_credentials=None,
273
+ call_credentials=None,
274
+ insecure=False,
275
+ compression=None,
276
+ wait_for_ready=None,
277
+ timeout=None,
278
+ metadata=None):
279
+ return grpc.experimental.unary_unary(
280
+ request,
281
+ target,
282
+ '/OrcaProcessor/HealthCheck',
283
+ service__pb2.HealthCheckRequest.SerializeToString,
284
+ service__pb2.HealthCheckResponse.FromString,
285
+ options,
286
+ channel_credentials,
287
+ insecure,
288
+ call_credentials,
289
+ compression,
290
+ wait_for_ready,
291
+ timeout,
292
+ metadata,
293
+ _registered_method=True)
vendor/__init__.py ADDED
File without changes