Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/v3/go/voltha"; |
| 4 | option java_package = "org.opencord.voltha"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 5 | |
| 6 | package voltha; |
| 7 | |
| 8 | import "google/api/annotations.proto"; |
| 9 | import "google/protobuf/empty.proto"; |
| 10 | import "voltha_protos/meta.proto"; |
| 11 | |
| 12 | // Encode health status of a Voltha instance |
| 13 | message HealthStatus { |
| 14 | |
| 15 | // Health states |
| 16 | enum HealthState { |
| 17 | HEALTHY = 0; // The instance is healthy |
| 18 | OVERLOADED = 1; // The instance is overloaded, decrease query rate |
| 19 | DYING = 2; // The instance is in a critical condition, do not use it |
| 20 | } |
| 21 | |
| 22 | // Current state of health of this Voltha instance |
| 23 | HealthState state = 1 [(access) = READ_ONLY]; |
| 24 | } |
| 25 | |
| 26 | // Health related services |
| 27 | service HealthService { |
| 28 | |
| 29 | // Return current health status of a Voltha instance |
| 30 | rpc GetHealthStatus(google.protobuf.Empty) returns (HealthStatus) { |
| 31 | option (google.api.http) = { |
| 32 | get: "/health" |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | } |
| 37 | |