github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/drivers/shared/executor/proto/executor.proto (about) 1 syntax = "proto3"; 2 package hashicorp.nomad.plugins.executor.proto; 3 option go_package = "proto"; 4 5 import "google/protobuf/timestamp.proto"; 6 import "plugins/drivers/proto/driver.proto"; 7 8 service Executor { 9 rpc Launch(LaunchRequest) returns (LaunchResponse) {} 10 rpc Wait(WaitRequest) returns (WaitResponse) {} 11 rpc Shutdown(ShutdownRequest) returns (ShutdownResponse) {} 12 rpc UpdateResources(UpdateResourcesRequest) returns (UpdateResourcesResponse) {} 13 rpc Version(VersionRequest) returns (VersionResponse) {} 14 rpc Stats(StatsRequest) returns (stream StatsResponse) {} 15 rpc Signal(SignalRequest) returns (SignalResponse) {} 16 rpc Exec(ExecRequest) returns (ExecResponse) {} 17 18 // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE 19 rpc ExecStreaming( 20 stream 21 // buf:lint:ignore RPC_REQUEST_STANDARD_NAME 22 hashicorp.nomad.plugins.drivers.proto.ExecTaskStreamingRequest) 23 returns ( 24 stream 25 // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME 26 hashicorp.nomad.plugins.drivers.proto.ExecTaskStreamingResponse 27 ) {} 28 } 29 30 message LaunchRequest { 31 string cmd = 1; 32 repeated string args = 2; 33 hashicorp.nomad.plugins.drivers.proto.Resources resources = 3; 34 string stdout_path = 4; 35 string stderr_path = 5; 36 repeated string env = 6; 37 string user = 7; 38 string task_dir = 8; 39 bool resource_limits = 9; 40 bool basic_process_cgroup = 10; 41 repeated hashicorp.nomad.plugins.drivers.proto.Mount mounts = 11; 42 repeated hashicorp.nomad.plugins.drivers.proto.Device devices = 12; 43 hashicorp.nomad.plugins.drivers.proto.NetworkIsolationSpec network_isolation = 13; 44 bool no_pivot_root = 14; 45 string default_pid_mode = 15; 46 string default_ipc_mode = 16; 47 string cpuset_cgroup = 17; 48 repeated string allow_caps = 18; 49 repeated string capabilities = 19; 50 } 51 52 message LaunchResponse { 53 ProcessState process = 1; 54 } 55 56 message WaitRequest {} 57 58 message WaitResponse{ 59 ProcessState process = 1; 60 } 61 62 message ShutdownRequest { 63 string signal = 1; 64 int64 grace_period = 2; 65 } 66 67 message ShutdownResponse {} 68 69 message UpdateResourcesRequest{ 70 hashicorp.nomad.plugins.drivers.proto.Resources resources = 1; 71 } 72 73 message UpdateResourcesResponse {} 74 75 message VersionRequest {} 76 77 message VersionResponse{ 78 string version = 1; 79 } 80 81 message StatsRequest { 82 int64 interval = 1; 83 } 84 85 message StatsResponse { 86 hashicorp.nomad.plugins.drivers.proto.TaskStats stats = 1; 87 } 88 89 message SignalRequest { 90 int32 signal = 1; 91 } 92 93 message SignalResponse {} 94 95 message ExecRequest { 96 google.protobuf.Timestamp deadline = 1; 97 string cmd = 2; 98 repeated string args = 3; 99 } 100 101 message ExecResponse { 102 bytes output = 1; 103 int32 exit_code = 2; 104 } 105 106 message ProcessState { 107 int32 pid = 1; 108 int32 exit_code = 2; 109 int32 signal = 3; 110 google.protobuf.Timestamp time = 4; 111 }