blob: c7ae0993e7458657f37d10a16bd0e6b1c037e7b4 [file] [log] [blame]
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -08001syntax = "proto3";
2
Stephane Barbarie35595062018-02-08 08:34:39 -05003option go_package = "github.com/opencord/voltha/protos/go/voltha";
4
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -08005package voltha;
6
7import "google/api/annotations.proto";
8import "google/protobuf/empty.proto";
Zsolt Harasztidafefe12016-11-14 21:29:58 -08009import "meta.proto";
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080010
11// Encode health status of a Voltha instance
12message HealthStatus {
Zsolt Harasztidafefe12016-11-14 21:29:58 -080013
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080014 // Health states
15 enum HealthState {
16 HEALTHY = 0; // The instance is healthy
17 OVERLOADED = 1; // The instance is overloaded, decrease query rate
18 DYING = 2; // The instance is in a critical condition, do not use it
19 }
20
21 // Current state of health of this Voltha instance
Zsolt Harasztidafefe12016-11-14 21:29:58 -080022 HealthState state = 1 [(access) = READ_ONLY];
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080023}
24
25// Health related services
26service HealthService {
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080027
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080028 // Return current health status of a Voltha instance
29 rpc GetHealthStatus(google.protobuf.Empty) returns (HealthStatus) {
30 option (google.api.http) = {
31 get: "/health"
32 };
33 }
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080034
Zsolt Haraszti7eeb2b32016-11-06 14:04:55 -080035}
36