admin: convert /server_info to protobuf (#4886)
Converts the existing /server_info admin endpoint to be represented by a protobuf. This will make it easier to extend with new values in the future. Risk Level: Low Testing: Updated the existing unit test Docs Changes: n/a Release Notes: n/a Part of #4405 Signed-off-by: Snow Pettersen <snowp@squareup.com> Mirrored from https://github.com/envoyproxy/envoy @ 71bd095297ba64712bfad30d0aee1f019fbd32d8pull/620/head
parent
df0002f6a5
commit
69321da410
2 changed files with 37 additions and 0 deletions
@ -0,0 +1,31 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.admin.v2alpha; |
||||
|
||||
import "google/protobuf/duration.proto"; |
||||
|
||||
// [#protodoc-title: Server State] |
||||
|
||||
// Proto representation of the value returned by /server_info, containing |
||||
// server version/server status information. |
||||
message ServerInfo { |
||||
// Server version. |
||||
string version = 1; |
||||
|
||||
enum State { |
||||
// Server is live and serving traffic. |
||||
LIVE = 0; |
||||
// Server is draining listeners in response to external health checks failing. |
||||
DRAINING = 1; |
||||
} |
||||
|
||||
// State of the server. |
||||
State state = 2; |
||||
|
||||
// Uptime since current epoch was started. |
||||
google.protobuf.Duration uptime_current_epoch = 3; |
||||
// Uptime since the start of the first epoch. |
||||
google.protobuf.Duration uptime_all_epochs = 4; |
||||
// Which restart epoch the server is currently in. |
||||
uint32 epoch = 5; |
||||
} |
Loading…
Reference in new issue