github.com/micro/go-micro/v2@v2.9.1/runtime/service/proto/runtime.proto (about) 1 syntax = "proto3"; 2 3 package go.micro.runtime; 4 5 service Runtime { 6 rpc Create(CreateRequest) returns (CreateResponse) {}; 7 rpc Read(ReadRequest) returns (ReadResponse) {}; 8 rpc Delete(DeleteRequest) returns (DeleteResponse) {}; 9 rpc Update(UpdateRequest) returns (UpdateResponse) {}; 10 rpc Logs(LogsRequest) returns (stream LogRecord) {}; 11 } 12 13 message Service { 14 // name of the service 15 string name = 1; 16 // version of the service 17 string version = 2; 18 // git url of the source 19 string source = 3; 20 // service metadata 21 map<string,string> metadata = 4; 22 } 23 24 message Event { 25 string type = 1; 26 int64 timestamp = 2; 27 string service = 3; 28 string version = 4; 29 } 30 31 message CreateOptions { 32 // command to pass in 33 repeated string command = 1; 34 // args to pass into command 35 repeated string args = 2; 36 // environment to pass in 37 repeated string env = 3; 38 // output to send to 39 string output = 4; 40 // create type of service 41 string type = 5; 42 // image to use 43 string image = 6; 44 } 45 46 message CreateRequest { 47 Service service = 1; 48 CreateOptions options = 2; 49 } 50 51 message CreateResponse {} 52 53 message ReadOptions { 54 // service name 55 string service = 1; 56 // version of the service 57 string version = 2; 58 // type of service 59 string type = 3; 60 } 61 62 message ReadRequest { 63 ReadOptions options = 1; 64 } 65 66 message ReadResponse { 67 repeated Service services = 1; 68 } 69 70 message DeleteOptions { 71 } 72 73 message DeleteRequest { 74 Service service = 1; 75 DeleteOptions options = 2; 76 } 77 78 message DeleteResponse {} 79 80 message UpdateOptions { 81 } 82 83 message UpdateRequest { 84 Service service = 1; 85 UpdateOptions options = 2; 86 } 87 88 message UpdateResponse {} 89 90 message ListOptions { 91 } 92 93 message ListRequest { 94 ListOptions options = 1; 95 } 96 97 message ListResponse { 98 repeated Service services = 1; 99 } 100 101 message LogsOptions { 102 } 103 104 message LogsRequest{ 105 // service to request logs for 106 string service = 1; 107 // stream records continuously 108 bool stream = 2; 109 // count of records to request 110 int64 count = 3; 111 // relative time in seconds 112 // before the current time 113 // from which to show logs 114 int64 since = 4; 115 // options to use 116 LogsOptions options = 5; 117 } 118 119 message LogRecord { 120 // timestamp of log record 121 int64 timestamp = 1; 122 // record metadata 123 map<string,string> metadata = 2; 124 // message 125 string message = 3; 126 } 127