github.com/hernad/nomad@v1.6.112/drivers/shared/executor/proto/executor.proto (about)

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