This repository has been archived by the owner on Dec 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
/
hot_restart.proto
80 lines (74 loc) · 2.43 KB
/
hot_restart.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
syntax = "proto3";
package envoy;
message HotRestartMessage {
// Child->parent requests
message Request {
message PassListenSocket {
string address = 1;
}
message ShutdownAdmin {
}
message Stats {
}
message DrainListeners {
}
message Terminate {
}
oneof request {
PassListenSocket pass_listen_socket = 1;
ShutdownAdmin shutdown_admin = 2;
Stats stats = 3;
DrainListeners drain_listeners = 4;
Terminate terminate = 5;
}
}
// Parent->child replies
message Reply {
message PassListenSocket {
int32 fd = 1;
}
message ShutdownAdmin {
uint64 original_start_time_unix_seconds = 1;
}
message Span {
uint32 first = 1;
uint32 last = 2; // inclusive
}
message RepeatedSpan {
repeated Span spans = 1;
}
message Stats {
// Values for server_stats, which don't fit with the "combination logic" approach.
uint64 memory_allocated = 1;
uint64 num_connections = 2;
// Keys are fully qualified stat names.
//
// The amount added to the counter since the last time a message included the counter in this
// map. (The first time a counter is included in this map, it's the amount added since the
// final latch() before hot restart began).
map<string, uint64> counter_deltas = 3;
// The parent's current values for various gauges in its stats store.
map<string, uint64> gauges = 4;
// Maps the string representation of a StatName into an array of Spans,
// which indicate which of the StatName tokens are dynamic. For example,
// if we are recording a counter or gauge named "a.b.c.d.e.f", where "a",
// and "d.e" were created from a StatNameDynamicPool, then we'd map
// "a.b.c.d.e.f" to the span array [[0,0], [3,4]], where the [0,0] span
// covers the "a", and the [3,4] span covers "d.e".
map<string, RepeatedSpan> dynamics = 5;
}
oneof reply {
// When this oneof is of the PassListenSocketReply type, there is a special
// implied meaning: the recvmsg that got this proto has control data to make
// the passing of the fd work, so make use of CMSG_SPACE etc.
PassListenSocket pass_listen_socket = 1;
ShutdownAdmin shutdown_admin = 2;
Stats stats = 3;
}
}
oneof requestreply {
Request request = 1;
Reply reply = 2;
}
bool didnt_recognize_your_last_message = 3;
}