2019-11-02 22:54:35 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package go.micro.runtime;
|
|
|
|
|
|
|
|
service Runtime {
|
|
|
|
rpc Create(CreateRequest) returns (CreateResponse) {};
|
2019-11-25 16:31:14 +00:00
|
|
|
rpc Read(ReadRequest) returns (ReadResponse) {};
|
2019-11-02 22:54:35 +00:00
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
|
|
|
|
rpc Update(UpdateRequest) returns (UpdateResponse) {};
|
2020-04-01 15:40:15 +02:00
|
|
|
rpc Logs(LogsRequest) returns (stream LogRecord) {};
|
2019-11-02 22:54:35 +00: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;
|
2020-02-07 12:02:41 +00:00
|
|
|
// service metadata
|
|
|
|
map<string,string> metadata = 4;
|
2019-11-02 22:54:35 +00:00
|
|
|
}
|
|
|
|
|
2019-12-17 18:17:32 +00:00
|
|
|
message Event {
|
|
|
|
string type = 1;
|
|
|
|
int64 timestamp = 2;
|
|
|
|
string service = 3;
|
|
|
|
string version = 4;
|
|
|
|
}
|
|
|
|
|
2019-11-15 13:41:40 +00:00
|
|
|
message CreateOptions {
|
2019-11-02 22:54:35 +00:00
|
|
|
// command to pass in
|
2019-11-15 13:41:40 +00:00
|
|
|
repeated string command = 1;
|
2020-03-13 18:39:59 +00:00
|
|
|
// args to pass into command
|
|
|
|
repeated string args = 2;
|
2019-11-02 22:54:35 +00:00
|
|
|
// environment to pass in
|
2020-03-13 18:39:59 +00:00
|
|
|
repeated string env = 3;
|
2019-11-02 22:54:35 +00:00
|
|
|
// output to send to
|
2020-03-13 18:39:59 +00:00
|
|
|
string output = 4;
|
|
|
|
// create type of service
|
|
|
|
string type = 5;
|
|
|
|
// image to use
|
|
|
|
string image = 6;
|
2020-04-23 14:22:23 +01:00
|
|
|
// image secrets to use
|
|
|
|
repeated string image_pull_secrets = 7;
|
2019-11-02 22:54:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRequest {
|
|
|
|
Service service = 1;
|
2019-11-15 13:41:40 +00:00
|
|
|
CreateOptions options = 2;
|
2019-11-02 22:54:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateResponse {}
|
|
|
|
|
2019-11-25 16:31:14 +00:00
|
|
|
message ReadOptions {
|
2019-11-29 11:35:00 +00:00
|
|
|
// service name
|
|
|
|
string service = 1;
|
|
|
|
// version of the service
|
|
|
|
string version = 2;
|
|
|
|
// type of service
|
|
|
|
string type = 3;
|
2019-11-15 13:41:40 +00:00
|
|
|
}
|
|
|
|
|
2019-11-25 16:31:14 +00:00
|
|
|
message ReadRequest {
|
2020-04-23 13:53:42 +01:00
|
|
|
ReadOptions options = 1;
|
2019-11-15 13:41:40 +00:00
|
|
|
}
|
|
|
|
|
2019-11-25 16:31:14 +00:00
|
|
|
message ReadResponse {
|
2020-04-23 13:53:42 +01:00
|
|
|
repeated Service services = 1;
|
2019-11-15 13:41:40 +00:00
|
|
|
}
|
|
|
|
|
2019-11-02 22:54:35 +00:00
|
|
|
message DeleteRequest {
|
|
|
|
Service service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteResponse {}
|
|
|
|
|
|
|
|
message UpdateRequest {
|
|
|
|
Service service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateResponse {}
|
|
|
|
|
|
|
|
message ListRequest {}
|
|
|
|
|
|
|
|
message ListResponse {
|
|
|
|
repeated Service services = 1;
|
|
|
|
}
|
2020-04-01 15:40:15 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LogRecord {
|
|
|
|
// timestamp of log record
|
2020-04-23 13:53:42 +01:00
|
|
|
int64 timestamp = 1;
|
|
|
|
// record metadata
|
|
|
|
map<string,string> metadata = 2;
|
|
|
|
// message
|
|
|
|
string message = 3;
|
2020-04-01 15:40:15 +02:00
|
|
|
}
|
|
|
|
|