-
Notifications
You must be signed in to change notification settings - Fork 1
/
totem.proto
58 lines (47 loc) · 1.24 KB
/
totem.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
syntax = "proto3";
package totem;
import "github.com/kralicky/totem/extensions.proto";
import "google/protobuf/descriptor.proto";
import "google/rpc/status.proto";
option go_package = "github.com/kralicky/totem";
service ServerReflection {
option (totem.visibility) = {
splicedClients: true
};
rpc ListServices(DiscoveryRequest) returns (ServiceInfo);
}
message RPC {
uint64 tag = 1;
string serviceName = 2;
string methodName = 3;
oneof content {
bytes request = 4;
Response response = 5;
ServerStreamMessage serverStreamMsg = 7;
}
MD metadata = 6;
}
message Response {
bytes response = 1;
google.rpc.Status statusProto = 2;
}
message MD {
map<string, MDValues> data = 1;
}
message MDValues {
repeated string items = 1;
}
message DiscoveryRequest {
string initiator = 1;
repeated string visited = 2;
int32 remainingHops = 3;
}
message ServiceInfo {
repeated google.protobuf.ServiceDescriptorProto services = 1;
}
message ServerStreamMessage {
// separate from rpc.metadata to disambiguate headers/trailers.
// in a nested stream, rpc.metadata is always trailers.
MD headers = 1;
bytes response = 2;
}