pgfsm-proto-codegen 0.1.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.
- pgfsm/activitygateway/v1/activity_gateway_pb2.py +45 -0
- pgfsm/activitygateway/v1/activity_gateway_pb2.pyi +55 -0
- pgfsm/activitygateway/v1/activity_gateway_pb2_grpc.py +168 -0
- pgfsm/sidecargateway/v1/sidecar_gateway_pb2.py +61 -0
- pgfsm/sidecargateway/v1/sidecar_gateway_pb2.pyi +151 -0
- pgfsm/sidecargateway/v1/sidecar_gateway_pb2_grpc.py +150 -0
- pgfsm_proto_codegen-0.1.0.dist-info/METADATA +33 -0
- pgfsm_proto_codegen-0.1.0.dist-info/RECORD +10 -0
- pgfsm_proto_codegen-0.1.0.dist-info/WHEEL +5 -0
- pgfsm_proto_codegen-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: pgfsm/activitygateway/v1/activity_gateway.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'pgfsm/activitygateway/v1/activity_gateway.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/pgfsm/activitygateway/v1/activity_gateway.proto\x12\x18pgfsm.activitygateway.v1\"\xc1\x03\n\rInvokeRequest\x12&\n\x0fparent_fsm_name\x18\x01 \x01(\tR\rparentFsmName\x12,\n\x12parent_fsm_version\x18\x02 \x01(\tR\x10parentFsmVersion\x12\x30\n\x14\x61sync_operation_type\x18\x03 \x01(\tR\x12\x61syncOperationType\x12\x30\n\x14\x61sync_operation_name\x18\x04 \x01(\tR\x12\x61syncOperationName\x12\x36\n\x17\x61sync_operation_version\x18\x05 \x01(\tR\x15\x61syncOperationVersion\x12\x38\n\x18\x61sync_operation_language\x18\x06 \x01(\tR\x16\x61syncOperationLanguage\x12\x1d\n\ninput_json\x18\x07 \x01(\tR\tinputJson\x12\x1f\n\x0binstance_id\x18\x08 \x01(\tR\ninstanceId\x12%\n\x0e\x63orrelation_id\x18\t \x01(\tR\rcorrelationId\x12\x1d\n\ntimeout_ms\x18\n \x01(\rR\ttimeoutMs\"\xa3\x01\n\x0eInvokeResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\x12\x1f\n\x0boutput_json\x18\x02 \x01(\tR\noutputJson\x12\x1d\n\nerror_code\x18\x03 \x01(\tR\terrorCode\x12#\n\rerror_message\x18\x04 \x01(\tR\x0c\x65rrorMessage\x12\x1c\n\tretriable\x18\x05 \x01(\x08R\tretriable\"\x1d\n\x1bListRegisteredActorsRequest\"=\n\x1cListRegisteredActorsResponse\x12\x1d\n\nactor_keys\x18\x01 \x03(\tR\tactorKeys2\xfd\x01\n\x16\x41\x63tivityGatewayService\x12[\n\x06Invoke\x12\'.pgfsm.activitygateway.v1.InvokeRequest\x1a(.pgfsm.activitygateway.v1.InvokeResponse\x12\x85\x01\n\x14ListRegisteredActors\x12\x35.pgfsm.activitygateway.v1.ListRegisteredActorsRequest\x1a\x36.pgfsm.activitygateway.v1.ListRegisteredActorsResponseB\x81\x02\n\x1c\x63om.pgfsm.activitygateway.v1B\x14\x41\x63tivityGatewayProtoP\x01ZIgithub.com/pgfsm/fsm/packages/fsm-proto-codegen/gen/go/activitygateway/v1\xa2\x02\x03PAX\xaa\x02\x18Pgfsm.Activitygateway.V1\xca\x02\x18Pgfsm\\Activitygateway\\V1\xe2\x02$Pgfsm\\Activitygateway\\V1\\GPBMetadata\xea\x02\x1aPgfsm::Activitygateway::V1b\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pgfsm.activitygateway.v1.activity_gateway_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.pgfsm.activitygateway.v1B\024ActivityGatewayProtoP\001ZIgithub.com/pgfsm/fsm/packages/fsm-proto-codegen/gen/go/activitygateway/v1\242\002\003PAX\252\002\030Pgfsm.Activitygateway.V1\312\002\030Pgfsm\\Activitygateway\\V1\342\002$Pgfsm\\Activitygateway\\V1\\GPBMetadata\352\002\032Pgfsm::Activitygateway::V1'
|
|
35
|
+
_globals['_INVOKEREQUEST']._serialized_start=78
|
|
36
|
+
_globals['_INVOKEREQUEST']._serialized_end=527
|
|
37
|
+
_globals['_INVOKERESPONSE']._serialized_start=530
|
|
38
|
+
_globals['_INVOKERESPONSE']._serialized_end=693
|
|
39
|
+
_globals['_LISTREGISTEREDACTORSREQUEST']._serialized_start=695
|
|
40
|
+
_globals['_LISTREGISTEREDACTORSREQUEST']._serialized_end=724
|
|
41
|
+
_globals['_LISTREGISTEREDACTORSRESPONSE']._serialized_start=726
|
|
42
|
+
_globals['_LISTREGISTEREDACTORSRESPONSE']._serialized_end=787
|
|
43
|
+
_globals['_ACTIVITYGATEWAYSERVICE']._serialized_start=790
|
|
44
|
+
_globals['_ACTIVITYGATEWAYSERVICE']._serialized_end=1043
|
|
45
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from google.protobuf.internal import containers as _containers
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from collections.abc import Iterable as _Iterable
|
|
5
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional
|
|
6
|
+
|
|
7
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
+
|
|
9
|
+
class InvokeRequest(_message.Message):
|
|
10
|
+
__slots__ = ("parent_fsm_name", "parent_fsm_version", "async_operation_type", "async_operation_name", "async_operation_version", "async_operation_language", "input_json", "instance_id", "correlation_id", "timeout_ms")
|
|
11
|
+
PARENT_FSM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
PARENT_FSM_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
ASYNC_OPERATION_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
ASYNC_OPERATION_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
ASYNC_OPERATION_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
ASYNC_OPERATION_LANGUAGE_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
INPUT_JSON_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
CORRELATION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
+
TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int]
|
|
21
|
+
parent_fsm_name: str
|
|
22
|
+
parent_fsm_version: str
|
|
23
|
+
async_operation_type: str
|
|
24
|
+
async_operation_name: str
|
|
25
|
+
async_operation_version: str
|
|
26
|
+
async_operation_language: str
|
|
27
|
+
input_json: str
|
|
28
|
+
instance_id: str
|
|
29
|
+
correlation_id: str
|
|
30
|
+
timeout_ms: int
|
|
31
|
+
def __init__(self, parent_fsm_name: _Optional[str] = ..., parent_fsm_version: _Optional[str] = ..., async_operation_type: _Optional[str] = ..., async_operation_name: _Optional[str] = ..., async_operation_version: _Optional[str] = ..., async_operation_language: _Optional[str] = ..., input_json: _Optional[str] = ..., instance_id: _Optional[str] = ..., correlation_id: _Optional[str] = ..., timeout_ms: _Optional[int] = ...) -> None: ...
|
|
32
|
+
|
|
33
|
+
class InvokeResponse(_message.Message):
|
|
34
|
+
__slots__ = ("ok", "output_json", "error_code", "error_message", "retriable")
|
|
35
|
+
OK_FIELD_NUMBER: _ClassVar[int]
|
|
36
|
+
OUTPUT_JSON_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
ERROR_CODE_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
RETRIABLE_FIELD_NUMBER: _ClassVar[int]
|
|
40
|
+
ok: bool
|
|
41
|
+
output_json: str
|
|
42
|
+
error_code: str
|
|
43
|
+
error_message: str
|
|
44
|
+
retriable: bool
|
|
45
|
+
def __init__(self, ok: _Optional[bool] = ..., output_json: _Optional[str] = ..., error_code: _Optional[str] = ..., error_message: _Optional[str] = ..., retriable: _Optional[bool] = ...) -> None: ...
|
|
46
|
+
|
|
47
|
+
class ListRegisteredActorsRequest(_message.Message):
|
|
48
|
+
__slots__ = ()
|
|
49
|
+
def __init__(self) -> None: ...
|
|
50
|
+
|
|
51
|
+
class ListRegisteredActorsResponse(_message.Message):
|
|
52
|
+
__slots__ = ("actor_keys",)
|
|
53
|
+
ACTOR_KEYS_FIELD_NUMBER: _ClassVar[int]
|
|
54
|
+
actor_keys: _containers.RepeatedScalarFieldContainer[str]
|
|
55
|
+
def __init__(self, actor_keys: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
|
|
5
|
+
from pgfsm.activitygateway.v1 import activity_gateway_pb2 as pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ActivityGatewayServiceStub(object):
|
|
9
|
+
"""Client-facing contract for the Activity Gateway. The orchestrator
|
|
10
|
+
(asyncOperationWorkerlet.ts) is the only intended client — it calls
|
|
11
|
+
Invoke() once per claimed PGMQ message for a compiled-language actor,
|
|
12
|
+
after doing its own poll/claim/archive against Postgres. The gateway
|
|
13
|
+
itself never touches the database.
|
|
14
|
+
|
|
15
|
+
Adapted from the polygot-lang-ipc-worker prototype's proto/ipc.proto:
|
|
16
|
+
the generic {function_name, payload_json} shape is replaced with the
|
|
17
|
+
activity contract from KB-001 §3.2, identifying the actor by its full
|
|
18
|
+
ActorPluginValidationResult identity (parent_fsm_name, parent_fsm_version,
|
|
19
|
+
async_operation_type, async_operation_name, async_operation_version,
|
|
20
|
+
async_operation_language) rather than a bare name/version pair — see
|
|
21
|
+
sidecar_gateway.proto's RegisteredActor. async_operation_language is part
|
|
22
|
+
of the identity (not just metadata) because the other five fields alone
|
|
23
|
+
aren't guaranteed unique across languages.
|
|
24
|
+
|
|
25
|
+
Originally shipped flat as activity-gateway.proto / package
|
|
26
|
+
pgfsm.activitygateway, exempted from several STANDARD buf lint rules as
|
|
27
|
+
an already-consumed contract (see #86/#87). That exemption's rationale
|
|
28
|
+
(gatewayServer.ts/gatewayClient.ts loading it by exact filename via
|
|
29
|
+
@grpc/proto-loader) no longer applies once real Connect-ES codegen
|
|
30
|
+
replaced that runtime reflection — moved to this standard layout in #102,
|
|
31
|
+
the same pass sidecar_gateway.proto (#100) already went through.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, channel):
|
|
35
|
+
"""Constructor.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
channel: A grpc.Channel.
|
|
39
|
+
"""
|
|
40
|
+
self.Invoke = channel.unary_unary(
|
|
41
|
+
'/pgfsm.activitygateway.v1.ActivityGatewayService/Invoke',
|
|
42
|
+
request_serializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.InvokeRequest.SerializeToString,
|
|
43
|
+
response_deserializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.InvokeResponse.FromString,
|
|
44
|
+
)
|
|
45
|
+
self.ListRegisteredActors = channel.unary_unary(
|
|
46
|
+
'/pgfsm.activitygateway.v1.ActivityGatewayService/ListRegisteredActors',
|
|
47
|
+
request_serializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.ListRegisteredActorsRequest.SerializeToString,
|
|
48
|
+
response_deserializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.ListRegisteredActorsResponse.FromString,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class ActivityGatewayServiceServicer(object):
|
|
53
|
+
"""Client-facing contract for the Activity Gateway. The orchestrator
|
|
54
|
+
(asyncOperationWorkerlet.ts) is the only intended client — it calls
|
|
55
|
+
Invoke() once per claimed PGMQ message for a compiled-language actor,
|
|
56
|
+
after doing its own poll/claim/archive against Postgres. The gateway
|
|
57
|
+
itself never touches the database.
|
|
58
|
+
|
|
59
|
+
Adapted from the polygot-lang-ipc-worker prototype's proto/ipc.proto:
|
|
60
|
+
the generic {function_name, payload_json} shape is replaced with the
|
|
61
|
+
activity contract from KB-001 §3.2, identifying the actor by its full
|
|
62
|
+
ActorPluginValidationResult identity (parent_fsm_name, parent_fsm_version,
|
|
63
|
+
async_operation_type, async_operation_name, async_operation_version,
|
|
64
|
+
async_operation_language) rather than a bare name/version pair — see
|
|
65
|
+
sidecar_gateway.proto's RegisteredActor. async_operation_language is part
|
|
66
|
+
of the identity (not just metadata) because the other five fields alone
|
|
67
|
+
aren't guaranteed unique across languages.
|
|
68
|
+
|
|
69
|
+
Originally shipped flat as activity-gateway.proto / package
|
|
70
|
+
pgfsm.activitygateway, exempted from several STANDARD buf lint rules as
|
|
71
|
+
an already-consumed contract (see #86/#87). That exemption's rationale
|
|
72
|
+
(gatewayServer.ts/gatewayClient.ts loading it by exact filename via
|
|
73
|
+
@grpc/proto-loader) no longer applies once real Connect-ES codegen
|
|
74
|
+
replaced that runtime reflection — moved to this standard layout in #102,
|
|
75
|
+
the same pass sidecar_gateway.proto (#100) already went through.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
def Invoke(self, request, context):
|
|
79
|
+
"""Missing associated documentation comment in .proto file."""
|
|
80
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
81
|
+
context.set_details('Method not implemented!')
|
|
82
|
+
raise NotImplementedError('Method not implemented!')
|
|
83
|
+
|
|
84
|
+
def ListRegisteredActors(self, request, context):
|
|
85
|
+
"""Missing associated documentation comment in .proto file."""
|
|
86
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
87
|
+
context.set_details('Method not implemented!')
|
|
88
|
+
raise NotImplementedError('Method not implemented!')
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def add_ActivityGatewayServiceServicer_to_server(servicer, server):
|
|
92
|
+
rpc_method_handlers = {
|
|
93
|
+
'Invoke': grpc.unary_unary_rpc_method_handler(
|
|
94
|
+
servicer.Invoke,
|
|
95
|
+
request_deserializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.InvokeRequest.FromString,
|
|
96
|
+
response_serializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.InvokeResponse.SerializeToString,
|
|
97
|
+
),
|
|
98
|
+
'ListRegisteredActors': grpc.unary_unary_rpc_method_handler(
|
|
99
|
+
servicer.ListRegisteredActors,
|
|
100
|
+
request_deserializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.ListRegisteredActorsRequest.FromString,
|
|
101
|
+
response_serializer=pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.ListRegisteredActorsResponse.SerializeToString,
|
|
102
|
+
),
|
|
103
|
+
}
|
|
104
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
105
|
+
'pgfsm.activitygateway.v1.ActivityGatewayService', rpc_method_handlers)
|
|
106
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
# This class is part of an EXPERIMENTAL API.
|
|
110
|
+
class ActivityGatewayService(object):
|
|
111
|
+
"""Client-facing contract for the Activity Gateway. The orchestrator
|
|
112
|
+
(asyncOperationWorkerlet.ts) is the only intended client — it calls
|
|
113
|
+
Invoke() once per claimed PGMQ message for a compiled-language actor,
|
|
114
|
+
after doing its own poll/claim/archive against Postgres. The gateway
|
|
115
|
+
itself never touches the database.
|
|
116
|
+
|
|
117
|
+
Adapted from the polygot-lang-ipc-worker prototype's proto/ipc.proto:
|
|
118
|
+
the generic {function_name, payload_json} shape is replaced with the
|
|
119
|
+
activity contract from KB-001 §3.2, identifying the actor by its full
|
|
120
|
+
ActorPluginValidationResult identity (parent_fsm_name, parent_fsm_version,
|
|
121
|
+
async_operation_type, async_operation_name, async_operation_version,
|
|
122
|
+
async_operation_language) rather than a bare name/version pair — see
|
|
123
|
+
sidecar_gateway.proto's RegisteredActor. async_operation_language is part
|
|
124
|
+
of the identity (not just metadata) because the other five fields alone
|
|
125
|
+
aren't guaranteed unique across languages.
|
|
126
|
+
|
|
127
|
+
Originally shipped flat as activity-gateway.proto / package
|
|
128
|
+
pgfsm.activitygateway, exempted from several STANDARD buf lint rules as
|
|
129
|
+
an already-consumed contract (see #86/#87). That exemption's rationale
|
|
130
|
+
(gatewayServer.ts/gatewayClient.ts loading it by exact filename via
|
|
131
|
+
@grpc/proto-loader) no longer applies once real Connect-ES codegen
|
|
132
|
+
replaced that runtime reflection — moved to this standard layout in #102,
|
|
133
|
+
the same pass sidecar_gateway.proto (#100) already went through.
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
@staticmethod
|
|
137
|
+
def Invoke(request,
|
|
138
|
+
target,
|
|
139
|
+
options=(),
|
|
140
|
+
channel_credentials=None,
|
|
141
|
+
call_credentials=None,
|
|
142
|
+
insecure=False,
|
|
143
|
+
compression=None,
|
|
144
|
+
wait_for_ready=None,
|
|
145
|
+
timeout=None,
|
|
146
|
+
metadata=None):
|
|
147
|
+
return grpc.experimental.unary_unary(request, target, '/pgfsm.activitygateway.v1.ActivityGatewayService/Invoke',
|
|
148
|
+
pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.InvokeRequest.SerializeToString,
|
|
149
|
+
pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.InvokeResponse.FromString,
|
|
150
|
+
options, channel_credentials,
|
|
151
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
152
|
+
|
|
153
|
+
@staticmethod
|
|
154
|
+
def ListRegisteredActors(request,
|
|
155
|
+
target,
|
|
156
|
+
options=(),
|
|
157
|
+
channel_credentials=None,
|
|
158
|
+
call_credentials=None,
|
|
159
|
+
insecure=False,
|
|
160
|
+
compression=None,
|
|
161
|
+
wait_for_ready=None,
|
|
162
|
+
timeout=None,
|
|
163
|
+
metadata=None):
|
|
164
|
+
return grpc.experimental.unary_unary(request, target, '/pgfsm.activitygateway.v1.ActivityGatewayService/ListRegisteredActors',
|
|
165
|
+
pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.ListRegisteredActorsRequest.SerializeToString,
|
|
166
|
+
pgfsm_dot_activitygateway_dot_v1_dot_activity__gateway__pb2.ListRegisteredActorsResponse.FromString,
|
|
167
|
+
options, channel_credentials,
|
|
168
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: pgfsm/sidecargateway/v1/sidecar_gateway.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'pgfsm/sidecargateway/v1/sidecar_gateway.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-pgfsm/sidecargateway/v1/sidecar_gateway.proto\x12\x17pgfsm.sidecargateway.v1\"\xfe\x02\n\x0fRegisteredActor\x12&\n\x0fparent_fsm_name\x18\x01 \x01(\tR\rparentFsmName\x12,\n\x12parent_fsm_version\x18\x02 \x01(\tR\x10parentFsmVersion\x12\x30\n\x14\x61sync_operation_type\x18\x03 \x01(\tR\x12\x61syncOperationType\x12\x30\n\x14\x61sync_operation_name\x18\x04 \x01(\tR\x12\x61syncOperationName\x12\x36\n\x17\x61sync_operation_version\x18\x05 \x01(\tR\x15\x61syncOperationVersion\x12\x38\n\x18\x61sync_operation_language\x18\x06 \x01(\tR\x16\x61syncOperationLanguage\x12\x1d\n\ntimeout_ms\x18\x07 \x01(\rR\ttimeoutMs\x12 \n\x0b\x64\x65scription\x18\x08 \x01(\tR\x0b\x64\x65scription\"\xb0\x01\n\x08Register\x12\x1b\n\tworker_id\x18\x01 \x01(\tR\x08workerId\x12\x1a\n\x08language\x18\x02 \x01(\tR\x08language\x12)\n\x10protocol_version\x18\x03 \x01(\tR\x0fprotocolVersion\x12@\n\x06\x61\x63tors\x18\x04 \x03(\x0b\x32(.pgfsm.sidecargateway.v1.RegisteredActorR\x06\x61\x63tors\"\xb9\x01\n\x0bRegisterAck\x12\x1a\n\x08\x61\x63\x63\x65pted\x18\x01 \x01(\x08R\x08\x61\x63\x63\x65pted\x12\x38\n\x18gateway_protocol_version\x18\x02 \x01(\tR\x16gatewayProtocolVersion\x12+\n\x11registered_actors\x18\x03 \x03(\tR\x10registeredActors\x12\'\n\x0frejected_actors\x18\x04 \x03(\tR\x0erejectedActors\"(\n\tHeartbeat\x12\x1b\n\tworker_id\x18\x01 \x01(\tR\x08workerId\"\x81\x04\n\x06Invoke\x12\x1b\n\tinvoke_id\x18\x01 \x01(\tR\x08invokeId\x12&\n\x0fparent_fsm_name\x18\x02 \x01(\tR\rparentFsmName\x12,\n\x12parent_fsm_version\x18\x03 \x01(\tR\x10parentFsmVersion\x12\x30\n\x14\x61sync_operation_type\x18\x04 \x01(\tR\x12\x61syncOperationType\x12\x30\n\x14\x61sync_operation_name\x18\x05 \x01(\tR\x12\x61syncOperationName\x12\x36\n\x17\x61sync_operation_version\x18\x06 \x01(\tR\x15\x61syncOperationVersion\x12\x38\n\x18\x61sync_operation_language\x18\x07 \x01(\tR\x16\x61syncOperationLanguage\x12\x1d\n\ninput_json\x18\x08 \x01(\tR\tinputJson\x12\x1f\n\x0binstance_id\x18\t \x01(\tR\ninstanceId\x12%\n\x0e\x63orrelation_id\x18\n \x01(\tR\rcorrelationId\x12\x1d\n\ntimeout_ms\x18\x0b \x01(\rR\ttimeoutMs\x12(\n\x10\x64\x65\x61\x64line_unix_ms\x18\x0c \x01(\x03R\x0e\x64\x65\x61\x64lineUnixMs\"m\n\x0cInvokeResult\x12\x1b\n\tinvoke_id\x18\x01 \x01(\tR\x08invokeId\x12\x1f\n\x0boutput_json\x18\x02 \x01(\tR\noutputJson\x12\x1f\n\x0b\x64uration_ms\x18\x03 \x01(\rR\ndurationMs\"_\n\x11InvokeErrorDetail\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x1c\n\tretriable\x18\x03 \x01(\x08R\tretriable\"\x8d\x01\n\x0bInvokeError\x12\x1b\n\tinvoke_id\x18\x01 \x01(\tR\x08invokeId\x12@\n\x05\x65rror\x18\x02 \x01(\x0b\x32*.pgfsm.sidecargateway.v1.InvokeErrorDetailR\x05\x65rror\x12\x1f\n\x0b\x64uration_ms\x18\x03 \x01(\rR\ndurationMs\"%\n\x06\x43\x61ncel\x12\x1b\n\tinvoke_id\x18\x01 \x01(\tR\x08invokeId\")\n\nUnregister\x12\x1b\n\tworker_id\x18\x01 \x01(\tR\x08workerId\"\x80\x03\n\x0eSessionRequest\x12?\n\x08register\x18\x01 \x01(\x0b\x32!.pgfsm.sidecargateway.v1.RegisterH\x00R\x08register\x12\x42\n\theartbeat\x18\x02 \x01(\x0b\x32\".pgfsm.sidecargateway.v1.HeartbeatH\x00R\theartbeat\x12L\n\rinvoke_result\x18\x03 \x01(\x0b\x32%.pgfsm.sidecargateway.v1.InvokeResultH\x00R\x0cinvokeResult\x12I\n\x0cinvoke_error\x18\x04 \x01(\x0b\x32$.pgfsm.sidecargateway.v1.InvokeErrorH\x00R\x0binvokeError\x12\x45\n\nunregister\x18\x05 \x01(\x0b\x32#.pgfsm.sidecargateway.v1.UnregisterH\x00R\nunregisterB\t\n\x07payload\"\xdd\x01\n\x0fSessionResponse\x12I\n\x0cregister_ack\x18\x01 \x01(\x0b\x32$.pgfsm.sidecargateway.v1.RegisterAckH\x00R\x0bregisterAck\x12\x39\n\x06invoke\x18\x02 \x01(\x0b\x32\x1f.pgfsm.sidecargateway.v1.InvokeH\x00R\x06invoke\x12\x39\n\x06\x63\x61ncel\x18\x03 \x01(\x0b\x32\x1f.pgfsm.sidecargateway.v1.CancelH\x00R\x06\x63\x61ncelB\t\n\x07payload2y\n\x15SidecarGatewayService\x12`\n\x07Session\x12\'.pgfsm.sidecargateway.v1.SessionRequest\x1a(.pgfsm.sidecargateway.v1.SessionResponse(\x01\x30\x01\x42\xfa\x01\n\x1b\x63om.pgfsm.sidecargateway.v1B\x13SidecarGatewayProtoP\x01ZHgithub.com/pgfsm/fsm/packages/fsm-proto-codegen/gen/go/sidecargateway/v1\xa2\x02\x03PSX\xaa\x02\x17Pgfsm.Sidecargateway.V1\xca\x02\x17Pgfsm\\Sidecargateway\\V1\xe2\x02#Pgfsm\\Sidecargateway\\V1\\GPBMetadata\xea\x02\x19Pgfsm::Sidecargateway::V1b\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pgfsm.sidecargateway.v1.sidecar_gateway_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.pgfsm.sidecargateway.v1B\023SidecarGatewayProtoP\001ZHgithub.com/pgfsm/fsm/packages/fsm-proto-codegen/gen/go/sidecargateway/v1\242\002\003PSX\252\002\027Pgfsm.Sidecargateway.V1\312\002\027Pgfsm\\Sidecargateway\\V1\342\002#Pgfsm\\Sidecargateway\\V1\\GPBMetadata\352\002\031Pgfsm::Sidecargateway::V1'
|
|
35
|
+
_globals['_REGISTEREDACTOR']._serialized_start=75
|
|
36
|
+
_globals['_REGISTEREDACTOR']._serialized_end=457
|
|
37
|
+
_globals['_REGISTER']._serialized_start=460
|
|
38
|
+
_globals['_REGISTER']._serialized_end=636
|
|
39
|
+
_globals['_REGISTERACK']._serialized_start=639
|
|
40
|
+
_globals['_REGISTERACK']._serialized_end=824
|
|
41
|
+
_globals['_HEARTBEAT']._serialized_start=826
|
|
42
|
+
_globals['_HEARTBEAT']._serialized_end=866
|
|
43
|
+
_globals['_INVOKE']._serialized_start=869
|
|
44
|
+
_globals['_INVOKE']._serialized_end=1382
|
|
45
|
+
_globals['_INVOKERESULT']._serialized_start=1384
|
|
46
|
+
_globals['_INVOKERESULT']._serialized_end=1493
|
|
47
|
+
_globals['_INVOKEERRORDETAIL']._serialized_start=1495
|
|
48
|
+
_globals['_INVOKEERRORDETAIL']._serialized_end=1590
|
|
49
|
+
_globals['_INVOKEERROR']._serialized_start=1593
|
|
50
|
+
_globals['_INVOKEERROR']._serialized_end=1734
|
|
51
|
+
_globals['_CANCEL']._serialized_start=1736
|
|
52
|
+
_globals['_CANCEL']._serialized_end=1773
|
|
53
|
+
_globals['_UNREGISTER']._serialized_start=1775
|
|
54
|
+
_globals['_UNREGISTER']._serialized_end=1816
|
|
55
|
+
_globals['_SESSIONREQUEST']._serialized_start=1819
|
|
56
|
+
_globals['_SESSIONREQUEST']._serialized_end=2203
|
|
57
|
+
_globals['_SESSIONRESPONSE']._serialized_start=2206
|
|
58
|
+
_globals['_SESSIONRESPONSE']._serialized_end=2427
|
|
59
|
+
_globals['_SIDECARGATEWAYSERVICE']._serialized_start=2429
|
|
60
|
+
_globals['_SIDECARGATEWAYSERVICE']._serialized_end=2550
|
|
61
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
from google.protobuf.internal import containers as _containers
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
5
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
6
|
+
|
|
7
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
+
|
|
9
|
+
class RegisteredActor(_message.Message):
|
|
10
|
+
__slots__ = ("parent_fsm_name", "parent_fsm_version", "async_operation_type", "async_operation_name", "async_operation_version", "async_operation_language", "timeout_ms", "description")
|
|
11
|
+
PARENT_FSM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
PARENT_FSM_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
ASYNC_OPERATION_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
ASYNC_OPERATION_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
ASYNC_OPERATION_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
ASYNC_OPERATION_LANGUAGE_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
parent_fsm_name: str
|
|
20
|
+
parent_fsm_version: str
|
|
21
|
+
async_operation_type: str
|
|
22
|
+
async_operation_name: str
|
|
23
|
+
async_operation_version: str
|
|
24
|
+
async_operation_language: str
|
|
25
|
+
timeout_ms: int
|
|
26
|
+
description: str
|
|
27
|
+
def __init__(self, parent_fsm_name: _Optional[str] = ..., parent_fsm_version: _Optional[str] = ..., async_operation_type: _Optional[str] = ..., async_operation_name: _Optional[str] = ..., async_operation_version: _Optional[str] = ..., async_operation_language: _Optional[str] = ..., timeout_ms: _Optional[int] = ..., description: _Optional[str] = ...) -> None: ...
|
|
28
|
+
|
|
29
|
+
class Register(_message.Message):
|
|
30
|
+
__slots__ = ("worker_id", "language", "protocol_version", "actors")
|
|
31
|
+
WORKER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
LANGUAGE_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
34
|
+
ACTORS_FIELD_NUMBER: _ClassVar[int]
|
|
35
|
+
worker_id: str
|
|
36
|
+
language: str
|
|
37
|
+
protocol_version: str
|
|
38
|
+
actors: _containers.RepeatedCompositeFieldContainer[RegisteredActor]
|
|
39
|
+
def __init__(self, worker_id: _Optional[str] = ..., language: _Optional[str] = ..., protocol_version: _Optional[str] = ..., actors: _Optional[_Iterable[_Union[RegisteredActor, _Mapping]]] = ...) -> None: ...
|
|
40
|
+
|
|
41
|
+
class RegisterAck(_message.Message):
|
|
42
|
+
__slots__ = ("accepted", "gateway_protocol_version", "registered_actors", "rejected_actors")
|
|
43
|
+
ACCEPTED_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
GATEWAY_PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
REGISTERED_ACTORS_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
REJECTED_ACTORS_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
accepted: bool
|
|
48
|
+
gateway_protocol_version: str
|
|
49
|
+
registered_actors: _containers.RepeatedScalarFieldContainer[str]
|
|
50
|
+
rejected_actors: _containers.RepeatedScalarFieldContainer[str]
|
|
51
|
+
def __init__(self, accepted: _Optional[bool] = ..., gateway_protocol_version: _Optional[str] = ..., registered_actors: _Optional[_Iterable[str]] = ..., rejected_actors: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
52
|
+
|
|
53
|
+
class Heartbeat(_message.Message):
|
|
54
|
+
__slots__ = ("worker_id",)
|
|
55
|
+
WORKER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
worker_id: str
|
|
57
|
+
def __init__(self, worker_id: _Optional[str] = ...) -> None: ...
|
|
58
|
+
|
|
59
|
+
class Invoke(_message.Message):
|
|
60
|
+
__slots__ = ("invoke_id", "parent_fsm_name", "parent_fsm_version", "async_operation_type", "async_operation_name", "async_operation_version", "async_operation_language", "input_json", "instance_id", "correlation_id", "timeout_ms", "deadline_unix_ms")
|
|
61
|
+
INVOKE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
PARENT_FSM_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
PARENT_FSM_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
64
|
+
ASYNC_OPERATION_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
ASYNC_OPERATION_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
ASYNC_OPERATION_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
67
|
+
ASYNC_OPERATION_LANGUAGE_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
INPUT_JSON_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
70
|
+
CORRELATION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
DEADLINE_UNIX_MS_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
invoke_id: str
|
|
74
|
+
parent_fsm_name: str
|
|
75
|
+
parent_fsm_version: str
|
|
76
|
+
async_operation_type: str
|
|
77
|
+
async_operation_name: str
|
|
78
|
+
async_operation_version: str
|
|
79
|
+
async_operation_language: str
|
|
80
|
+
input_json: str
|
|
81
|
+
instance_id: str
|
|
82
|
+
correlation_id: str
|
|
83
|
+
timeout_ms: int
|
|
84
|
+
deadline_unix_ms: int
|
|
85
|
+
def __init__(self, invoke_id: _Optional[str] = ..., parent_fsm_name: _Optional[str] = ..., parent_fsm_version: _Optional[str] = ..., async_operation_type: _Optional[str] = ..., async_operation_name: _Optional[str] = ..., async_operation_version: _Optional[str] = ..., async_operation_language: _Optional[str] = ..., input_json: _Optional[str] = ..., instance_id: _Optional[str] = ..., correlation_id: _Optional[str] = ..., timeout_ms: _Optional[int] = ..., deadline_unix_ms: _Optional[int] = ...) -> None: ...
|
|
86
|
+
|
|
87
|
+
class InvokeResult(_message.Message):
|
|
88
|
+
__slots__ = ("invoke_id", "output_json", "duration_ms")
|
|
89
|
+
INVOKE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
OUTPUT_JSON_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
+
DURATION_MS_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
invoke_id: str
|
|
93
|
+
output_json: str
|
|
94
|
+
duration_ms: int
|
|
95
|
+
def __init__(self, invoke_id: _Optional[str] = ..., output_json: _Optional[str] = ..., duration_ms: _Optional[int] = ...) -> None: ...
|
|
96
|
+
|
|
97
|
+
class InvokeErrorDetail(_message.Message):
|
|
98
|
+
__slots__ = ("code", "message", "retriable")
|
|
99
|
+
CODE_FIELD_NUMBER: _ClassVar[int]
|
|
100
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
101
|
+
RETRIABLE_FIELD_NUMBER: _ClassVar[int]
|
|
102
|
+
code: str
|
|
103
|
+
message: str
|
|
104
|
+
retriable: bool
|
|
105
|
+
def __init__(self, code: _Optional[str] = ..., message: _Optional[str] = ..., retriable: _Optional[bool] = ...) -> None: ...
|
|
106
|
+
|
|
107
|
+
class InvokeError(_message.Message):
|
|
108
|
+
__slots__ = ("invoke_id", "error", "duration_ms")
|
|
109
|
+
INVOKE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
110
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
111
|
+
DURATION_MS_FIELD_NUMBER: _ClassVar[int]
|
|
112
|
+
invoke_id: str
|
|
113
|
+
error: InvokeErrorDetail
|
|
114
|
+
duration_ms: int
|
|
115
|
+
def __init__(self, invoke_id: _Optional[str] = ..., error: _Optional[_Union[InvokeErrorDetail, _Mapping]] = ..., duration_ms: _Optional[int] = ...) -> None: ...
|
|
116
|
+
|
|
117
|
+
class Cancel(_message.Message):
|
|
118
|
+
__slots__ = ("invoke_id",)
|
|
119
|
+
INVOKE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
120
|
+
invoke_id: str
|
|
121
|
+
def __init__(self, invoke_id: _Optional[str] = ...) -> None: ...
|
|
122
|
+
|
|
123
|
+
class Unregister(_message.Message):
|
|
124
|
+
__slots__ = ("worker_id",)
|
|
125
|
+
WORKER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
126
|
+
worker_id: str
|
|
127
|
+
def __init__(self, worker_id: _Optional[str] = ...) -> None: ...
|
|
128
|
+
|
|
129
|
+
class SessionRequest(_message.Message):
|
|
130
|
+
__slots__ = ("register", "heartbeat", "invoke_result", "invoke_error", "unregister")
|
|
131
|
+
REGISTER_FIELD_NUMBER: _ClassVar[int]
|
|
132
|
+
HEARTBEAT_FIELD_NUMBER: _ClassVar[int]
|
|
133
|
+
INVOKE_RESULT_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
+
INVOKE_ERROR_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
+
UNREGISTER_FIELD_NUMBER: _ClassVar[int]
|
|
136
|
+
register: Register
|
|
137
|
+
heartbeat: Heartbeat
|
|
138
|
+
invoke_result: InvokeResult
|
|
139
|
+
invoke_error: InvokeError
|
|
140
|
+
unregister: Unregister
|
|
141
|
+
def __init__(self, register: _Optional[_Union[Register, _Mapping]] = ..., heartbeat: _Optional[_Union[Heartbeat, _Mapping]] = ..., invoke_result: _Optional[_Union[InvokeResult, _Mapping]] = ..., invoke_error: _Optional[_Union[InvokeError, _Mapping]] = ..., unregister: _Optional[_Union[Unregister, _Mapping]] = ...) -> None: ...
|
|
142
|
+
|
|
143
|
+
class SessionResponse(_message.Message):
|
|
144
|
+
__slots__ = ("register_ack", "invoke", "cancel")
|
|
145
|
+
REGISTER_ACK_FIELD_NUMBER: _ClassVar[int]
|
|
146
|
+
INVOKE_FIELD_NUMBER: _ClassVar[int]
|
|
147
|
+
CANCEL_FIELD_NUMBER: _ClassVar[int]
|
|
148
|
+
register_ack: RegisterAck
|
|
149
|
+
invoke: Invoke
|
|
150
|
+
cancel: Cancel
|
|
151
|
+
def __init__(self, register_ack: _Optional[_Union[RegisterAck, _Mapping]] = ..., invoke: _Optional[_Union[Invoke, _Mapping]] = ..., cancel: _Optional[_Union[Cancel, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
|
|
5
|
+
from pgfsm.sidecargateway.v1 import sidecar_gateway_pb2 as pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SidecarGatewayServiceStub(object):
|
|
9
|
+
"""Worker-facing contract for the Activity Gateway's sidecar leg — the
|
|
10
|
+
register/invoke/heartbeat channel between the gateway and each language's
|
|
11
|
+
worker SDK, previously a hand-rolled length-prefixed-JSON envelope
|
|
12
|
+
(sidecar/protocol.ts) hand-ported per language by fsm-compiler-ts's
|
|
13
|
+
worker-sdk-protocol.eta templates with no schema to check them against
|
|
14
|
+
(#88). This proto is the single source of truth those copies drove from;
|
|
15
|
+
see #100 for the migration.
|
|
16
|
+
|
|
17
|
+
Unlike activity_gateway.proto (the client-facing leg, #86/#87 — a client
|
|
18
|
+
calls Invoke() and gets one response back), this leg is not unary: the
|
|
19
|
+
worker initiates the connection and pushes Register once, then
|
|
20
|
+
Heartbeat/InvokeResult/InvokeError as needed, while the gateway pushes
|
|
21
|
+
Invoke/Cancel back unsolicited on the same stream — a worker registers
|
|
22
|
+
once and serves invocations indefinitely without the gateway needing to
|
|
23
|
+
reach it externally. A single bidi-streaming RPC preserves that shape.
|
|
24
|
+
|
|
25
|
+
Follows FILE_LOWER_SNAKE_CASE, PACKAGE_DIRECTORY_MATCH,
|
|
26
|
+
PACKAGE_VERSION_SUFFIX, SERVICE_SUFFIX, and RPC_REQUEST_STANDARD_NAME from
|
|
27
|
+
the start — activity_gateway.proto only picked up the same layout later,
|
|
28
|
+
in #102, once it stopped being loaded by exact filename at runtime.
|
|
29
|
+
|
|
30
|
+
Named `Session`, not the more obvious `Connect`: tonic-build always emits
|
|
31
|
+
an inherent `SidecarGatewayServiceClient::<Channel>::connect(dst)`
|
|
32
|
+
convenience constructor on the generated client, regardless of RPC names.
|
|
33
|
+
An RPC also named `Connect` collides with it on the same concretized type
|
|
34
|
+
(`error[E0592]: duplicate definitions with name 'connect'`) and simply
|
|
35
|
+
fails to compile — confirmed by building the generated Rust client in
|
|
36
|
+
isolation before picking this name.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, channel):
|
|
40
|
+
"""Constructor.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
channel: A grpc.Channel.
|
|
44
|
+
"""
|
|
45
|
+
self.Session = channel.stream_stream(
|
|
46
|
+
'/pgfsm.sidecargateway.v1.SidecarGatewayService/Session',
|
|
47
|
+
request_serializer=pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2.SessionRequest.SerializeToString,
|
|
48
|
+
response_deserializer=pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2.SessionResponse.FromString,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class SidecarGatewayServiceServicer(object):
|
|
53
|
+
"""Worker-facing contract for the Activity Gateway's sidecar leg — the
|
|
54
|
+
register/invoke/heartbeat channel between the gateway and each language's
|
|
55
|
+
worker SDK, previously a hand-rolled length-prefixed-JSON envelope
|
|
56
|
+
(sidecar/protocol.ts) hand-ported per language by fsm-compiler-ts's
|
|
57
|
+
worker-sdk-protocol.eta templates with no schema to check them against
|
|
58
|
+
(#88). This proto is the single source of truth those copies drove from;
|
|
59
|
+
see #100 for the migration.
|
|
60
|
+
|
|
61
|
+
Unlike activity_gateway.proto (the client-facing leg, #86/#87 — a client
|
|
62
|
+
calls Invoke() and gets one response back), this leg is not unary: the
|
|
63
|
+
worker initiates the connection and pushes Register once, then
|
|
64
|
+
Heartbeat/InvokeResult/InvokeError as needed, while the gateway pushes
|
|
65
|
+
Invoke/Cancel back unsolicited on the same stream — a worker registers
|
|
66
|
+
once and serves invocations indefinitely without the gateway needing to
|
|
67
|
+
reach it externally. A single bidi-streaming RPC preserves that shape.
|
|
68
|
+
|
|
69
|
+
Follows FILE_LOWER_SNAKE_CASE, PACKAGE_DIRECTORY_MATCH,
|
|
70
|
+
PACKAGE_VERSION_SUFFIX, SERVICE_SUFFIX, and RPC_REQUEST_STANDARD_NAME from
|
|
71
|
+
the start — activity_gateway.proto only picked up the same layout later,
|
|
72
|
+
in #102, once it stopped being loaded by exact filename at runtime.
|
|
73
|
+
|
|
74
|
+
Named `Session`, not the more obvious `Connect`: tonic-build always emits
|
|
75
|
+
an inherent `SidecarGatewayServiceClient::<Channel>::connect(dst)`
|
|
76
|
+
convenience constructor on the generated client, regardless of RPC names.
|
|
77
|
+
An RPC also named `Connect` collides with it on the same concretized type
|
|
78
|
+
(`error[E0592]: duplicate definitions with name 'connect'`) and simply
|
|
79
|
+
fails to compile — confirmed by building the generated Rust client in
|
|
80
|
+
isolation before picking this name.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
def Session(self, request_iterator, context):
|
|
84
|
+
"""Missing associated documentation comment in .proto file."""
|
|
85
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
86
|
+
context.set_details('Method not implemented!')
|
|
87
|
+
raise NotImplementedError('Method not implemented!')
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def add_SidecarGatewayServiceServicer_to_server(servicer, server):
|
|
91
|
+
rpc_method_handlers = {
|
|
92
|
+
'Session': grpc.stream_stream_rpc_method_handler(
|
|
93
|
+
servicer.Session,
|
|
94
|
+
request_deserializer=pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2.SessionRequest.FromString,
|
|
95
|
+
response_serializer=pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2.SessionResponse.SerializeToString,
|
|
96
|
+
),
|
|
97
|
+
}
|
|
98
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
99
|
+
'pgfsm.sidecargateway.v1.SidecarGatewayService', rpc_method_handlers)
|
|
100
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# This class is part of an EXPERIMENTAL API.
|
|
104
|
+
class SidecarGatewayService(object):
|
|
105
|
+
"""Worker-facing contract for the Activity Gateway's sidecar leg — the
|
|
106
|
+
register/invoke/heartbeat channel between the gateway and each language's
|
|
107
|
+
worker SDK, previously a hand-rolled length-prefixed-JSON envelope
|
|
108
|
+
(sidecar/protocol.ts) hand-ported per language by fsm-compiler-ts's
|
|
109
|
+
worker-sdk-protocol.eta templates with no schema to check them against
|
|
110
|
+
(#88). This proto is the single source of truth those copies drove from;
|
|
111
|
+
see #100 for the migration.
|
|
112
|
+
|
|
113
|
+
Unlike activity_gateway.proto (the client-facing leg, #86/#87 — a client
|
|
114
|
+
calls Invoke() and gets one response back), this leg is not unary: the
|
|
115
|
+
worker initiates the connection and pushes Register once, then
|
|
116
|
+
Heartbeat/InvokeResult/InvokeError as needed, while the gateway pushes
|
|
117
|
+
Invoke/Cancel back unsolicited on the same stream — a worker registers
|
|
118
|
+
once and serves invocations indefinitely without the gateway needing to
|
|
119
|
+
reach it externally. A single bidi-streaming RPC preserves that shape.
|
|
120
|
+
|
|
121
|
+
Follows FILE_LOWER_SNAKE_CASE, PACKAGE_DIRECTORY_MATCH,
|
|
122
|
+
PACKAGE_VERSION_SUFFIX, SERVICE_SUFFIX, and RPC_REQUEST_STANDARD_NAME from
|
|
123
|
+
the start — activity_gateway.proto only picked up the same layout later,
|
|
124
|
+
in #102, once it stopped being loaded by exact filename at runtime.
|
|
125
|
+
|
|
126
|
+
Named `Session`, not the more obvious `Connect`: tonic-build always emits
|
|
127
|
+
an inherent `SidecarGatewayServiceClient::<Channel>::connect(dst)`
|
|
128
|
+
convenience constructor on the generated client, regardless of RPC names.
|
|
129
|
+
An RPC also named `Connect` collides with it on the same concretized type
|
|
130
|
+
(`error[E0592]: duplicate definitions with name 'connect'`) and simply
|
|
131
|
+
fails to compile — confirmed by building the generated Rust client in
|
|
132
|
+
isolation before picking this name.
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
@staticmethod
|
|
136
|
+
def Session(request_iterator,
|
|
137
|
+
target,
|
|
138
|
+
options=(),
|
|
139
|
+
channel_credentials=None,
|
|
140
|
+
call_credentials=None,
|
|
141
|
+
insecure=False,
|
|
142
|
+
compression=None,
|
|
143
|
+
wait_for_ready=None,
|
|
144
|
+
timeout=None,
|
|
145
|
+
metadata=None):
|
|
146
|
+
return grpc.experimental.stream_stream(request_iterator, target, '/pgfsm.sidecargateway.v1.SidecarGatewayService/Session',
|
|
147
|
+
pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2.SessionRequest.SerializeToString,
|
|
148
|
+
pgfsm_dot_sidecargateway_dot_v1_dot_sidecar__gateway__pb2.SessionResponse.FromString,
|
|
149
|
+
options, channel_credentials,
|
|
150
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pgfsm-proto-codegen
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Generated protobuf + gRPC stubs for the pgfsm Activity Gateway and Sidecar Gateway contracts.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Project-URL: Repository, https://github.com/pgfsm/fsm
|
|
7
|
+
Project-URL: Source, https://github.com/pgfsm/fsm/tree/main/packages/fsm-proto-codegen
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: grpcio<2,>=1.60
|
|
11
|
+
Requires-Dist: protobuf<8,>=7.35.1
|
|
12
|
+
|
|
13
|
+
# pgfsm-proto-codegen
|
|
14
|
+
|
|
15
|
+
Generated protobuf + gRPC stubs for [pgfsm](https://github.com/pgfsm/fsm)'s
|
|
16
|
+
Activity Gateway (`pgfsm.activitygateway.v1`) and Sidecar Gateway
|
|
17
|
+
(`pgfsm.sidecargateway.v1`) contracts.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pip install pgfsm-proto-codegen
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from pgfsm.activitygateway.v1 import activity_gateway_pb2, activity_gateway_pb2_grpc
|
|
25
|
+
from pgfsm.sidecargateway.v1 import sidecar_gateway_pb2, sidecar_gateway_pb2_grpc
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Generated by `buf generate` from the `.proto` sources in
|
|
29
|
+
[`packages/fsm-proto-codegen`](https://github.com/pgfsm/fsm/tree/main/packages/fsm-proto-codegen)
|
|
30
|
+
— don't edit, regenerate. The same contracts are published for TypeScript
|
|
31
|
+
(`@pgfsm/proto-codegen` on npm), Rust (`pgfsm-proto-codegen` on crates.io), and
|
|
32
|
+
Go (`github.com/pgfsm/fsm/packages/fsm-proto-codegen/gen/go`), all at the same
|
|
33
|
+
version.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
pgfsm/activitygateway/v1/activity_gateway_pb2.py,sha256=ceZlMSh5iimw6nWNcniyjW_lCPmOmwCJr408AKOkJUY,3964
|
|
2
|
+
pgfsm/activitygateway/v1/activity_gateway_pb2.pyi,sha256=7xf0hF0fizmJp5o-mnrY_bUX_a7JbTmfnYCmb0pep9o,2813
|
|
3
|
+
pgfsm/activitygateway/v1/activity_gateway_pb2_grpc.py,sha256=noNc2KD1o68z59gPun61IsU2dLyvQ8NLP4HEPx_KxDw,9176
|
|
4
|
+
pgfsm/sidecargateway/v1/sidecar_gateway_pb2.py,sha256=wL5ssv5Wcmm-KsYzdiXr4mEMmtAHT3HjTkpg6X5GjGQ,7094
|
|
5
|
+
pgfsm/sidecargateway/v1/sidecar_gateway_pb2.pyi,sha256=souS23pm4kARfI_ZActIarRFL-4_iqWSVTYTWUSiNLM,7858
|
|
6
|
+
pgfsm/sidecargateway/v1/sidecar_gateway_pb2_grpc.py,sha256=b8yLlcz1bjf8KRLVWCs1riVtVX9yPoFEufdv-xbcPxI,8118
|
|
7
|
+
pgfsm_proto_codegen-0.1.0.dist-info/METADATA,sha256=uSzpNE0pzwT6_fcjUBxbd3suTKYIfTHXnuSONDSK6Qc,1297
|
|
8
|
+
pgfsm_proto_codegen-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
9
|
+
pgfsm_proto_codegen-0.1.0.dist-info/top_level.txt,sha256=XL4Z7o0f2B7hfggX4PPhEsGj7O6FPWEg_eAPBDU6CEw,6
|
|
10
|
+
pgfsm_proto_codegen-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pgfsm
|