buildkit/api/services/control/control.proto

67 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package control;
service Control {
rpc DiskUsage(DiskUsageRequest) returns (DiskUsageResponse);
rpc Solve(SolveRequest) returns (SolveResponse);
rpc Status(StatusRequest) returns (stream StatusResponse);
}
message DiskUsageRequest {
}
message DiskUsageResponse {
repeated UsageRecord record = 1;
}
message UsageRecord {
string ID = 1;
bool Mutable = 2;
bool InUse = 3;
int64 Size = 4;
}
message SolveRequest {
string Ref = 1;
repeated bytes Definition = 2; // TODO: remove repeated
}
message SolveResponse {
repeated Vertex vtx = 1;
}
message StatusRequest {
string Ref = 1;
}
message StatusResponse {
repeated Vertex vertexes = 1;
repeated VertexStatus statuses = 2;
repeated VertexLog logs = 3;
}
message Vertex {
string ID = 1;
repeated string inputs = 2;
string name = 3;
bool cached = 4;
int64 started = 5; // relative, add abolute google.protobuf.Timestamp as well?
int64 completed = 6;
}
message VertexStatus {
string ID = 1;
string vertex = 2;
string name = 3;
int64 current = 4;
int64 total = 5;
}
message VertexLog {
int64 inc = 1;
int64 timestamp = 2;
int64 stream = 3;
bytes msg = 4;
}