micro/runtime/service/proto/runtime.proto
ben-toogood 692b27578c
Runtime Namespace (#1547)
* Add context option to runtime; Add dynamic namespace to kubectl client

* Add namespace runtime arg

* Fixes & Debugging

* Pass options in k8s runtime

* Set namespace on k8s resources

* Additional Logging

* More debugging

* Remove Debugging

* Ensure namespace exists

* Add debugging

* Refactor namespaceExists check

* Fix

* Fix

* Fix

* Fix

* Change the way we check for namespace

* Fix

* Tidying Up

* Fix Test

* Fix merge bugs

* Serialize k8s namespaces

* Add namespace to watch

* Serialize namespace when creating k8s namespace

Co-authored-by: Ben Toogood <ben@micro.mu>
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-04-23 13:53:42 +01:00

110 lines
2.0 KiB
Protocol Buffer

syntax = "proto3";
package go.micro.runtime;
service Runtime {
rpc Create(CreateRequest) returns (CreateResponse) {};
rpc Read(ReadRequest) returns (ReadResponse) {};
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
rpc Update(UpdateRequest) returns (UpdateResponse) {};
rpc Logs(LogsRequest) returns (stream LogRecord) {};
}
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;
}
message Event {
string type = 1;
int64 timestamp = 2;
string service = 3;
string version = 4;
}
message CreateOptions {
// command to pass in
repeated string command = 1;
// args to pass into command
repeated string args = 2;
// environment to pass in
repeated string env = 3;
// output to send to
string output = 4;
// create type of service
string type = 5;
// image to use
string image = 6;
}
message CreateRequest {
Service service = 1;
CreateOptions options = 2;
}
message CreateResponse {}
message ReadOptions {
// service name
string service = 1;
// version of the service
string version = 2;
// type of service
string type = 3;
}
message ReadRequest {
ReadOptions options = 1;
}
message ReadResponse {
repeated Service services = 1;
}
message DeleteRequest {
Service service = 1;
}
message DeleteResponse {}
message UpdateRequest {
Service service = 1;
}
message UpdateResponse {}
message ListRequest {}
message ListResponse {
repeated Service services = 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;
}
message LogRecord {
// timestamp of log record
int64 timestamp = 1;
// record metadata
map<string,string> metadata = 2;
// message
string message = 3;
}