github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/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  }
    48  
    49  message LaunchResponse {
    50      ProcessState process = 1;
    51  }
    52  
    53  message WaitRequest {}
    54  
    55  message WaitResponse{
    56      ProcessState process = 1;
    57  }
    58  
    59  message ShutdownRequest {
    60      string signal = 1;
    61      int64 grace_period = 2;
    62  }
    63  
    64  message ShutdownResponse {}
    65  
    66  message UpdateResourcesRequest{
    67      hashicorp.nomad.plugins.drivers.proto.Resources resources = 1;
    68  }
    69  
    70  message UpdateResourcesResponse {}
    71  
    72  message VersionRequest {}
    73  
    74  message VersionResponse{
    75      string version = 1;
    76  }
    77  
    78  message StatsRequest {
    79      int64 interval = 1;
    80  }
    81  
    82  message StatsResponse {
    83      hashicorp.nomad.plugins.drivers.proto.TaskStats stats = 1;
    84  }
    85  
    86  message SignalRequest {
    87      int32 signal = 1;
    88  }
    89  
    90  message SignalResponse {}
    91  
    92  message ExecRequest {
    93      google.protobuf.Timestamp deadline = 1;
    94      string cmd = 2;
    95      repeated string args = 3;
    96  }
    97  
    98  message ExecResponse {
    99      bytes output = 1;
   100      int32 exit_code = 2;
   101  }
   102  
   103  message ProcessState {
   104      int32 pid = 1;
   105      int32 exit_code = 2;
   106      int32 signal = 3;
   107      google.protobuf.Timestamp time = 4;
   108  }