2019-11-03 01:54:35 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package go.micro.runtime;
|
|
|
|
|
|
|
|
service Runtime {
|
|
|
|
rpc Create(CreateRequest) returns (CreateResponse) {};
|
2019-11-25 19:31:14 +03:00
|
|
|
rpc Read(ReadRequest) returns (ReadResponse) {};
|
2019-11-03 01:54:35 +03:00
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
|
|
|
|
rpc Update(UpdateRequest) returns (UpdateResponse) {};
|
|
|
|
rpc List(ListRequest) returns (ListResponse) {};
|
|
|
|
}
|
|
|
|
|
|
|
|
message Service {
|
|
|
|
// name of the service
|
|
|
|
string name = 1;
|
|
|
|
// version of the service
|
|
|
|
string version = 2;
|
|
|
|
// git url of the source
|
|
|
|
string source = 3;
|
2019-11-22 20:10:00 +03:00
|
|
|
// service metadata
|
2019-11-29 14:35:00 +03:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-11-15 16:41:40 +03:00
|
|
|
message CreateOptions {
|
2019-11-03 01:54:35 +03:00
|
|
|
// command to pass in
|
2019-11-15 16:41:40 +03:00
|
|
|
repeated string command = 1;
|
2019-11-03 01:54:35 +03:00
|
|
|
// environment to pass in
|
|
|
|
repeated string env = 2;
|
|
|
|
// output to send to
|
|
|
|
string output = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRequest {
|
|
|
|
Service service = 1;
|
2019-11-15 16:41:40 +03:00
|
|
|
CreateOptions options = 2;
|
2019-11-03 01:54:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateResponse {}
|
|
|
|
|
2019-11-25 19:31:14 +03:00
|
|
|
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;
|
2019-11-15 16:41:40 +03:00
|
|
|
}
|
|
|
|
|
2019-11-25 19:31:14 +03:00
|
|
|
message ReadRequest {
|
2019-11-29 14:35:00 +03:00
|
|
|
ReadOptions options = 1;
|
2019-11-15 16:41:40 +03:00
|
|
|
}
|
|
|
|
|
2019-11-25 19:31:14 +03:00
|
|
|
message ReadResponse {
|
2019-11-15 16:41:40 +03:00
|
|
|
repeated Service services = 1;
|
|
|
|
}
|
|
|
|
|
2019-11-03 01:54:35 +03:00
|
|
|
message DeleteRequest {
|
|
|
|
Service service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteResponse {}
|
|
|
|
|
|
|
|
message UpdateRequest {
|
|
|
|
Service service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateResponse {}
|
|
|
|
|
|
|
|
message ListRequest {}
|
|
|
|
|
|
|
|
message ListResponse {
|
|
|
|
repeated Service services = 1;
|
|
|
|
}
|