micro/runtime/service/proto/runtime.proto

140 lines
2.5 KiB
Protocol Buffer
Raw Normal View History

2019-11-03 01:54:35 +03:00
syntax = "proto3";
package go.micro.runtime;
service Runtime {
rpc Create(CreateRequest) returns (CreateResponse) {};
rpc Read(ReadRequest) returns (ReadResponse) {};
2019-11-03 01:54:35 +03:00
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
rpc Update(UpdateRequest) returns (UpdateResponse) {};
rpc Logs(LogsRequest) returns (stream LogRecord) {};
2019-11-03 01:54:35 +03:00
}
message Service {
// name of the service
string name = 1;
// version of the service
string version = 2;
// git url of the source
string source = 3;
// service metadata
map<string,string> metadata = 4;
2019-11-03 01:54:35 +03:00
}
2019-12-17 21:17:32 +03:00
message Event {
string type = 1;
int64 timestamp = 2;
string service = 3;
string version = 4;
}
message CreateOptions {
2019-11-03 01:54:35 +03:00
// command to pass in
repeated string command = 1;
// args to pass into command
repeated string args = 2;
2019-11-03 01:54:35 +03:00
// environment to pass in
repeated string env = 3;
2019-11-03 01:54:35 +03:00
// output to send to
string output = 4;
// create type of service
string type = 5;
// image to use
string image = 6;
2020-05-11 13:47:59 +03:00
// namespace to use
string namespace = 7;
2019-11-03 01:54:35 +03:00
}
message CreateRequest {
Service service = 1;
CreateOptions options = 2;
2019-11-03 01:54:35 +03:00
}
message CreateResponse {}
message ReadOptions {
2019-11-29 14:35:00 +03:00
// service name
string service = 1;
// version of the service
string version = 2;
// type of service
string type = 3;
2020-05-11 13:47:59 +03:00
// namespace of service
string namespace = 4;
}
message ReadRequest {
ReadOptions options = 1;
}
message ReadResponse {
repeated Service services = 1;
}
2020-05-11 13:47:59 +03:00
message DeleteOptions {
// namespace of the service
string namespace = 1;
}
2019-11-03 01:54:35 +03:00
message DeleteRequest {
Service service = 1;
2020-05-11 13:47:59 +03:00
DeleteOptions options = 2;
2019-11-03 01:54:35 +03:00
}
message DeleteResponse {}
2020-05-11 13:47:59 +03:00
message UpdateOptions {
// namespace of the service
string namespace = 1;
}
2019-11-03 01:54:35 +03:00
message UpdateRequest {
Service service = 1;
2020-05-11 13:47:59 +03:00
UpdateOptions options = 2;
2019-11-03 01:54:35 +03:00
}
message UpdateResponse {}
2020-05-11 13:47:59 +03:00
message ListOptions {
// namespace to list from
string namespace = 1;
}
message ListRequest {
ListOptions options = 1;
}
2019-11-03 01:54:35 +03:00
message ListResponse {
repeated Service services = 1;
}
2020-05-11 13:47:59 +03:00
message LogsOptions {
// namespace of the service
string namespace = 1;
}
message LogsRequest{
// service to request logs for
string service = 1;
// stream records continuously
bool stream = 2;
// count of records to request
int64 count = 3;
// relative time in seconds
// before the current time
// from which to show logs
int64 since = 4;
2020-05-11 13:47:59 +03:00
// options to use
LogsOptions options = 5;
}
message LogRecord {
// timestamp of log record
int64 timestamp = 1;
// record metadata
map<string,string> metadata = 2;
// message
string message = 3;
}