Khen Nursimulu | aaac7ee | 2016-12-11 22:03:52 -0500 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | package voltha; |
| 4 | |
| 5 | import "google/api/annotations.proto"; |
| 6 | import "google/protobuf/empty.proto"; |
| 7 | import "meta.proto"; |
| 8 | |
| 9 | // Encode health status of a Voltha instance |
| 10 | message HealthStatus { |
| 11 | |
| 12 | // Health states |
| 13 | enum HealthState { |
| 14 | HEALTHY = 0; // The instance is healthy |
| 15 | OVERLOADED = 1; // The instance is overloaded, decrease query rate |
| 16 | DYING = 2; // The instance is in a critical condition, do not use it |
| 17 | } |
| 18 | |
| 19 | // Current state of health of this Voltha instance |
| 20 | HealthState state = 1 [(access) = READ_ONLY]; |
| 21 | } |
| 22 | |
| 23 | // Health related services |
| 24 | service HealthService { |
| 25 | |
| 26 | // Return current health status of a Voltha instance |
| 27 | rpc GetHealthStatus(google.protobuf.Empty) returns (HealthStatus) { |
| 28 | option (google.api.http) = { |
| 29 | get: "/health" |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | } |
| 34 | |