github.com/bigcommerce/nomad@v0.9.3-bc/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  }
    34  
    35  message LaunchResponse {
    36      ProcessState process = 1;
    37  }
    38  
    39  message WaitRequest {}
    40  
    41  message WaitResponse{
    42      ProcessState process = 1;
    43  }
    44  
    45  message ShutdownRequest {
    46      string signal = 1;
    47      int64 grace_period = 2;
    48  }
    49  
    50  message ShutdownResponse {}
    51  
    52  message UpdateResourcesRequest{
    53      hashicorp.nomad.plugins.drivers.proto.Resources resources = 1;
    54  }
    55  
    56  message UpdateResourcesResponse {}
    57  
    58  message VersionRequest {}
    59  
    60  message VersionResponse{
    61      string version = 1;
    62  }
    63  
    64  message StatsRequest {
    65      int64 interval = 1;
    66  }
    67  
    68  message StatsResponse {
    69      hashicorp.nomad.plugins.drivers.proto.TaskStats stats = 1;
    70  }
    71  
    72  message SignalRequest {
    73      int32 signal = 1;
    74  }
    75  
    76  message SignalResponse {}
    77  
    78  message ExecRequest {
    79      google.protobuf.Timestamp deadline = 1;
    80      string cmd = 2;
    81      repeated string args = 3;
    82  }
    83  
    84  message ExecResponse {
    85      bytes output = 1;
    86      int32 exit_code = 2;
    87  }
    88  
    89  message ProcessState {
    90      int32 pid = 1;
    91      int32 exit_code = 2;
    92      int32 signal = 3;
    93      google.protobuf.Timestamp time = 4;
    94  }