2019-11-02 22:54:35 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package go.micro.runtime;
|
|
|
|
|
|
|
|
service Runtime {
|
|
|
|
rpc Create(CreateRequest) returns (CreateResponse) {};
|
2019-11-15 13:41:40 +00:00
|
|
|
rpc Get(GetRequest) returns (GetResponse) {};
|
2019-11-02 22:54:35 +00: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;
|
|
|
|
// local path of the source
|
|
|
|
string path = 4;
|
|
|
|
// command to execute
|
2019-11-19 19:36:29 +00:00
|
|
|
repeated string exec = 5;
|
2019-11-02 22:54:35 +00:00
|
|
|
}
|
|
|
|
|
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;
|
2019-11-02 22:54:35 +00:00
|
|
|
// environment to pass in
|
|
|
|
repeated string env = 2;
|
|
|
|
// output to send to
|
|
|
|
string output = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
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-15 13:41:40 +00:00
|
|
|
message GetOptions {
|
|
|
|
// version of the service
|
|
|
|
string version = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetRequest {
|
|
|
|
string name = 1;
|
|
|
|
GetOptions options = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetResponse {
|
|
|
|
repeated Service services = 1;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|