2017-06-08 00:53:36 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2017-06-14 00:40:15 +00:00
|
|
|
package moby.buildkit.v1;
|
|
|
|
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
|
|
|
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-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-06-08 00:53:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DiskUsageRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiskUsageResponse {
|
|
|
|
repeated UsageRecord record = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UsageRecord {
|
|
|
|
string ID = 1;
|
|
|
|
bool Mutable = 2;
|
|
|
|
bool InUse = 3;
|
|
|
|
int64 Size = 4;
|
|
|
|
}
|
|
|
|
|
2017-06-08 22:56:44 +00:00
|
|
|
message SolveRequest {
|
|
|
|
string Ref = 1;
|
|
|
|
repeated bytes Definition = 2; // TODO: remove repeated
|
2017-07-10 20:03:38 +00:00
|
|
|
string Exporter = 3;
|
|
|
|
map<string, string> ExporterAttrs = 4;
|
2017-06-08 22:56:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SolveResponse {
|
2017-06-13 21:42:51 +00:00
|
|
|
repeated Vertex vtx = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|