isolate 0.12.16__py3-none-any.whl → 0.13.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.
Potentially problematic release.
This version of isolate might be problematic. Click here for more details.
- isolate/_isolate_version.py +2 -2
- isolate/connections/grpc/_base.py +3 -2
- isolate/connections/grpc/agent.py +3 -1
- isolate/connections/grpc/definitions/agent_pb2.py +11 -12
- isolate/connections/grpc/definitions/agent_pb2.pyi +8 -32
- isolate/connections/grpc/definitions/agent_pb2_grpc.py +54 -28
- isolate/connections/grpc/definitions/common_pb2.py +18 -21
- isolate/connections/grpc/definitions/common_pb2.pyi +17 -84
- isolate/connections/grpc/definitions/common_pb2_grpc.py +26 -0
- isolate/logger.py +17 -0
- isolate/server/definitions/server.proto +12 -0
- isolate/server/definitions/server_pb2.py +19 -17
- isolate/server/definitions/server_pb2.pyi +44 -52
- isolate/server/definitions/server_pb2_grpc.py +95 -28
- isolate/server/health/health_pb2.py +16 -16
- isolate/server/health/health_pb2.pyi +6 -14
- isolate/server/health/health_pb2_grpc.py +74 -53
- isolate/server/server.py +62 -26
- {isolate-0.12.16.dist-info → isolate-0.13.1.dist-info}/METADATA +3 -2
- {isolate-0.12.16.dist-info → isolate-0.13.1.dist-info}/RECORD +24 -23
- {isolate-0.12.16.dist-info → isolate-0.13.1.dist-info}/LICENSE +0 -0
- {isolate-0.12.16.dist-info → isolate-0.13.1.dist-info}/WHEEL +0 -0
- {isolate-0.12.16.dist-info → isolate-0.13.1.dist-info}/entry_points.txt +0 -0
- {isolate-0.12.16.dist-info → isolate-0.13.1.dist-info}/top_level.txt +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@generated by mypy-protobuf. Do not edit manually!
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
import builtins
|
|
6
7
|
import collections.abc
|
|
7
8
|
from isolate.connections.grpc.definitions import common_pb2
|
|
@@ -9,16 +10,11 @@ import google.protobuf.descriptor
|
|
|
9
10
|
import google.protobuf.internal.containers
|
|
10
11
|
import google.protobuf.message
|
|
11
12
|
import google.protobuf.struct_pb2
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
if sys.version_info >= (3, 8):
|
|
15
|
-
import typing as typing_extensions
|
|
16
|
-
else:
|
|
17
|
-
import typing_extensions
|
|
13
|
+
import typing
|
|
18
14
|
|
|
19
15
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
20
16
|
|
|
21
|
-
@
|
|
17
|
+
@typing.final
|
|
22
18
|
class BoundFunction(google.protobuf.message.Message):
|
|
23
19
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
24
20
|
|
|
@@ -26,11 +22,7 @@ class BoundFunction(google.protobuf.message.Message):
|
|
|
26
22
|
FUNCTION_FIELD_NUMBER: builtins.int
|
|
27
23
|
SETUP_FUNC_FIELD_NUMBER: builtins.int
|
|
28
24
|
@property
|
|
29
|
-
def environments(
|
|
30
|
-
self,
|
|
31
|
-
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
|
|
32
|
-
global___EnvironmentDefinition
|
|
33
|
-
]: ...
|
|
25
|
+
def environments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnvironmentDefinition]: ...
|
|
34
26
|
@property
|
|
35
27
|
def function(self) -> common_pb2.SerializedObject: ...
|
|
36
28
|
@property
|
|
@@ -38,42 +30,17 @@ class BoundFunction(google.protobuf.message.Message):
|
|
|
38
30
|
def __init__(
|
|
39
31
|
self,
|
|
40
32
|
*,
|
|
41
|
-
environments: collections.abc.Iterable[global___EnvironmentDefinition]
|
|
42
|
-
| None = ...,
|
|
33
|
+
environments: collections.abc.Iterable[global___EnvironmentDefinition] | None = ...,
|
|
43
34
|
function: common_pb2.SerializedObject | None = ...,
|
|
44
35
|
setup_func: common_pb2.SerializedObject | None = ...,
|
|
45
36
|
) -> None: ...
|
|
46
|
-
def HasField(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"_setup_func",
|
|
50
|
-
b"_setup_func",
|
|
51
|
-
"function",
|
|
52
|
-
b"function",
|
|
53
|
-
"setup_func",
|
|
54
|
-
b"setup_func",
|
|
55
|
-
],
|
|
56
|
-
) -> builtins.bool: ...
|
|
57
|
-
def ClearField(
|
|
58
|
-
self,
|
|
59
|
-
field_name: typing_extensions.Literal[
|
|
60
|
-
"_setup_func",
|
|
61
|
-
b"_setup_func",
|
|
62
|
-
"environments",
|
|
63
|
-
b"environments",
|
|
64
|
-
"function",
|
|
65
|
-
b"function",
|
|
66
|
-
"setup_func",
|
|
67
|
-
b"setup_func",
|
|
68
|
-
],
|
|
69
|
-
) -> None: ...
|
|
70
|
-
def WhichOneof(
|
|
71
|
-
self, oneof_group: typing_extensions.Literal["_setup_func", b"_setup_func"]
|
|
72
|
-
) -> typing_extensions.Literal["setup_func"] | None: ...
|
|
37
|
+
def HasField(self, field_name: typing.Literal["_setup_func", b"_setup_func", "function", b"function", "setup_func", b"setup_func"]) -> builtins.bool: ...
|
|
38
|
+
def ClearField(self, field_name: typing.Literal["_setup_func", b"_setup_func", "environments", b"environments", "function", b"function", "setup_func", b"setup_func"]) -> None: ...
|
|
39
|
+
def WhichOneof(self, oneof_group: typing.Literal["_setup_func", b"_setup_func"]) -> typing.Literal["setup_func"] | None: ...
|
|
73
40
|
|
|
74
41
|
global___BoundFunction = BoundFunction
|
|
75
42
|
|
|
76
|
-
@
|
|
43
|
+
@typing.final
|
|
77
44
|
class EnvironmentDefinition(google.protobuf.message.Message):
|
|
78
45
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
79
46
|
|
|
@@ -82,11 +49,12 @@ class EnvironmentDefinition(google.protobuf.message.Message):
|
|
|
82
49
|
FORCE_FIELD_NUMBER: builtins.int
|
|
83
50
|
kind: builtins.str
|
|
84
51
|
"""Kind of the isolate environment."""
|
|
52
|
+
force: builtins.bool
|
|
53
|
+
"""Whether to force-create this environment or not."""
|
|
85
54
|
@property
|
|
86
55
|
def configuration(self) -> google.protobuf.struct_pb2.Struct:
|
|
87
56
|
"""A free-form definition of environment properties."""
|
|
88
|
-
|
|
89
|
-
"""Whether to force-create this environment or not."""
|
|
57
|
+
|
|
90
58
|
def __init__(
|
|
91
59
|
self,
|
|
92
60
|
*,
|
|
@@ -94,14 +62,38 @@ class EnvironmentDefinition(google.protobuf.message.Message):
|
|
|
94
62
|
configuration: google.protobuf.struct_pb2.Struct | None = ...,
|
|
95
63
|
force: builtins.bool = ...,
|
|
96
64
|
) -> None: ...
|
|
97
|
-
def HasField(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
65
|
+
def HasField(self, field_name: typing.Literal["configuration", b"configuration"]) -> builtins.bool: ...
|
|
66
|
+
def ClearField(self, field_name: typing.Literal["configuration", b"configuration", "force", b"force", "kind", b"kind"]) -> None: ...
|
|
67
|
+
|
|
68
|
+
global___EnvironmentDefinition = EnvironmentDefinition
|
|
69
|
+
|
|
70
|
+
@typing.final
|
|
71
|
+
class SubmitRequest(google.protobuf.message.Message):
|
|
72
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
73
|
+
|
|
74
|
+
FUNCTION_FIELD_NUMBER: builtins.int
|
|
75
|
+
@property
|
|
76
|
+
def function(self) -> global___BoundFunction:
|
|
77
|
+
"""The function to run."""
|
|
78
|
+
|
|
79
|
+
def __init__(
|
|
80
|
+
self,
|
|
81
|
+
*,
|
|
82
|
+
function: global___BoundFunction | None = ...,
|
|
83
|
+
) -> None: ...
|
|
84
|
+
def HasField(self, field_name: typing.Literal["function", b"function"]) -> builtins.bool: ...
|
|
85
|
+
def ClearField(self, field_name: typing.Literal["function", b"function"]) -> None: ...
|
|
86
|
+
|
|
87
|
+
global___SubmitRequest = SubmitRequest
|
|
88
|
+
|
|
89
|
+
@typing.final
|
|
90
|
+
class SubmitResponse(google.protobuf.message.Message):
|
|
91
|
+
"""Reserved for future use."""
|
|
92
|
+
|
|
93
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
94
|
+
|
|
95
|
+
def __init__(
|
|
101
96
|
self,
|
|
102
|
-
field_name: typing_extensions.Literal[
|
|
103
|
-
"configuration", b"configuration", "force", b"force", "kind", b"kind"
|
|
104
|
-
],
|
|
105
97
|
) -> None: ...
|
|
106
98
|
|
|
107
|
-
|
|
99
|
+
global___SubmitResponse = SubmitResponse
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
2
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
3
|
import grpc
|
|
4
|
+
import warnings
|
|
4
5
|
|
|
5
6
|
from isolate.connections.grpc.definitions import common_pb2 as common__pb2
|
|
6
7
|
from isolate.server.definitions import server_pb2 as server__pb2
|
|
7
8
|
|
|
9
|
+
GRPC_GENERATED_VERSION = '1.64.0'
|
|
10
|
+
GRPC_VERSION = grpc.__version__
|
|
11
|
+
EXPECTED_ERROR_RELEASE = '1.65.0'
|
|
12
|
+
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
|
|
13
|
+
_version_not_supported = False
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
from grpc._utilities import first_version_is_lower
|
|
17
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
18
|
+
except ImportError:
|
|
19
|
+
_version_not_supported = True
|
|
20
|
+
|
|
21
|
+
if _version_not_supported:
|
|
22
|
+
warnings.warn(
|
|
23
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
24
|
+
+ f' but the generated code in server_pb2_grpc.py depends on'
|
|
25
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
26
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
27
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
28
|
+
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
|
|
29
|
+
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
|
|
30
|
+
RuntimeWarning
|
|
31
|
+
)
|
|
32
|
+
|
|
8
33
|
|
|
9
34
|
class IsolateStub(object):
|
|
10
35
|
"""Missing associated documentation comment in .proto file."""
|
|
@@ -16,10 +41,15 @@ class IsolateStub(object):
|
|
|
16
41
|
channel: A grpc.Channel.
|
|
17
42
|
"""
|
|
18
43
|
self.Run = channel.unary_stream(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
44
|
+
'/Isolate/Run',
|
|
45
|
+
request_serializer=server__pb2.BoundFunction.SerializeToString,
|
|
46
|
+
response_deserializer=common__pb2.PartialRunResult.FromString,
|
|
47
|
+
_registered_method=True)
|
|
48
|
+
self.Submit = channel.unary_unary(
|
|
49
|
+
'/Isolate/Submit',
|
|
50
|
+
request_serializer=server__pb2.SubmitRequest.SerializeToString,
|
|
51
|
+
response_deserializer=server__pb2.SubmitResponse.FromString,
|
|
52
|
+
_registered_method=True)
|
|
23
53
|
|
|
24
54
|
|
|
25
55
|
class IsolateServicer(object):
|
|
@@ -30,45 +60,55 @@ class IsolateServicer(object):
|
|
|
30
60
|
and the result originating from that function.
|
|
31
61
|
"""
|
|
32
62
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
33
|
-
context.set_details(
|
|
34
|
-
raise NotImplementedError(
|
|
63
|
+
context.set_details('Method not implemented!')
|
|
64
|
+
raise NotImplementedError('Method not implemented!')
|
|
65
|
+
|
|
66
|
+
def Submit(self, request, context):
|
|
67
|
+
"""Submit a function to be run without waiting for results.
|
|
68
|
+
"""
|
|
69
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
70
|
+
context.set_details('Method not implemented!')
|
|
71
|
+
raise NotImplementedError('Method not implemented!')
|
|
35
72
|
|
|
36
73
|
|
|
37
74
|
def add_IsolateServicer_to_server(servicer, server):
|
|
38
75
|
rpc_method_handlers = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
76
|
+
'Run': grpc.unary_stream_rpc_method_handler(
|
|
77
|
+
servicer.Run,
|
|
78
|
+
request_deserializer=server__pb2.BoundFunction.FromString,
|
|
79
|
+
response_serializer=common__pb2.PartialRunResult.SerializeToString,
|
|
80
|
+
),
|
|
81
|
+
'Submit': grpc.unary_unary_rpc_method_handler(
|
|
82
|
+
servicer.Submit,
|
|
83
|
+
request_deserializer=server__pb2.SubmitRequest.FromString,
|
|
84
|
+
response_serializer=server__pb2.SubmitResponse.SerializeToString,
|
|
85
|
+
),
|
|
44
86
|
}
|
|
45
87
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
46
|
-
|
|
47
|
-
)
|
|
88
|
+
'Isolate', rpc_method_handlers)
|
|
48
89
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
90
|
+
server.add_registered_method_handlers('Isolate', rpc_method_handlers)
|
|
49
91
|
|
|
50
92
|
|
|
51
|
-
# This class is part of an EXPERIMENTAL API.
|
|
93
|
+
# This class is part of an EXPERIMENTAL API.
|
|
52
94
|
class Isolate(object):
|
|
53
95
|
"""Missing associated documentation comment in .proto file."""
|
|
54
96
|
|
|
55
97
|
@staticmethod
|
|
56
|
-
def Run(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
metadata=None,
|
|
67
|
-
):
|
|
98
|
+
def Run(request,
|
|
99
|
+
target,
|
|
100
|
+
options=(),
|
|
101
|
+
channel_credentials=None,
|
|
102
|
+
call_credentials=None,
|
|
103
|
+
insecure=False,
|
|
104
|
+
compression=None,
|
|
105
|
+
wait_for_ready=None,
|
|
106
|
+
timeout=None,
|
|
107
|
+
metadata=None):
|
|
68
108
|
return grpc.experimental.unary_stream(
|
|
69
109
|
request,
|
|
70
110
|
target,
|
|
71
|
-
|
|
111
|
+
'/Isolate/Run',
|
|
72
112
|
server__pb2.BoundFunction.SerializeToString,
|
|
73
113
|
common__pb2.PartialRunResult.FromString,
|
|
74
114
|
options,
|
|
@@ -79,4 +119,31 @@ class Isolate(object):
|
|
|
79
119
|
wait_for_ready,
|
|
80
120
|
timeout,
|
|
81
121
|
metadata,
|
|
82
|
-
|
|
122
|
+
_registered_method=True)
|
|
123
|
+
|
|
124
|
+
@staticmethod
|
|
125
|
+
def Submit(request,
|
|
126
|
+
target,
|
|
127
|
+
options=(),
|
|
128
|
+
channel_credentials=None,
|
|
129
|
+
call_credentials=None,
|
|
130
|
+
insecure=False,
|
|
131
|
+
compression=None,
|
|
132
|
+
wait_for_ready=None,
|
|
133
|
+
timeout=None,
|
|
134
|
+
metadata=None):
|
|
135
|
+
return grpc.experimental.unary_unary(
|
|
136
|
+
request,
|
|
137
|
+
target,
|
|
138
|
+
'/Isolate/Submit',
|
|
139
|
+
server__pb2.SubmitRequest.SerializeToString,
|
|
140
|
+
server__pb2.SubmitResponse.FromString,
|
|
141
|
+
options,
|
|
142
|
+
channel_credentials,
|
|
143
|
+
insecure,
|
|
144
|
+
call_credentials,
|
|
145
|
+
compression,
|
|
146
|
+
wait_for_ready,
|
|
147
|
+
timeout,
|
|
148
|
+
metadata,
|
|
149
|
+
_registered_method=True)
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: health.proto
|
|
4
|
+
# Protobuf Python Version: 5.26.1
|
|
4
5
|
"""Generated protocol buffer code."""
|
|
5
6
|
from google.protobuf import descriptor as _descriptor
|
|
6
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
8
|
from google.protobuf import symbol_database as _symbol_database
|
|
8
9
|
from google.protobuf.internal import builder as _builder
|
|
9
|
-
|
|
10
10
|
# @@protoc_insertion_point(imports)
|
|
11
11
|
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
16
|
-
b'\n\x0chealth.proto\x12\x0egrpc.health.v1"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t"\xa9\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus"O\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x12\x13\n\x0fSERVICE_UNKNOWN\x10\x03\x32\xae\x01\n\x06Health\x12P\n\x05\x43heck\x12".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse\x12R\n\x05Watch\x12".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse0\x01\x62\x06proto3'
|
|
17
|
-
)
|
|
18
15
|
|
|
19
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
20
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "health_pb2", globals())
|
|
21
|
-
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chealth.proto\x12\x0egrpc.health.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\xa9\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus\"O\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x12\x13\n\x0fSERVICE_UNKNOWN\x10\x03\x32\xae\x01\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse\x12R\n\x05Watch\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse0\x01\x62\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'health_pb2', _globals)
|
|
22
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
23
|
+
DESCRIPTOR._loaded_options = None
|
|
24
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_start=32
|
|
25
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_end=69
|
|
26
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_start=72
|
|
27
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_end=241
|
|
28
|
+
_globals['_HEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_start=162
|
|
29
|
+
_globals['_HEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_end=241
|
|
30
|
+
_globals['_HEALTH']._serialized_start=244
|
|
31
|
+
_globals['_HEALTH']._serialized_end=418
|
|
32
32
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@generated by mypy-protobuf. Do not edit manually!
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
import builtins
|
|
6
7
|
import google.protobuf.descriptor
|
|
7
8
|
import google.protobuf.internal.enum_type_wrapper
|
|
@@ -16,7 +17,7 @@ else:
|
|
|
16
17
|
|
|
17
18
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
18
19
|
|
|
19
|
-
@
|
|
20
|
+
@typing.final
|
|
20
21
|
class HealthCheckRequest(google.protobuf.message.Message):
|
|
21
22
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
22
23
|
|
|
@@ -27,13 +28,11 @@ class HealthCheckRequest(google.protobuf.message.Message):
|
|
|
27
28
|
*,
|
|
28
29
|
service: builtins.str = ...,
|
|
29
30
|
) -> None: ...
|
|
30
|
-
def ClearField(
|
|
31
|
-
self, field_name: typing_extensions.Literal["service", b"service"]
|
|
32
|
-
) -> None: ...
|
|
31
|
+
def ClearField(self, field_name: typing.Literal["service", b"service"]) -> None: ...
|
|
33
32
|
|
|
34
33
|
global___HealthCheckRequest = HealthCheckRequest
|
|
35
34
|
|
|
36
|
-
@
|
|
35
|
+
@typing.final
|
|
37
36
|
class HealthCheckResponse(google.protobuf.message.Message):
|
|
38
37
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
39
38
|
|
|
@@ -41,12 +40,7 @@ class HealthCheckResponse(google.protobuf.message.Message):
|
|
|
41
40
|
ValueType = typing.NewType("ValueType", builtins.int)
|
|
42
41
|
V: typing_extensions.TypeAlias = ValueType
|
|
43
42
|
|
|
44
|
-
class _ServingStatusEnumTypeWrapper(
|
|
45
|
-
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[
|
|
46
|
-
HealthCheckResponse._ServingStatus.ValueType
|
|
47
|
-
],
|
|
48
|
-
builtins.type,
|
|
49
|
-
): # noqa: F821
|
|
43
|
+
class _ServingStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[HealthCheckResponse._ServingStatus.ValueType], builtins.type):
|
|
50
44
|
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
51
45
|
UNKNOWN: HealthCheckResponse._ServingStatus.ValueType # 0
|
|
52
46
|
SERVING: HealthCheckResponse._ServingStatus.ValueType # 1
|
|
@@ -68,8 +62,6 @@ class HealthCheckResponse(google.protobuf.message.Message):
|
|
|
68
62
|
*,
|
|
69
63
|
status: global___HealthCheckResponse.ServingStatus.ValueType = ...,
|
|
70
64
|
) -> None: ...
|
|
71
|
-
def ClearField(
|
|
72
|
-
self, field_name: typing_extensions.Literal["status", b"status"]
|
|
73
|
-
) -> None: ...
|
|
65
|
+
def ClearField(self, field_name: typing.Literal["status", b"status"]) -> None: ...
|
|
74
66
|
|
|
75
67
|
global___HealthCheckResponse = HealthCheckResponse
|
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
2
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
3
|
import grpc
|
|
4
|
+
import warnings
|
|
4
5
|
|
|
5
6
|
from isolate.server.health import health_pb2 as health__pb2
|
|
6
7
|
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.64.0'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
EXPECTED_ERROR_RELEASE = '1.65.0'
|
|
11
|
+
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
|
|
12
|
+
_version_not_supported = False
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
from grpc._utilities import first_version_is_lower
|
|
16
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
17
|
+
except ImportError:
|
|
18
|
+
_version_not_supported = True
|
|
19
|
+
|
|
20
|
+
if _version_not_supported:
|
|
21
|
+
warnings.warn(
|
|
22
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
23
|
+
+ f' but the generated code in health_pb2_grpc.py depends on'
|
|
24
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
25
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
26
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
27
|
+
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
|
|
28
|
+
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
|
|
29
|
+
RuntimeWarning
|
|
30
|
+
)
|
|
31
|
+
|
|
7
32
|
|
|
8
33
|
class HealthStub(object):
|
|
9
34
|
"""Missing associated documentation comment in .proto file."""
|
|
@@ -15,15 +40,15 @@ class HealthStub(object):
|
|
|
15
40
|
channel: A grpc.Channel.
|
|
16
41
|
"""
|
|
17
42
|
self.Check = channel.unary_unary(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
43
|
+
'/grpc.health.v1.Health/Check',
|
|
44
|
+
request_serializer=health__pb2.HealthCheckRequest.SerializeToString,
|
|
45
|
+
response_deserializer=health__pb2.HealthCheckResponse.FromString,
|
|
46
|
+
_registered_method=True)
|
|
22
47
|
self.Watch = channel.unary_stream(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
'/grpc.health.v1.Health/Watch',
|
|
49
|
+
request_serializer=health__pb2.HealthCheckRequest.SerializeToString,
|
|
50
|
+
response_deserializer=health__pb2.HealthCheckResponse.FromString,
|
|
51
|
+
_registered_method=True)
|
|
27
52
|
|
|
28
53
|
|
|
29
54
|
class HealthServicer(object):
|
|
@@ -32,56 +57,54 @@ class HealthServicer(object):
|
|
|
32
57
|
def Check(self, request, context):
|
|
33
58
|
"""Missing associated documentation comment in .proto file."""
|
|
34
59
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
35
|
-
context.set_details(
|
|
36
|
-
raise NotImplementedError(
|
|
60
|
+
context.set_details('Method not implemented!')
|
|
61
|
+
raise NotImplementedError('Method not implemented!')
|
|
37
62
|
|
|
38
63
|
def Watch(self, request, context):
|
|
39
64
|
"""Missing associated documentation comment in .proto file."""
|
|
40
65
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
41
|
-
context.set_details(
|
|
42
|
-
raise NotImplementedError(
|
|
66
|
+
context.set_details('Method not implemented!')
|
|
67
|
+
raise NotImplementedError('Method not implemented!')
|
|
43
68
|
|
|
44
69
|
|
|
45
70
|
def add_HealthServicer_to_server(servicer, server):
|
|
46
71
|
rpc_method_handlers = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
72
|
+
'Check': grpc.unary_unary_rpc_method_handler(
|
|
73
|
+
servicer.Check,
|
|
74
|
+
request_deserializer=health__pb2.HealthCheckRequest.FromString,
|
|
75
|
+
response_serializer=health__pb2.HealthCheckResponse.SerializeToString,
|
|
76
|
+
),
|
|
77
|
+
'Watch': grpc.unary_stream_rpc_method_handler(
|
|
78
|
+
servicer.Watch,
|
|
79
|
+
request_deserializer=health__pb2.HealthCheckRequest.FromString,
|
|
80
|
+
response_serializer=health__pb2.HealthCheckResponse.SerializeToString,
|
|
81
|
+
),
|
|
57
82
|
}
|
|
58
83
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
59
|
-
|
|
60
|
-
)
|
|
84
|
+
'grpc.health.v1.Health', rpc_method_handlers)
|
|
61
85
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
86
|
+
server.add_registered_method_handlers('grpc.health.v1.Health', rpc_method_handlers)
|
|
62
87
|
|
|
63
88
|
|
|
64
|
-
# This class is part of an EXPERIMENTAL API.
|
|
89
|
+
# This class is part of an EXPERIMENTAL API.
|
|
65
90
|
class Health(object):
|
|
66
91
|
"""Missing associated documentation comment in .proto file."""
|
|
67
92
|
|
|
68
93
|
@staticmethod
|
|
69
|
-
def Check(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
metadata=None,
|
|
80
|
-
):
|
|
94
|
+
def Check(request,
|
|
95
|
+
target,
|
|
96
|
+
options=(),
|
|
97
|
+
channel_credentials=None,
|
|
98
|
+
call_credentials=None,
|
|
99
|
+
insecure=False,
|
|
100
|
+
compression=None,
|
|
101
|
+
wait_for_ready=None,
|
|
102
|
+
timeout=None,
|
|
103
|
+
metadata=None):
|
|
81
104
|
return grpc.experimental.unary_unary(
|
|
82
105
|
request,
|
|
83
106
|
target,
|
|
84
|
-
|
|
107
|
+
'/grpc.health.v1.Health/Check',
|
|
85
108
|
health__pb2.HealthCheckRequest.SerializeToString,
|
|
86
109
|
health__pb2.HealthCheckResponse.FromString,
|
|
87
110
|
options,
|
|
@@ -92,25 +115,23 @@ class Health(object):
|
|
|
92
115
|
wait_for_ready,
|
|
93
116
|
timeout,
|
|
94
117
|
metadata,
|
|
95
|
-
|
|
118
|
+
_registered_method=True)
|
|
96
119
|
|
|
97
120
|
@staticmethod
|
|
98
|
-
def Watch(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
metadata=None,
|
|
109
|
-
):
|
|
121
|
+
def Watch(request,
|
|
122
|
+
target,
|
|
123
|
+
options=(),
|
|
124
|
+
channel_credentials=None,
|
|
125
|
+
call_credentials=None,
|
|
126
|
+
insecure=False,
|
|
127
|
+
compression=None,
|
|
128
|
+
wait_for_ready=None,
|
|
129
|
+
timeout=None,
|
|
130
|
+
metadata=None):
|
|
110
131
|
return grpc.experimental.unary_stream(
|
|
111
132
|
request,
|
|
112
133
|
target,
|
|
113
|
-
|
|
134
|
+
'/grpc.health.v1.Health/Watch',
|
|
114
135
|
health__pb2.HealthCheckRequest.SerializeToString,
|
|
115
136
|
health__pb2.HealthCheckResponse.FromString,
|
|
116
137
|
options,
|
|
@@ -121,4 +142,4 @@ class Health(object):
|
|
|
121
142
|
wait_for_ready,
|
|
122
143
|
timeout,
|
|
123
144
|
metadata,
|
|
124
|
-
|
|
145
|
+
_registered_method=True)
|