syntax = "proto3"; package buildx.controller.v1; import "github.com/moby/buildkit/api/services/control/control.proto"; import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto"; import "github.com/moby/buildkit/solver/pb/ops.proto"; option go_package = "pb"; service Controller { rpc Build(BuildRequest) returns (BuildResponse); rpc Inspect(InspectRequest) returns (InspectResponse); rpc Status(StatusRequest) returns (stream StatusResponse); rpc Input(stream InputMessage) returns (InputResponse); rpc Invoke(stream Message) returns (stream Message); rpc List(ListRequest) returns (ListResponse); rpc Disconnect(DisconnectRequest) returns (DisconnectResponse); rpc Info(InfoRequest) returns (InfoResponse); rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse); rpc DisconnectProcess(DisconnectProcessRequest) returns (DisconnectProcessResponse); } message ListProcessesRequest { string Ref = 1; } message ListProcessesResponse { repeated ProcessInfo Infos = 1; } message ProcessInfo { string ProcessID = 1; InvokeConfig InvokeConfig = 2; } message DisconnectProcessRequest { string Ref = 1; string ProcessID = 2; } message DisconnectProcessResponse { } message BuildRequest { string Ref = 1; BuildOptions Options = 2; } message Inputs { string ContextPath = 1; string ContextPathHash = 2; string DockerfileName = 3; string DockerfileInline = 4; pb.Definition ContextDefinition = 5; map NamedContexts = 6; // io.Reader InStream = ???; } message BuildOptions { Inputs Inputs = 1; PrintFunc PrintFunc = 2; CommonOptions Opts = 3; repeated string Allow = 4; repeated Attest Attests = 5; map BuildArgs = 6; repeated CacheOptionsEntry CacheFrom = 7; repeated CacheOptionsEntry CacheTo = 8; string CgroupParent = 9; repeated ExportEntry Exports = 10; repeated string ExtraHosts = 11; map Labels = 12; string NetworkMode = 13; repeated string NoCacheFilter = 14; repeated string Platforms = 15; repeated Secret Secrets = 16; int64 ShmSize = 17; repeated SSH SSH = 18; repeated string Tags = 19; string Target = 20; UlimitOpt Ulimits = 21; moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 22; } message NamedContext { string Path = 1; pb.Definition Definition = 2; } message CommonOptions { string Builder = 1; bool NoCache = 2; // string Progress: no progress view on server side bool Pull = 3; bool ExportPush = 4; bool ExportLoad = 5; // TODO: we should remove Linked from the controllerapi, it's only used to // produce a single warning. To allow this, we need to move the default // export detection out from the controller server, as well as load the // driver on the controller client. bool Linked = 6; } message ExportEntry { string Type = 1; map Attrs = 2; string Destination = 3; } message CacheOptionsEntry { string Type = 1; map Attrs = 2; } message Attest { string Type = 1; bool Disabled = 2; string Attrs = 3; } message SSH { string ID = 1; repeated string Paths = 2; } message Secret { string ID = 1; string FilePath = 2; string Env = 3; } message PrintFunc { string Name = 1; string Format = 2; } message InspectRequest { string Ref = 1; } message InspectResponse { BuildOptions Options = 1; } message UlimitOpt { map values = 1; } message Ulimit { string Name = 1; int64 Hard = 2; int64 Soft = 3; } message BuildResponse { map ExporterResponse = 1; } message DisconnectRequest { string Ref = 1; } message DisconnectResponse {} message ListRequest { string Ref = 1; } message ListResponse { repeated string keys = 1; } message InputMessage { oneof Input { InputInitMessage Init = 1; DataMessage Data = 2; } } message InputInitMessage { string Ref = 1; } message DataMessage { bool EOF = 1; // true if eof was reached bytes Data = 2; // should be chunked smaller than 4MB: // https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize } message InputResponse {} message Message { oneof Input { InitMessage Init = 1; // FdMessage used from client to server for input (stdin) and // from server to client for output (stdout, stderr) FdMessage File = 2; // ResizeMessage used from client to server for terminal resize events ResizeMessage Resize = 3; // SignalMessage is used from client to server to send signal events SignalMessage Signal = 4; } } message InitMessage { string Ref = 1; // If ProcessID already exists in the server, it tries to connect to it // instead of invoking the new one. In this case, InvokeConfig will be ignored. string ProcessID = 2; InvokeConfig InvokeConfig = 3; } message InvokeConfig { repeated string Entrypoint = 1; repeated string Cmd = 2; repeated string Env = 3; string User = 4; bool NoUser = 5; // Do not set user but use the image's default string Cwd = 6; bool NoCwd = 7; // Do not set cwd but use the image's default bool Tty = 8; bool Rollback = 9; // Kill all process in the container and recreate it. bool Initial = 10; // Run container from the initial state of that stage (supported only on the failed step) } message FdMessage { uint32 Fd = 1; // what fd the data was from bool EOF = 2; // true if eof was reached bytes Data = 3; // should be chunked smaller than 4MB: // https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize } message ResizeMessage { uint32 Rows = 1; uint32 Cols = 2; } message SignalMessage { // we only send name (ie HUP, INT) because the int values // are platform dependent. string Name = 1; } message StatusRequest { string Ref = 1; } message StatusResponse { repeated moby.buildkit.v1.Vertex vertexes = 1; repeated moby.buildkit.v1.VertexStatus statuses = 2; repeated moby.buildkit.v1.VertexLog logs = 3; repeated moby.buildkit.v1.VertexWarning warnings = 4; } message InfoRequest {} message InfoResponse { BuildxVersion buildxVersion = 1; } message BuildxVersion { string package = 1; string version = 2; string revision = 3; }