github.com/pdmccormick/importable-docker-buildx@v0.0.0-20240426161518-e47091289030/controller/pb/controller.proto (about)

     1  syntax = "proto3";
     2  
     3  package buildx.controller.v1;
     4  
     5  import "github.com/moby/buildkit/api/services/control/control.proto";
     6  import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto";
     7  
     8  option go_package = "pb";
     9  
    10  service Controller {
    11    rpc Build(BuildRequest) returns (BuildResponse);
    12    rpc Inspect(InspectRequest) returns (InspectResponse);
    13    rpc Status(StatusRequest) returns (stream StatusResponse);
    14    rpc Input(stream InputMessage) returns (InputResponse);
    15    rpc Invoke(stream Message) returns (stream Message);
    16    rpc List(ListRequest) returns (ListResponse);
    17    rpc Disconnect(DisconnectRequest) returns (DisconnectResponse);
    18    rpc Info(InfoRequest) returns (InfoResponse);
    19    rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse);
    20    rpc DisconnectProcess(DisconnectProcessRequest) returns (DisconnectProcessResponse);
    21  }
    22  
    23  message ListProcessesRequest {
    24    string Ref = 1;
    25  }
    26  
    27  message ListProcessesResponse {
    28    repeated ProcessInfo Infos = 1;
    29  }
    30  
    31  message ProcessInfo {
    32    string ProcessID = 1;
    33    InvokeConfig InvokeConfig = 2;
    34  }
    35  
    36  message DisconnectProcessRequest {
    37    string Ref = 1;
    38    string ProcessID = 2;
    39  }
    40  
    41  message DisconnectProcessResponse {
    42  }
    43  
    44  message BuildRequest {
    45    string Ref = 1;
    46    BuildOptions Options = 2;
    47  }
    48  
    49  message BuildOptions {
    50    string ContextPath = 1;
    51    string DockerfileName = 2;
    52    PrintFunc PrintFunc = 3;
    53    map<string, string> NamedContexts = 4;
    54  
    55    repeated string Allow = 5;
    56    repeated Attest Attests = 6;
    57    map<string, string> BuildArgs = 7;
    58    repeated CacheOptionsEntry CacheFrom = 8;
    59    repeated CacheOptionsEntry CacheTo = 9;
    60    string CgroupParent = 10;
    61    repeated ExportEntry Exports = 11;
    62    repeated string ExtraHosts = 12;
    63    map<string, string> Labels = 13;
    64    string NetworkMode = 14;
    65    repeated string NoCacheFilter = 15;
    66    repeated string Platforms = 16;
    67    repeated Secret Secrets = 17;
    68    int64 ShmSize = 18;
    69    repeated SSH SSH = 19;
    70    repeated string Tags = 20;
    71    string Target = 21;
    72    UlimitOpt Ulimits = 22;
    73  
    74    string Builder = 23;
    75    bool NoCache = 24;
    76    bool Pull = 25;
    77    bool ExportPush = 26;
    78    bool ExportLoad = 27;
    79    moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 28;
    80    string Ref = 29;
    81    string GroupRef = 30;
    82    repeated string Annotations = 31;
    83    bool WithProvenanceResponse = 32;
    84  }
    85  
    86  message ExportEntry {
    87    string Type = 1;
    88    map<string, string> Attrs = 2;
    89    string Destination = 3;
    90  }
    91  
    92  message CacheOptionsEntry {
    93    string Type = 1;
    94    map<string, string> Attrs = 2;
    95  }
    96  
    97  message Attest {
    98    string Type = 1;
    99    bool Disabled = 2;
   100    string Attrs = 3;
   101  }
   102  
   103  message SSH {
   104    string ID = 1;
   105    repeated string Paths = 2;
   106  }
   107  
   108  message Secret {
   109    string ID = 1;
   110    string FilePath = 2;
   111    string Env = 3;
   112  }
   113  
   114  message PrintFunc {
   115    string Name = 1;
   116    string Format = 2;
   117    bool IgnoreStatus = 3;
   118  }
   119  
   120  message InspectRequest {
   121    string Ref = 1;
   122  }
   123  
   124  message InspectResponse {
   125    BuildOptions Options = 1;
   126  }
   127  
   128  message UlimitOpt {
   129    map<string, Ulimit> values = 1;
   130  }
   131  
   132  message Ulimit {
   133    string Name = 1;
   134    int64 Hard = 2;
   135    int64 Soft = 3;
   136  }
   137  
   138  message BuildResponse {
   139  	map<string, string> ExporterResponse = 1;
   140  }
   141  
   142  message DisconnectRequest {
   143    string Ref = 1;
   144  }
   145  
   146  message DisconnectResponse {}
   147  
   148  message ListRequest {
   149    string Ref = 1;
   150  }
   151  
   152  message ListResponse {
   153    repeated string keys = 1;
   154  }
   155  
   156  message InputMessage {
   157    oneof Input {
   158      InputInitMessage Init = 1;
   159      DataMessage Data = 2;
   160    }
   161  }
   162  
   163  message InputInitMessage {
   164    string Ref = 1;
   165  }
   166  
   167  message DataMessage {
   168    bool EOF = 1;    // true if eof was reached
   169    bytes Data = 2;  // should be chunked smaller than 4MB:
   170                     // https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize
   171  }
   172  
   173  message InputResponse {}
   174  
   175  message Message {
   176    oneof Input {
   177      InitMessage Init = 1;
   178      // FdMessage used from client to server for input (stdin) and
   179      // from server to client for output (stdout, stderr)
   180      FdMessage File = 2;
   181      // ResizeMessage used from client to server for terminal resize events
   182      ResizeMessage Resize = 3;
   183      // SignalMessage is used from client to server to send signal events
   184      SignalMessage Signal = 4;
   185    }
   186  }
   187  
   188  message InitMessage {
   189    string Ref = 1;
   190  
   191    // If ProcessID already exists in the server, it tries to connect to it
   192    // instead of invoking the new one. In this case, InvokeConfig will be ignored.
   193    string ProcessID = 2;
   194    InvokeConfig InvokeConfig = 3;
   195  }
   196  
   197  message InvokeConfig {
   198    repeated string Entrypoint = 1;
   199    repeated string Cmd = 2;
   200    bool NoCmd = 11; // Do not set cmd but use the image's default
   201    repeated string Env = 3;
   202    string User = 4;
   203    bool NoUser = 5; // Do not set user but use the image's default
   204    string Cwd = 6;
   205    bool NoCwd = 7; // Do not set cwd but use the image's default
   206    bool Tty = 8;
   207    bool Rollback = 9; // Kill all process in the container and recreate it.
   208    bool Initial = 10; // Run container from the initial state of that stage (supported only on the failed step)
   209  }
   210  
   211  message FdMessage {
   212    uint32 Fd = 1;   // what fd the data was from
   213    bool EOF = 2;    // true if eof was reached
   214    bytes Data = 3;  // should be chunked smaller than 4MB:
   215                     // https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize
   216  }
   217  
   218  message ResizeMessage {
   219    uint32 Rows = 1;
   220    uint32 Cols = 2;
   221  }
   222  
   223  message SignalMessage {
   224    // we only send name (ie HUP, INT) because the int values
   225    // are platform dependent.
   226    string Name = 1;
   227  }
   228  
   229  message StatusRequest {
   230    string Ref = 1;
   231  }
   232  
   233  message StatusResponse {
   234    repeated moby.buildkit.v1.Vertex vertexes = 1;
   235    repeated moby.buildkit.v1.VertexStatus statuses = 2;
   236    repeated moby.buildkit.v1.VertexLog logs = 3;
   237    repeated moby.buildkit.v1.VertexWarning warnings = 4;
   238  }
   239  
   240  message InfoRequest {}
   241  
   242  message InfoResponse {
   243    BuildxVersion buildxVersion = 1;
   244  }
   245  
   246  message BuildxVersion {
   247    string package = 1;
   248    string version = 2;
   249    string revision = 3;
   250  }