2020-01-17 00:10:15 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2020-01-23 11:37:54 +00:00
|
|
|
service Config {
|
|
|
|
rpc Create (CreateRequest) returns (CreateResponse) {}
|
|
|
|
rpc Update (UpdateRequest) returns (UpdateResponse) {}
|
|
|
|
rpc Delete (DeleteRequest) returns (DeleteResponse) {}
|
|
|
|
rpc List (ListRequest) returns (ListResponse) {}
|
|
|
|
rpc Read (ReadRequest) returns (ReadResponse) {}
|
|
|
|
rpc Watch (WatchRequest) returns (stream WatchResponse) {}
|
2020-01-17 00:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ChangeSet {
|
|
|
|
bytes data = 1;
|
|
|
|
string checksum = 2;
|
|
|
|
string format = 3;
|
|
|
|
string source = 4;
|
|
|
|
int64 timestamp = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Change {
|
|
|
|
string key = 1;
|
|
|
|
string path = 2;
|
|
|
|
ChangeSet changeSet = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRequest {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
2020-01-18 23:16:23 +08:00
|
|
|
message CreateResponse {}
|
2020-01-17 00:10:15 +08:00
|
|
|
|
|
|
|
message UpdateRequest {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
2020-01-18 23:16:23 +08:00
|
|
|
message UpdateResponse {}
|
2020-01-17 00:10:15 +08:00
|
|
|
|
|
|
|
message DeleteRequest {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
2020-01-18 23:16:23 +08:00
|
|
|
message DeleteResponse {}
|
2020-01-17 00:10:15 +08:00
|
|
|
|
2020-01-18 23:16:23 +08:00
|
|
|
message ListRequest {}
|
2020-01-17 00:10:15 +08:00
|
|
|
|
|
|
|
message ListResponse {
|
2020-01-18 23:16:23 +08:00
|
|
|
repeated Change values = 1;
|
2020-01-17 00:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ReadRequest {
|
|
|
|
string key = 1;
|
|
|
|
string path = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReadResponse {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WatchRequest {
|
|
|
|
string key = 1;
|
2020-01-20 18:31:18 +08:00
|
|
|
string path = 2;
|
2020-01-17 00:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message WatchResponse {
|
|
|
|
string key = 1;
|
|
|
|
ChangeSet changeSet = 2;
|
2020-01-23 11:37:54 +00:00
|
|
|
}
|