2017-06-08 00:53:36 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2017-06-14 00:40:15 +00:00
|
|
|
package moby.buildkit.v1;
|
|
|
|
|
2018-06-25 23:25:59 +00:00
|
|
|
// The control API is currently considered experimental and may break in a backwards
|
|
|
|
// incompatible way.
|
|
|
|
|
2017-06-14 00:40:15 +00:00
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
2017-10-02 04:59:34 +00:00
|
|
|
import "github.com/moby/buildkit/solver/pb/ops.proto";
|
2018-06-30 01:35:39 +00:00
|
|
|
import "github.com/moby/buildkit/api/types/worker.proto";
|
2017-06-14 00:40:15 +00:00
|
|
|
|
|
|
|
option (gogoproto.sizer_all) = true;
|
|
|
|
option (gogoproto.marshaler_all) = true;
|
|
|
|
option (gogoproto.unmarshaler_all) = true;
|
2017-06-08 00:53:36 +00:00
|
|
|
|
|
|
|
service Control {
|
|
|
|
rpc DiskUsage(DiskUsageRequest) returns (DiskUsageResponse);
|
2017-12-27 01:22:50 +00:00
|
|
|
rpc Prune(PruneRequest) returns (stream UsageRecord);
|
2017-06-08 22:56:44 +00:00
|
|
|
rpc Solve(SolveRequest) returns (SolveResponse);
|
2017-06-13 21:42:51 +00:00
|
|
|
rpc Status(StatusRequest) returns (stream StatusResponse);
|
2017-07-11 17:12:12 +00:00
|
|
|
rpc Session(stream BytesMessage) returns (stream BytesMessage);
|
2017-12-19 09:34:34 +00:00
|
|
|
rpc ListWorkers(ListWorkersRequest) returns (ListWorkersResponse);
|
2018-06-25 18:43:33 +00:00
|
|
|
// rpc Info(InfoRequest) returns (InfoResponse);
|
2017-06-08 00:53:36 +00:00
|
|
|
}
|
|
|
|
|
2017-12-27 01:22:50 +00:00
|
|
|
message PruneRequest {
|
2018-07-31 20:14:53 +00:00
|
|
|
repeated string filter = 1;
|
2018-07-26 22:31:35 +00:00
|
|
|
bool all = 2;
|
2018-07-31 20:14:53 +00:00
|
|
|
int64 keepDuration = 3 [(gogoproto.nullable) = true];
|
|
|
|
int64 keepBytes = 4 [(gogoproto.nullable) = true];
|
2017-12-27 01:22:50 +00:00
|
|
|
}
|
|
|
|
|
2017-06-08 00:53:36 +00:00
|
|
|
message DiskUsageRequest {
|
2018-07-26 00:01:37 +00:00
|
|
|
repeated string filter = 1;
|
2017-06-08 00:53:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DiskUsageResponse {
|
|
|
|
repeated UsageRecord record = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UsageRecord {
|
|
|
|
string ID = 1;
|
|
|
|
bool Mutable = 2;
|
|
|
|
bool InUse = 3;
|
|
|
|
int64 Size = 4;
|
2017-07-25 19:11:52 +00:00
|
|
|
string Parent = 5;
|
|
|
|
google.protobuf.Timestamp CreatedAt = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
google.protobuf.Timestamp LastUsedAt = 7 [(gogoproto.stdtime) = true];
|
|
|
|
int64 UsageCount = 8;
|
|
|
|
string Description = 9;
|
2018-07-26 19:07:52 +00:00
|
|
|
string RecordType = 10;
|
2018-07-27 00:53:48 +00:00
|
|
|
bool Shared = 11;
|
2017-06-08 00:53:36 +00:00
|
|
|
}
|
|
|
|
|
2017-06-08 22:56:44 +00:00
|
|
|
message SolveRequest {
|
|
|
|
string Ref = 1;
|
2017-10-02 04:59:34 +00:00
|
|
|
pb.Definition Definition = 2;
|
2017-07-10 20:03:38 +00:00
|
|
|
string Exporter = 3;
|
|
|
|
map<string, string> ExporterAttrs = 4;
|
2017-07-11 17:12:12 +00:00
|
|
|
string Session = 5;
|
2017-08-25 20:08:18 +00:00
|
|
|
string Frontend = 6;
|
|
|
|
map<string, string> FrontendAttrs = 7;
|
2017-10-13 18:54:26 +00:00
|
|
|
CacheOptions Cache = 8 [(gogoproto.nullable) = false];
|
2018-08-04 19:42:01 +00:00
|
|
|
repeated string Entitlements = 9 [(gogoproto.customtype) = "github.com/moby/buildkit/util/entitlements.Entitlement" ];
|
2020-02-07 19:53:18 +00:00
|
|
|
map<string, pb.Definition> FrontendInputs = 10;
|
2017-10-13 18:54:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CacheOptions {
|
2018-09-11 08:02:46 +00:00
|
|
|
// ExportRefDeprecated is deprecated in favor or the new Exports since BuildKit v0.4.0.
|
|
|
|
// When ExportRefDeprecated is set, the solver appends
|
|
|
|
// {.Type = "registry", .Attrs = ExportAttrs.add("ref", ExportRef)}
|
|
|
|
// to Exports for compatibility. (planned to be removed)
|
|
|
|
string ExportRefDeprecated = 1;
|
|
|
|
// ImportRefsDeprecated is deprecated in favor or the new Imports since BuildKit v0.4.0.
|
|
|
|
// When ImportRefsDeprecated is set, the solver appends
|
|
|
|
// {.Type = "registry", .Attrs = {"ref": importRef}}
|
|
|
|
// for each of the ImportRefs entry to Imports for compatibility. (planned to be removed)
|
|
|
|
repeated string ImportRefsDeprecated = 2;
|
|
|
|
// ExportAttrsDeprecated is deprecated since BuildKit v0.4.0.
|
|
|
|
// See the description of ExportRefDeprecated.
|
|
|
|
map<string, string> ExportAttrsDeprecated = 3;
|
|
|
|
// Exports was introduced in BuildKit v0.4.0.
|
|
|
|
repeated CacheOptionsEntry Exports = 4;
|
|
|
|
// Imports was introduced in BuildKit v0.4.0.
|
|
|
|
repeated CacheOptionsEntry Imports = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CacheOptionsEntry {
|
|
|
|
// Type is like "registry" or "local"
|
|
|
|
string Type = 1;
|
|
|
|
// Attrs are like mode=(min,max), ref=example.com:5000/foo/bar .
|
|
|
|
// See cache importer/exporter implementations' documentation.
|
|
|
|
map<string, string> Attrs = 2;
|
2017-06-08 22:56:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SolveResponse {
|
2018-05-03 00:35:07 +00:00
|
|
|
map<string, string> ExporterResponse = 1;
|
2017-06-13 21:42:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message StatusRequest {
|
|
|
|
string Ref = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StatusResponse {
|
2017-06-14 00:15:55 +00:00
|
|
|
repeated Vertex vertexes = 1;
|
|
|
|
repeated VertexStatus statuses = 2;
|
|
|
|
repeated VertexLog logs = 3;
|
2017-06-13 21:42:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Vertex {
|
2017-06-14 00:40:15 +00:00
|
|
|
string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
|
|
|
repeated string inputs = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
2017-06-13 21:42:51 +00:00
|
|
|
string name = 3;
|
2017-06-14 00:15:55 +00:00
|
|
|
bool cached = 4;
|
2017-06-14 00:40:15 +00:00
|
|
|
google.protobuf.Timestamp started = 5 [(gogoproto.stdtime) = true ];
|
|
|
|
google.protobuf.Timestamp completed = 6 [(gogoproto.stdtime) = true ];
|
2017-06-29 22:31:08 +00:00
|
|
|
string error = 7; // typed errors?
|
2017-06-08 22:56:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message VertexStatus {
|
2017-06-13 21:42:51 +00:00
|
|
|
string ID = 1;
|
2017-06-14 00:40:15 +00:00
|
|
|
string vertex = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
2017-06-13 21:42:51 +00:00
|
|
|
string name = 3;
|
|
|
|
int64 current = 4;
|
|
|
|
int64 total = 5;
|
2017-06-15 23:08:20 +00:00
|
|
|
// TODO: add started, completed
|
2017-06-14 00:40:15 +00:00
|
|
|
google.protobuf.Timestamp timestamp = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2017-06-15 23:08:20 +00:00
|
|
|
google.protobuf.Timestamp started = 7 [(gogoproto.stdtime) = true ];
|
|
|
|
google.protobuf.Timestamp completed = 8 [(gogoproto.stdtime) = true ];
|
2017-06-13 21:42:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message VertexLog {
|
2017-06-14 00:40:15 +00:00
|
|
|
string vertex = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
|
|
|
google.protobuf.Timestamp timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2017-06-13 21:42:51 +00:00
|
|
|
int64 stream = 3;
|
|
|
|
bytes msg = 4;
|
2017-06-08 22:56:44 +00:00
|
|
|
}
|
2017-07-11 17:12:12 +00:00
|
|
|
|
|
|
|
message BytesMessage {
|
|
|
|
bytes data = 1;
|
2017-12-19 09:34:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListWorkersRequest {
|
|
|
|
repeated string filter = 1; // containerd style
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListWorkersResponse {
|
2018-06-30 01:35:39 +00:00
|
|
|
repeated moby.buildkit.v1.types.WorkerRecord record = 1;
|
2018-09-11 08:02:46 +00:00
|
|
|
}
|