modal 1.1.5.dev86__py3-none-any.whl → 1.1.5.dev87__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 modal might be problematic. Click here for more details.
- modal/client.pyi +2 -2
- {modal-1.1.5.dev86.dist-info → modal-1.1.5.dev87.dist-info}/METADATA +1 -1
- {modal-1.1.5.dev86.dist-info → modal-1.1.5.dev87.dist-info}/RECORD +21 -15
- modal_proto/api.proto +15 -0
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +201 -181
- modal_proto/api_pb2.pyi +38 -0
- modal_proto/api_pb2_grpc.py +33 -0
- modal_proto/api_pb2_grpc.pyi +10 -0
- modal_proto/modal_api_grpc.py +1 -0
- modal_proto/task_command_router.proto +144 -0
- modal_proto/task_command_router_grpc.py +105 -0
- modal_proto/task_command_router_pb2.py +149 -0
- modal_proto/task_command_router_pb2.pyi +333 -0
- modal_proto/task_command_router_pb2_grpc.py +203 -0
- modal_proto/task_command_router_pb2_grpc.pyi +75 -0
- modal_version/__init__.py +1 -1
- {modal-1.1.5.dev86.dist-info → modal-1.1.5.dev87.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev86.dist-info → modal-1.1.5.dev87.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev86.dist-info → modal-1.1.5.dev87.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev86.dist-info → modal-1.1.5.dev87.dist-info}/top_level.txt +0 -0
modal_proto/api_pb2.pyi
CHANGED
|
@@ -8921,6 +8921,8 @@ class SandboxGetCommandRouterAccessRequest(google.protobuf.message.Message):
|
|
|
8921
8921
|
"""Used to get a JWT and URL for direct access to a sandbox router server
|
|
8922
8922
|
running on the modal-worker, so the client can issue exec commands (and other
|
|
8923
8923
|
operations as they become available) directly to the worker.
|
|
8924
|
+
DEPRECATED: Use TaskGetCommandRouterAccessRequest instead.
|
|
8925
|
+
TODO(saltzm): Remove this.
|
|
8924
8926
|
"""
|
|
8925
8927
|
|
|
8926
8928
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
@@ -10330,6 +10332,42 @@ class TaskGetAutoscalingMetricsResponse(google.protobuf.message.Message):
|
|
|
10330
10332
|
|
|
10331
10333
|
global___TaskGetAutoscalingMetricsResponse = TaskGetAutoscalingMetricsResponse
|
|
10332
10334
|
|
|
10335
|
+
class TaskGetCommandRouterAccessRequest(google.protobuf.message.Message):
|
|
10336
|
+
"""Used to get a JWT and URL for direct access to a task command router
|
|
10337
|
+
running on the modal-worker, so the client can issue exec commands (and other
|
|
10338
|
+
operations as they become available) directly to the worker.
|
|
10339
|
+
"""
|
|
10340
|
+
|
|
10341
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
10342
|
+
|
|
10343
|
+
TASK_ID_FIELD_NUMBER: builtins.int
|
|
10344
|
+
task_id: builtins.str
|
|
10345
|
+
def __init__(
|
|
10346
|
+
self,
|
|
10347
|
+
*,
|
|
10348
|
+
task_id: builtins.str = ...,
|
|
10349
|
+
) -> None: ...
|
|
10350
|
+
def ClearField(self, field_name: typing_extensions.Literal["task_id", b"task_id"]) -> None: ...
|
|
10351
|
+
|
|
10352
|
+
global___TaskGetCommandRouterAccessRequest = TaskGetCommandRouterAccessRequest
|
|
10353
|
+
|
|
10354
|
+
class TaskGetCommandRouterAccessResponse(google.protobuf.message.Message):
|
|
10355
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
10356
|
+
|
|
10357
|
+
JWT_FIELD_NUMBER: builtins.int
|
|
10358
|
+
URL_FIELD_NUMBER: builtins.int
|
|
10359
|
+
jwt: builtins.str
|
|
10360
|
+
url: builtins.str
|
|
10361
|
+
def __init__(
|
|
10362
|
+
self,
|
|
10363
|
+
*,
|
|
10364
|
+
jwt: builtins.str = ...,
|
|
10365
|
+
url: builtins.str = ...,
|
|
10366
|
+
) -> None: ...
|
|
10367
|
+
def ClearField(self, field_name: typing_extensions.Literal["jwt", b"jwt", "url", b"url"]) -> None: ...
|
|
10368
|
+
|
|
10369
|
+
global___TaskGetCommandRouterAccessResponse = TaskGetCommandRouterAccessResponse
|
|
10370
|
+
|
|
10333
10371
|
class TaskInfo(google.protobuf.message.Message):
|
|
10334
10372
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
10335
10373
|
|
modal_proto/api_pb2_grpc.py
CHANGED
|
@@ -765,6 +765,11 @@ class ModalClientStub(object):
|
|
|
765
765
|
request_serializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsRequest.SerializeToString,
|
|
766
766
|
response_deserializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsResponse.FromString,
|
|
767
767
|
)
|
|
768
|
+
self.TaskGetCommandRouterAccess = channel.unary_unary(
|
|
769
|
+
'/modal.client.ModalClient/TaskGetCommandRouterAccess',
|
|
770
|
+
request_serializer=modal__proto_dot_api__pb2.TaskGetCommandRouterAccessRequest.SerializeToString,
|
|
771
|
+
response_deserializer=modal__proto_dot_api__pb2.TaskGetCommandRouterAccessResponse.FromString,
|
|
772
|
+
)
|
|
768
773
|
self.TaskList = channel.unary_unary(
|
|
769
774
|
'/modal.client.ModalClient/TaskList',
|
|
770
775
|
request_serializer=modal__proto_dot_api__pb2.TaskListRequest.SerializeToString,
|
|
@@ -1824,6 +1829,12 @@ class ModalClientServicer(object):
|
|
|
1824
1829
|
context.set_details('Method not implemented!')
|
|
1825
1830
|
raise NotImplementedError('Method not implemented!')
|
|
1826
1831
|
|
|
1832
|
+
def TaskGetCommandRouterAccess(self, request, context):
|
|
1833
|
+
"""Missing associated documentation comment in .proto file."""
|
|
1834
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
1835
|
+
context.set_details('Method not implemented!')
|
|
1836
|
+
raise NotImplementedError('Method not implemented!')
|
|
1837
|
+
|
|
1827
1838
|
def TaskList(self, request, context):
|
|
1828
1839
|
"""Missing associated documentation comment in .proto file."""
|
|
1829
1840
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
@@ -2731,6 +2742,11 @@ def add_ModalClientServicer_to_server(servicer, server):
|
|
|
2731
2742
|
request_deserializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsRequest.FromString,
|
|
2732
2743
|
response_serializer=modal__proto_dot_api__pb2.TaskGetAutoscalingMetricsResponse.SerializeToString,
|
|
2733
2744
|
),
|
|
2745
|
+
'TaskGetCommandRouterAccess': grpc.unary_unary_rpc_method_handler(
|
|
2746
|
+
servicer.TaskGetCommandRouterAccess,
|
|
2747
|
+
request_deserializer=modal__proto_dot_api__pb2.TaskGetCommandRouterAccessRequest.FromString,
|
|
2748
|
+
response_serializer=modal__proto_dot_api__pb2.TaskGetCommandRouterAccessResponse.SerializeToString,
|
|
2749
|
+
),
|
|
2734
2750
|
'TaskList': grpc.unary_unary_rpc_method_handler(
|
|
2735
2751
|
servicer.TaskList,
|
|
2736
2752
|
request_deserializer=modal__proto_dot_api__pb2.TaskListRequest.FromString,
|
|
@@ -5416,6 +5432,23 @@ class ModalClient(object):
|
|
|
5416
5432
|
options, channel_credentials,
|
|
5417
5433
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
5418
5434
|
|
|
5435
|
+
@staticmethod
|
|
5436
|
+
def TaskGetCommandRouterAccess(request,
|
|
5437
|
+
target,
|
|
5438
|
+
options=(),
|
|
5439
|
+
channel_credentials=None,
|
|
5440
|
+
call_credentials=None,
|
|
5441
|
+
insecure=False,
|
|
5442
|
+
compression=None,
|
|
5443
|
+
wait_for_ready=None,
|
|
5444
|
+
timeout=None,
|
|
5445
|
+
metadata=None):
|
|
5446
|
+
return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/TaskGetCommandRouterAccess',
|
|
5447
|
+
modal__proto_dot_api__pb2.TaskGetCommandRouterAccessRequest.SerializeToString,
|
|
5448
|
+
modal__proto_dot_api__pb2.TaskGetCommandRouterAccessResponse.FromString,
|
|
5449
|
+
options, channel_credentials,
|
|
5450
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
5451
|
+
|
|
5419
5452
|
@staticmethod
|
|
5420
5453
|
def TaskList(request,
|
|
5421
5454
|
target,
|
modal_proto/api_pb2_grpc.pyi
CHANGED
|
@@ -639,6 +639,10 @@ class ModalClientStub:
|
|
|
639
639
|
modal_proto.api_pb2.TaskGetAutoscalingMetricsResponse,
|
|
640
640
|
]
|
|
641
641
|
"""Used for flash autoscaling"""
|
|
642
|
+
TaskGetCommandRouterAccess: grpc.UnaryUnaryMultiCallable[
|
|
643
|
+
modal_proto.api_pb2.TaskGetCommandRouterAccessRequest,
|
|
644
|
+
modal_proto.api_pb2.TaskGetCommandRouterAccessResponse,
|
|
645
|
+
]
|
|
642
646
|
TaskList: grpc.UnaryUnaryMultiCallable[
|
|
643
647
|
modal_proto.api_pb2.TaskListRequest,
|
|
644
648
|
modal_proto.api_pb2.TaskListResponse,
|
|
@@ -1675,6 +1679,12 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
|
|
|
1675
1679
|
) -> modal_proto.api_pb2.TaskGetAutoscalingMetricsResponse:
|
|
1676
1680
|
"""Used for flash autoscaling"""
|
|
1677
1681
|
@abc.abstractmethod
|
|
1682
|
+
def TaskGetCommandRouterAccess(
|
|
1683
|
+
self,
|
|
1684
|
+
request: modal_proto.api_pb2.TaskGetCommandRouterAccessRequest,
|
|
1685
|
+
context: grpc.ServicerContext,
|
|
1686
|
+
) -> modal_proto.api_pb2.TaskGetCommandRouterAccessResponse: ...
|
|
1687
|
+
@abc.abstractmethod
|
|
1678
1688
|
def TaskList(
|
|
1679
1689
|
self,
|
|
1680
1690
|
request: modal_proto.api_pb2.TaskListRequest,
|
modal_proto/modal_api_grpc.py
CHANGED
|
@@ -168,6 +168,7 @@ class ModalClientModal:
|
|
|
168
168
|
self.TaskClusterHello = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskClusterHello, client, server_url)
|
|
169
169
|
self.TaskCurrentInputs = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskCurrentInputs, client, server_url)
|
|
170
170
|
self.TaskGetAutoscalingMetrics = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskGetAutoscalingMetrics, client, server_url)
|
|
171
|
+
self.TaskGetCommandRouterAccess = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskGetCommandRouterAccess, client, server_url)
|
|
171
172
|
self.TaskList = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskList, client, server_url)
|
|
172
173
|
self.TaskResult = modal.client.UnaryUnaryWrapper(grpclib_stub.TaskResult, client, server_url)
|
|
173
174
|
self.TokenFlowCreate = modal.client.UnaryUnaryWrapper(grpclib_stub.TokenFlowCreate, client, server_url)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
option go_package = "github.com/modal-labs/modal/go/proto/task_command_router";
|
|
4
|
+
|
|
5
|
+
import "modal_proto/api.proto";
|
|
6
|
+
|
|
7
|
+
package modal.task_command_router;
|
|
8
|
+
|
|
9
|
+
enum TaskExecStderrConfig {
|
|
10
|
+
// The output will be discarded.
|
|
11
|
+
TASK_EXEC_STDERR_CONFIG_DEVNULL = 0;
|
|
12
|
+
// The output will be streamed to the client.
|
|
13
|
+
TASK_EXEC_STDERR_CONFIG_PIPE = 1;
|
|
14
|
+
// A special value that can be used to indicate that the stderr stream should
|
|
15
|
+
// be merged with the stdout stream.
|
|
16
|
+
TASK_EXEC_STDERR_CONFIG_STDOUT = 2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
enum TaskExecStdioFileDescriptor {
|
|
20
|
+
// Read from stdout.
|
|
21
|
+
TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0;
|
|
22
|
+
// Read from stderr.
|
|
23
|
+
TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
enum TaskExecStdoutConfig {
|
|
27
|
+
// The output will be discarded.
|
|
28
|
+
TASK_EXEC_STDOUT_CONFIG_DEVNULL = 0;
|
|
29
|
+
// The output will be streamed to the client.
|
|
30
|
+
TASK_EXEC_STDOUT_CONFIG_PIPE = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message TaskExecPollRequest {
|
|
34
|
+
// The ID of the task running the exec'd command.
|
|
35
|
+
string task_id = 1;
|
|
36
|
+
// The execution ID of the command to wait on.
|
|
37
|
+
string exec_id = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// The response to a TaskExecPollRequest. If the exec'd command has not
|
|
41
|
+
// completed, exit_status will be unset.
|
|
42
|
+
message TaskExecPollResponse {
|
|
43
|
+
oneof exit_status {
|
|
44
|
+
// The exit code of the command.
|
|
45
|
+
int32 code = 1;
|
|
46
|
+
// The signal that terminated the command.
|
|
47
|
+
int32 signal = 2;
|
|
48
|
+
}
|
|
49
|
+
// TODO(saltzm): Give a way for the user to distinguish between normal exit
|
|
50
|
+
// and termination by Modal (due to task timeout, exec exceeded deadline, etc.)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message TaskExecStartRequest {
|
|
54
|
+
// The ID of the task to execute the command in.
|
|
55
|
+
string task_id = 1;
|
|
56
|
+
// Execution ID. This ID will be used to identify the execution for other
|
|
57
|
+
// requests and ensure exec commands are idempotent.
|
|
58
|
+
string exec_id = 2;
|
|
59
|
+
// Command arguments to execute.
|
|
60
|
+
repeated string command_args= 3;
|
|
61
|
+
// Configures how the stdout of the command will be handled.
|
|
62
|
+
TaskExecStdoutConfig stdout_config = 4;
|
|
63
|
+
// Configures how the stderr of the command will be handled.
|
|
64
|
+
TaskExecStderrConfig stderr_config = 5;
|
|
65
|
+
// Timeout in seconds for the exec'd command to exit. If the command does not
|
|
66
|
+
// exit within this duration, the command will be killed. This is NOT the
|
|
67
|
+
// timeout for the ExecStartRequest RPC to complete.
|
|
68
|
+
optional uint32 timeout_secs = 6;
|
|
69
|
+
// Working directory for the command.
|
|
70
|
+
optional string workdir = 7;
|
|
71
|
+
// Secret IDs to mount into the task.
|
|
72
|
+
repeated string secret_ids = 8;
|
|
73
|
+
// PTY info for the command.
|
|
74
|
+
optional modal.client.PTYInfo pty_info = 9;
|
|
75
|
+
// Enable debugging capabilities on the container runtime. Used only for
|
|
76
|
+
// internal debugging.
|
|
77
|
+
bool runtime_debug = 10;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message TaskExecStartResponse { }
|
|
81
|
+
|
|
82
|
+
message TaskExecStdinWriteRequest {
|
|
83
|
+
// The ID of the task running the exec'd command.
|
|
84
|
+
string task_id = 1;
|
|
85
|
+
// The execution ID of the command to write to.
|
|
86
|
+
string exec_id = 2;
|
|
87
|
+
// The offset to start writing to. This is used to resume writing from the
|
|
88
|
+
// last write position if the connection is closed and reopened.
|
|
89
|
+
uint64 offset = 3;
|
|
90
|
+
bytes data = 4;
|
|
91
|
+
// If true, close the stdin stream after writing any provided data.
|
|
92
|
+
// This signals EOF to the exec'd process.
|
|
93
|
+
bool eof = 5;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message TaskExecStdinWriteResponse { }
|
|
97
|
+
|
|
98
|
+
message TaskExecStdioReadRequest {
|
|
99
|
+
// The ID of the task running the exec'd command.
|
|
100
|
+
string task_id = 1;
|
|
101
|
+
// The execution ID of the command to read from.
|
|
102
|
+
string exec_id = 2;
|
|
103
|
+
// The offset to start reading from. This is used to resume reading from the
|
|
104
|
+
// last read position if the connection is closed and reopened.
|
|
105
|
+
uint64 offset = 3;
|
|
106
|
+
// Which file descriptor to read from.
|
|
107
|
+
TaskExecStdioFileDescriptor file_descriptor = 4;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message TaskExecStdioReadResponse {
|
|
111
|
+
// The data read from the file descriptor.
|
|
112
|
+
bytes data = 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message TaskExecWaitRequest {
|
|
116
|
+
// The ID of the task running the exec'd command.
|
|
117
|
+
string task_id = 1;
|
|
118
|
+
// The execution ID of the command to wait on.
|
|
119
|
+
string exec_id = 2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
message TaskExecWaitResponse {
|
|
123
|
+
oneof exit_status {
|
|
124
|
+
// The exit code of the command.
|
|
125
|
+
int32 code = 1;
|
|
126
|
+
// The signal that terminated the command.
|
|
127
|
+
int32 signal = 2;
|
|
128
|
+
}
|
|
129
|
+
// TODO(saltzm): Give a way for the user to distinguish between normal exit
|
|
130
|
+
// and termination by Modal (due to task timeout, exec exceeded deadline, etc.)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
service TaskRouter {
|
|
134
|
+
// Poll for the exit status of an exec'd command.
|
|
135
|
+
rpc TaskExecPoll(TaskExecPollRequest) returns (TaskExecPollResponse);
|
|
136
|
+
// Execute a command in the task.
|
|
137
|
+
rpc TaskExecStart(TaskExecStartRequest) returns (TaskExecStartResponse);
|
|
138
|
+
// Write to the stdin stream of an exec'd command.
|
|
139
|
+
rpc TaskExecStdinWrite(TaskExecStdinWriteRequest) returns (TaskExecStdinWriteResponse);
|
|
140
|
+
// Get a stream of output from the stdout or stderr stream of an exec'd command.
|
|
141
|
+
rpc TaskExecStdioRead(TaskExecStdioReadRequest) returns (stream TaskExecStdioReadResponse);
|
|
142
|
+
// Wait for an exec'd command to exit and return the exit code.
|
|
143
|
+
rpc TaskExecWait(TaskExecWaitRequest) returns (TaskExecWaitResponse);
|
|
144
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Generated by the Protocol Buffers compiler. DO NOT EDIT!
|
|
2
|
+
# source: modal_proto/task_command_router.proto
|
|
3
|
+
# plugin: grpclib.plugin.main
|
|
4
|
+
import abc
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import grpclib.const
|
|
8
|
+
import grpclib.client
|
|
9
|
+
if typing.TYPE_CHECKING:
|
|
10
|
+
import grpclib.server
|
|
11
|
+
|
|
12
|
+
import modal_proto.api_pb2
|
|
13
|
+
import modal_proto.task_command_router_pb2
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class TaskRouterBase(abc.ABC):
|
|
17
|
+
|
|
18
|
+
@abc.abstractmethod
|
|
19
|
+
async def TaskExecPoll(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecPollRequest, modal_proto.task_command_router_pb2.TaskExecPollResponse]') -> None:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
@abc.abstractmethod
|
|
23
|
+
async def TaskExecStart(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecStartRequest, modal_proto.task_command_router_pb2.TaskExecStartResponse]') -> None:
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
@abc.abstractmethod
|
|
27
|
+
async def TaskExecStdinWrite(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecStdinWriteRequest, modal_proto.task_command_router_pb2.TaskExecStdinWriteResponse]') -> None:
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
@abc.abstractmethod
|
|
31
|
+
async def TaskExecStdioRead(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecStdioReadRequest, modal_proto.task_command_router_pb2.TaskExecStdioReadResponse]') -> None:
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
@abc.abstractmethod
|
|
35
|
+
async def TaskExecWait(self, stream: 'grpclib.server.Stream[modal_proto.task_command_router_pb2.TaskExecWaitRequest, modal_proto.task_command_router_pb2.TaskExecWaitResponse]') -> None:
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
|
|
39
|
+
return {
|
|
40
|
+
'/modal.task_command_router.TaskRouter/TaskExecPoll': grpclib.const.Handler(
|
|
41
|
+
self.TaskExecPoll,
|
|
42
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
43
|
+
modal_proto.task_command_router_pb2.TaskExecPollRequest,
|
|
44
|
+
modal_proto.task_command_router_pb2.TaskExecPollResponse,
|
|
45
|
+
),
|
|
46
|
+
'/modal.task_command_router.TaskRouter/TaskExecStart': grpclib.const.Handler(
|
|
47
|
+
self.TaskExecStart,
|
|
48
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
49
|
+
modal_proto.task_command_router_pb2.TaskExecStartRequest,
|
|
50
|
+
modal_proto.task_command_router_pb2.TaskExecStartResponse,
|
|
51
|
+
),
|
|
52
|
+
'/modal.task_command_router.TaskRouter/TaskExecStdinWrite': grpclib.const.Handler(
|
|
53
|
+
self.TaskExecStdinWrite,
|
|
54
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
55
|
+
modal_proto.task_command_router_pb2.TaskExecStdinWriteRequest,
|
|
56
|
+
modal_proto.task_command_router_pb2.TaskExecStdinWriteResponse,
|
|
57
|
+
),
|
|
58
|
+
'/modal.task_command_router.TaskRouter/TaskExecStdioRead': grpclib.const.Handler(
|
|
59
|
+
self.TaskExecStdioRead,
|
|
60
|
+
grpclib.const.Cardinality.UNARY_STREAM,
|
|
61
|
+
modal_proto.task_command_router_pb2.TaskExecStdioReadRequest,
|
|
62
|
+
modal_proto.task_command_router_pb2.TaskExecStdioReadResponse,
|
|
63
|
+
),
|
|
64
|
+
'/modal.task_command_router.TaskRouter/TaskExecWait': grpclib.const.Handler(
|
|
65
|
+
self.TaskExecWait,
|
|
66
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
|
67
|
+
modal_proto.task_command_router_pb2.TaskExecWaitRequest,
|
|
68
|
+
modal_proto.task_command_router_pb2.TaskExecWaitResponse,
|
|
69
|
+
),
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class TaskRouterStub:
|
|
74
|
+
|
|
75
|
+
def __init__(self, channel: grpclib.client.Channel) -> None:
|
|
76
|
+
self.TaskExecPoll = grpclib.client.UnaryUnaryMethod(
|
|
77
|
+
channel,
|
|
78
|
+
'/modal.task_command_router.TaskRouter/TaskExecPoll',
|
|
79
|
+
modal_proto.task_command_router_pb2.TaskExecPollRequest,
|
|
80
|
+
modal_proto.task_command_router_pb2.TaskExecPollResponse,
|
|
81
|
+
)
|
|
82
|
+
self.TaskExecStart = grpclib.client.UnaryUnaryMethod(
|
|
83
|
+
channel,
|
|
84
|
+
'/modal.task_command_router.TaskRouter/TaskExecStart',
|
|
85
|
+
modal_proto.task_command_router_pb2.TaskExecStartRequest,
|
|
86
|
+
modal_proto.task_command_router_pb2.TaskExecStartResponse,
|
|
87
|
+
)
|
|
88
|
+
self.TaskExecStdinWrite = grpclib.client.UnaryUnaryMethod(
|
|
89
|
+
channel,
|
|
90
|
+
'/modal.task_command_router.TaskRouter/TaskExecStdinWrite',
|
|
91
|
+
modal_proto.task_command_router_pb2.TaskExecStdinWriteRequest,
|
|
92
|
+
modal_proto.task_command_router_pb2.TaskExecStdinWriteResponse,
|
|
93
|
+
)
|
|
94
|
+
self.TaskExecStdioRead = grpclib.client.UnaryStreamMethod(
|
|
95
|
+
channel,
|
|
96
|
+
'/modal.task_command_router.TaskRouter/TaskExecStdioRead',
|
|
97
|
+
modal_proto.task_command_router_pb2.TaskExecStdioReadRequest,
|
|
98
|
+
modal_proto.task_command_router_pb2.TaskExecStdioReadResponse,
|
|
99
|
+
)
|
|
100
|
+
self.TaskExecWait = grpclib.client.UnaryUnaryMethod(
|
|
101
|
+
channel,
|
|
102
|
+
'/modal.task_command_router.TaskRouter/TaskExecWait',
|
|
103
|
+
modal_proto.task_command_router_pb2.TaskExecWaitRequest,
|
|
104
|
+
modal_proto.task_command_router_pb2.TaskExecWaitResponse,
|
|
105
|
+
)
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: modal_proto/task_command_router.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf.internal import enum_type_wrapper
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import message as _message
|
|
9
|
+
from google.protobuf import reflection as _reflection
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
# @@protoc_insertion_point(imports)
|
|
12
|
+
|
|
13
|
+
_sym_db = _symbol_database.Default()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from modal_proto import api_pb2 as modal__proto_dot_api__pb2
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%modal_proto/task_command_router.proto\x12\x19modal.task_command_router\x1a\x15modal_proto/api.proto\"7\n\x13TaskExecPollRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecPollResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status\"\x92\x03\n\x14TaskExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x46\n\rstdout_config\x18\x04 \x01(\x0e\x32/.modal.task_command_router.TaskExecStdoutConfig\x12\x46\n\rstderr_config\x18\x05 \x01(\x0e\x32/.modal.task_command_router.TaskExecStderrConfig\x12\x19\n\x0ctimeout_secs\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x02\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\x0f\n\r_timeout_secsB\n\n\x08_workdirB\x0b\n\t_pty_info\"\x17\n\x15TaskExecStartResponse\"h\n\x19TaskExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1c\n\x1aTaskExecStdinWriteResponse\"\x9d\x01\n\x18TaskExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12O\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x36.modal.task_command_router.TaskExecStdioFileDescriptor\")\n\x19TaskExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"7\n\x13TaskExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"G\n\x14TaskExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x81\x01\n\x14TaskExecStderrConfig\x12#\n\x1fTASK_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12\"\n\x1eTASK_EXEC_STDERR_CONFIG_STDOUT\x10\x02*u\n\x1bTaskExecStdioFileDescriptor\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12*\n&TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*]\n\x14TaskExecStdoutConfig\x12#\n\x1fTASK_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12 \n\x1cTASK_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xe9\x04\n\nTaskRouter\x12o\n\x0cTaskExecPoll\x12..modal.task_command_router.TaskExecPollRequest\x1a/.modal.task_command_router.TaskExecPollResponse\x12r\n\rTaskExecStart\x12/.modal.task_command_router.TaskExecStartRequest\x1a\x30.modal.task_command_router.TaskExecStartResponse\x12\x81\x01\n\x12TaskExecStdinWrite\x12\x34.modal.task_command_router.TaskExecStdinWriteRequest\x1a\x35.modal.task_command_router.TaskExecStdinWriteResponse\x12\x80\x01\n\x11TaskExecStdioRead\x12\x33.modal.task_command_router.TaskExecStdioReadRequest\x1a\x34.modal.task_command_router.TaskExecStdioReadResponse0\x01\x12o\n\x0cTaskExecWait\x12..modal.task_command_router.TaskExecWaitRequest\x1a/.modal.task_command_router.TaskExecWaitResponseB:Z8github.com/modal-labs/modal/go/proto/task_command_routerb\x06proto3')
|
|
20
|
+
|
|
21
|
+
_TASKEXECSTDERRCONFIG = DESCRIPTOR.enum_types_by_name['TaskExecStderrConfig']
|
|
22
|
+
TaskExecStderrConfig = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDERRCONFIG)
|
|
23
|
+
_TASKEXECSTDIOFILEDESCRIPTOR = DESCRIPTOR.enum_types_by_name['TaskExecStdioFileDescriptor']
|
|
24
|
+
TaskExecStdioFileDescriptor = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDIOFILEDESCRIPTOR)
|
|
25
|
+
_TASKEXECSTDOUTCONFIG = DESCRIPTOR.enum_types_by_name['TaskExecStdoutConfig']
|
|
26
|
+
TaskExecStdoutConfig = enum_type_wrapper.EnumTypeWrapper(_TASKEXECSTDOUTCONFIG)
|
|
27
|
+
TASK_EXEC_STDERR_CONFIG_DEVNULL = 0
|
|
28
|
+
TASK_EXEC_STDERR_CONFIG_PIPE = 1
|
|
29
|
+
TASK_EXEC_STDERR_CONFIG_STDOUT = 2
|
|
30
|
+
TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT = 0
|
|
31
|
+
TASK_EXEC_STDIO_FILE_DESCRIPTOR_STDERR = 1
|
|
32
|
+
TASK_EXEC_STDOUT_CONFIG_DEVNULL = 0
|
|
33
|
+
TASK_EXEC_STDOUT_CONFIG_PIPE = 1
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
_TASKEXECPOLLREQUEST = DESCRIPTOR.message_types_by_name['TaskExecPollRequest']
|
|
37
|
+
_TASKEXECPOLLRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecPollResponse']
|
|
38
|
+
_TASKEXECSTARTREQUEST = DESCRIPTOR.message_types_by_name['TaskExecStartRequest']
|
|
39
|
+
_TASKEXECSTARTRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecStartResponse']
|
|
40
|
+
_TASKEXECSTDINWRITEREQUEST = DESCRIPTOR.message_types_by_name['TaskExecStdinWriteRequest']
|
|
41
|
+
_TASKEXECSTDINWRITERESPONSE = DESCRIPTOR.message_types_by_name['TaskExecStdinWriteResponse']
|
|
42
|
+
_TASKEXECSTDIOREADREQUEST = DESCRIPTOR.message_types_by_name['TaskExecStdioReadRequest']
|
|
43
|
+
_TASKEXECSTDIOREADRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecStdioReadResponse']
|
|
44
|
+
_TASKEXECWAITREQUEST = DESCRIPTOR.message_types_by_name['TaskExecWaitRequest']
|
|
45
|
+
_TASKEXECWAITRESPONSE = DESCRIPTOR.message_types_by_name['TaskExecWaitResponse']
|
|
46
|
+
TaskExecPollRequest = _reflection.GeneratedProtocolMessageType('TaskExecPollRequest', (_message.Message,), {
|
|
47
|
+
'DESCRIPTOR' : _TASKEXECPOLLREQUEST,
|
|
48
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
49
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecPollRequest)
|
|
50
|
+
})
|
|
51
|
+
_sym_db.RegisterMessage(TaskExecPollRequest)
|
|
52
|
+
|
|
53
|
+
TaskExecPollResponse = _reflection.GeneratedProtocolMessageType('TaskExecPollResponse', (_message.Message,), {
|
|
54
|
+
'DESCRIPTOR' : _TASKEXECPOLLRESPONSE,
|
|
55
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
56
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecPollResponse)
|
|
57
|
+
})
|
|
58
|
+
_sym_db.RegisterMessage(TaskExecPollResponse)
|
|
59
|
+
|
|
60
|
+
TaskExecStartRequest = _reflection.GeneratedProtocolMessageType('TaskExecStartRequest', (_message.Message,), {
|
|
61
|
+
'DESCRIPTOR' : _TASKEXECSTARTREQUEST,
|
|
62
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
63
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStartRequest)
|
|
64
|
+
})
|
|
65
|
+
_sym_db.RegisterMessage(TaskExecStartRequest)
|
|
66
|
+
|
|
67
|
+
TaskExecStartResponse = _reflection.GeneratedProtocolMessageType('TaskExecStartResponse', (_message.Message,), {
|
|
68
|
+
'DESCRIPTOR' : _TASKEXECSTARTRESPONSE,
|
|
69
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
70
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStartResponse)
|
|
71
|
+
})
|
|
72
|
+
_sym_db.RegisterMessage(TaskExecStartResponse)
|
|
73
|
+
|
|
74
|
+
TaskExecStdinWriteRequest = _reflection.GeneratedProtocolMessageType('TaskExecStdinWriteRequest', (_message.Message,), {
|
|
75
|
+
'DESCRIPTOR' : _TASKEXECSTDINWRITEREQUEST,
|
|
76
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
77
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdinWriteRequest)
|
|
78
|
+
})
|
|
79
|
+
_sym_db.RegisterMessage(TaskExecStdinWriteRequest)
|
|
80
|
+
|
|
81
|
+
TaskExecStdinWriteResponse = _reflection.GeneratedProtocolMessageType('TaskExecStdinWriteResponse', (_message.Message,), {
|
|
82
|
+
'DESCRIPTOR' : _TASKEXECSTDINWRITERESPONSE,
|
|
83
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
84
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdinWriteResponse)
|
|
85
|
+
})
|
|
86
|
+
_sym_db.RegisterMessage(TaskExecStdinWriteResponse)
|
|
87
|
+
|
|
88
|
+
TaskExecStdioReadRequest = _reflection.GeneratedProtocolMessageType('TaskExecStdioReadRequest', (_message.Message,), {
|
|
89
|
+
'DESCRIPTOR' : _TASKEXECSTDIOREADREQUEST,
|
|
90
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
91
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdioReadRequest)
|
|
92
|
+
})
|
|
93
|
+
_sym_db.RegisterMessage(TaskExecStdioReadRequest)
|
|
94
|
+
|
|
95
|
+
TaskExecStdioReadResponse = _reflection.GeneratedProtocolMessageType('TaskExecStdioReadResponse', (_message.Message,), {
|
|
96
|
+
'DESCRIPTOR' : _TASKEXECSTDIOREADRESPONSE,
|
|
97
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
98
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecStdioReadResponse)
|
|
99
|
+
})
|
|
100
|
+
_sym_db.RegisterMessage(TaskExecStdioReadResponse)
|
|
101
|
+
|
|
102
|
+
TaskExecWaitRequest = _reflection.GeneratedProtocolMessageType('TaskExecWaitRequest', (_message.Message,), {
|
|
103
|
+
'DESCRIPTOR' : _TASKEXECWAITREQUEST,
|
|
104
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
105
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecWaitRequest)
|
|
106
|
+
})
|
|
107
|
+
_sym_db.RegisterMessage(TaskExecWaitRequest)
|
|
108
|
+
|
|
109
|
+
TaskExecWaitResponse = _reflection.GeneratedProtocolMessageType('TaskExecWaitResponse', (_message.Message,), {
|
|
110
|
+
'DESCRIPTOR' : _TASKEXECWAITRESPONSE,
|
|
111
|
+
'__module__' : 'modal_proto.task_command_router_pb2'
|
|
112
|
+
# @@protoc_insertion_point(class_scope:modal.task_command_router.TaskExecWaitResponse)
|
|
113
|
+
})
|
|
114
|
+
_sym_db.RegisterMessage(TaskExecWaitResponse)
|
|
115
|
+
|
|
116
|
+
_TASKROUTER = DESCRIPTOR.services_by_name['TaskRouter']
|
|
117
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
118
|
+
|
|
119
|
+
DESCRIPTOR._options = None
|
|
120
|
+
DESCRIPTOR._serialized_options = b'Z8github.com/modal-labs/modal/go/proto/task_command_router'
|
|
121
|
+
_TASKEXECSTDERRCONFIG._serialized_start=1121
|
|
122
|
+
_TASKEXECSTDERRCONFIG._serialized_end=1250
|
|
123
|
+
_TASKEXECSTDIOFILEDESCRIPTOR._serialized_start=1252
|
|
124
|
+
_TASKEXECSTDIOFILEDESCRIPTOR._serialized_end=1369
|
|
125
|
+
_TASKEXECSTDOUTCONFIG._serialized_start=1371
|
|
126
|
+
_TASKEXECSTDOUTCONFIG._serialized_end=1464
|
|
127
|
+
_TASKEXECPOLLREQUEST._serialized_start=91
|
|
128
|
+
_TASKEXECPOLLREQUEST._serialized_end=146
|
|
129
|
+
_TASKEXECPOLLRESPONSE._serialized_start=148
|
|
130
|
+
_TASKEXECPOLLRESPONSE._serialized_end=219
|
|
131
|
+
_TASKEXECSTARTREQUEST._serialized_start=222
|
|
132
|
+
_TASKEXECSTARTREQUEST._serialized_end=624
|
|
133
|
+
_TASKEXECSTARTRESPONSE._serialized_start=626
|
|
134
|
+
_TASKEXECSTARTRESPONSE._serialized_end=649
|
|
135
|
+
_TASKEXECSTDINWRITEREQUEST._serialized_start=651
|
|
136
|
+
_TASKEXECSTDINWRITEREQUEST._serialized_end=755
|
|
137
|
+
_TASKEXECSTDINWRITERESPONSE._serialized_start=757
|
|
138
|
+
_TASKEXECSTDINWRITERESPONSE._serialized_end=785
|
|
139
|
+
_TASKEXECSTDIOREADREQUEST._serialized_start=788
|
|
140
|
+
_TASKEXECSTDIOREADREQUEST._serialized_end=945
|
|
141
|
+
_TASKEXECSTDIOREADRESPONSE._serialized_start=947
|
|
142
|
+
_TASKEXECSTDIOREADRESPONSE._serialized_end=988
|
|
143
|
+
_TASKEXECWAITREQUEST._serialized_start=990
|
|
144
|
+
_TASKEXECWAITREQUEST._serialized_end=1045
|
|
145
|
+
_TASKEXECWAITRESPONSE._serialized_start=1047
|
|
146
|
+
_TASKEXECWAITRESPONSE._serialized_end=1118
|
|
147
|
+
_TASKROUTER._serialized_start=1467
|
|
148
|
+
_TASKROUTER._serialized_end=2084
|
|
149
|
+
# @@protoc_insertion_point(module_scope)
|