114 lines
1.8 KiB
Protocol Buffer
114 lines
1.8 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
|
||
|
package buildr.rpc.v1;
|
||
|
|
||
|
import "rpc/v1/spec.proto";
|
||
|
|
||
|
message Buildr {
|
||
|
message Repo {
|
||
|
string root = 1;
|
||
|
}
|
||
|
message GitHub {
|
||
|
string api_token = 1;
|
||
|
}
|
||
|
|
||
|
Repo repo = 1;
|
||
|
GitHub github = 2;
|
||
|
string bin_dir = 3;
|
||
|
string out_dir = 4;
|
||
|
}
|
||
|
|
||
|
message TaskReference {
|
||
|
string id = 1;
|
||
|
string name = 2;
|
||
|
ModuleReference module = 3;
|
||
|
}
|
||
|
|
||
|
message StartTaskRequest {
|
||
|
TaskReference reference = 1;
|
||
|
Buildr buildr = 2;
|
||
|
ModuleSpec spec = 3;
|
||
|
}
|
||
|
|
||
|
message TaskResult {
|
||
|
string error = 1;
|
||
|
string modified_files_archive_path = 2;
|
||
|
}
|
||
|
|
||
|
enum TaskOutputSource {
|
||
|
TASK_OUTPUT_SOURCE_UNSPECIFIED = 0;
|
||
|
TASK_OUTPUT_SOURCE_STDOUT = 1;
|
||
|
TASK_OUTPUT_SOURCE_STDERR = 2;
|
||
|
}
|
||
|
|
||
|
message TaskOutput {
|
||
|
TaskOutputSource source = 1;
|
||
|
bytes payload = 2;
|
||
|
}
|
||
|
|
||
|
message TaskLog {
|
||
|
message LogAttribute {
|
||
|
string key = 1;
|
||
|
string value = 2;
|
||
|
}
|
||
|
|
||
|
int64 time = 1;
|
||
|
string message = 2;
|
||
|
int32 level = 3;
|
||
|
repeated LogAttribute attributes = 4;
|
||
|
}
|
||
|
|
||
|
message SetState {
|
||
|
bytes key = 1;
|
||
|
bytes data = 2;
|
||
|
}
|
||
|
|
||
|
message GetStateRequest {
|
||
|
bytes key = 1;
|
||
|
}
|
||
|
|
||
|
message GetStateResponse {
|
||
|
bytes key = 1;
|
||
|
bytes data = 2;
|
||
|
}
|
||
|
|
||
|
message Result {
|
||
|
bool success = 1;
|
||
|
string error = 2;
|
||
|
}
|
||
|
|
||
|
message PluginInventory {
|
||
|
repeated ModuleReference modules = 1;
|
||
|
}
|
||
|
|
||
|
message ExecutionClientMessage {
|
||
|
oneof meta {
|
||
|
bytes message_id = 1;
|
||
|
bytes replies_to = 2;
|
||
|
}
|
||
|
|
||
|
oneof envelope {
|
||
|
StartTaskRequest start_task = 11;
|
||
|
GetStateResponse get_state = 12;
|
||
|
Result error = 13;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
message ExecutionServerMessage {
|
||
|
oneof meta {
|
||
|
bytes message_id = 1;
|
||
|
bytes replies_to = 2;
|
||
|
}
|
||
|
|
||
|
oneof envelope {
|
||
|
TaskResult task_result = 11;
|
||
|
TaskLog task_log = 12;
|
||
|
TaskOutput task_output = 13;
|
||
|
GetStateRequest get_state = 14;
|
||
|
SetState set_state = 15;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
service ExecutorService {
|
||
|
rpc ExecuteStream(stream ExecutionClientMessage) returns (stream ExecutionServerMessage);
|
||
|
}
|