github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/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 "github.com/hashicorp/nomad/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 rpc ExecStreaming(stream hashicorp.nomad.plugins.drivers.proto.ExecTaskStreamingRequest) returns (stream hashicorp.nomad.plugins.drivers.proto.ExecTaskStreamingResponse) {} 18 } 19 20 message LaunchRequest { 21 string cmd = 1; 22 repeated string args = 2; 23 hashicorp.nomad.plugins.drivers.proto.Resources resources = 3; 24 string stdout_path = 4; 25 string stderr_path = 5; 26 repeated string env = 6; 27 string user = 7; 28 string task_dir = 8; 29 bool resource_limits = 9; 30 bool basic_process_cgroup = 10; 31 repeated hashicorp.nomad.plugins.drivers.proto.Mount mounts = 11; 32 repeated hashicorp.nomad.plugins.drivers.proto.Device devices = 12; 33 hashicorp.nomad.plugins.drivers.proto.NetworkIsolationSpec network_isolation = 13; 34 bool no_pivot_root = 14; 35 } 36 37 message LaunchResponse { 38 ProcessState process = 1; 39 } 40 41 message WaitRequest {} 42 43 message WaitResponse{ 44 ProcessState process = 1; 45 } 46 47 message ShutdownRequest { 48 string signal = 1; 49 int64 grace_period = 2; 50 } 51 52 message ShutdownResponse {} 53 54 message UpdateResourcesRequest{ 55 hashicorp.nomad.plugins.drivers.proto.Resources resources = 1; 56 } 57 58 message UpdateResourcesResponse {} 59 60 message VersionRequest {} 61 62 message VersionResponse{ 63 string version = 1; 64 } 65 66 message StatsRequest { 67 int64 interval = 1; 68 } 69 70 message StatsResponse { 71 hashicorp.nomad.plugins.drivers.proto.TaskStats stats = 1; 72 } 73 74 message SignalRequest { 75 int32 signal = 1; 76 } 77 78 message SignalResponse {} 79 80 message ExecRequest { 81 google.protobuf.Timestamp deadline = 1; 82 string cmd = 2; 83 repeated string args = 3; 84 } 85 86 message ExecResponse { 87 bytes output = 1; 88 int32 exit_code = 2; 89 } 90 91 message ProcessState { 92 int32 pid = 1; 93 int32 exit_code = 2; 94 int32 signal = 3; 95 google.protobuf.Timestamp time = 4; 96 }