William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: voltha_protos/health.proto |
| 3 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 4 | package health |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 5 | |
| 6 | import ( |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 7 | context "context" |
| 8 | fmt "fmt" |
| 9 | proto "github.com/golang/protobuf/proto" |
| 10 | empty "github.com/golang/protobuf/ptypes/empty" |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 11 | _ "google.golang.org/genproto/googleapis/api/annotations" |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 12 | grpc "google.golang.org/grpc" |
David K. Bainbridge | c4bf538 | 2021-04-08 16:06:54 +0000 | [diff] [blame] | 13 | codes "google.golang.org/grpc/codes" |
| 14 | status "google.golang.org/grpc/status" |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 15 | math "math" |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 16 | ) |
| 17 | |
| 18 | // Reference imports to suppress errors if they are not otherwise used. |
| 19 | var _ = proto.Marshal |
| 20 | var _ = fmt.Errorf |
| 21 | var _ = math.Inf |
| 22 | |
| 23 | // This is a compile-time assertion to ensure that this generated file |
| 24 | // is compatible with the proto package it is being compiled against. |
| 25 | // A compilation error at this line likely means your copy of the |
| 26 | // proto package needs to be updated. |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 27 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 28 | |
| 29 | // Health states |
| 30 | type HealthStatus_HealthState int32 |
| 31 | |
| 32 | const ( |
| 33 | HealthStatus_HEALTHY HealthStatus_HealthState = 0 |
| 34 | HealthStatus_OVERLOADED HealthStatus_HealthState = 1 |
| 35 | HealthStatus_DYING HealthStatus_HealthState = 2 |
| 36 | ) |
| 37 | |
| 38 | var HealthStatus_HealthState_name = map[int32]string{ |
| 39 | 0: "HEALTHY", |
| 40 | 1: "OVERLOADED", |
| 41 | 2: "DYING", |
| 42 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 43 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 44 | var HealthStatus_HealthState_value = map[string]int32{ |
| 45 | "HEALTHY": 0, |
| 46 | "OVERLOADED": 1, |
| 47 | "DYING": 2, |
| 48 | } |
| 49 | |
| 50 | func (x HealthStatus_HealthState) String() string { |
| 51 | return proto.EnumName(HealthStatus_HealthState_name, int32(x)) |
| 52 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 53 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 54 | func (HealthStatus_HealthState) EnumDescriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 55 | return fileDescriptor_dd1fc2b2d96d69b8, []int{0, 0} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | // Encode health status of a Voltha instance |
| 59 | type HealthStatus struct { |
| 60 | // Current state of health of this Voltha instance |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 61 | State HealthStatus_HealthState `protobuf:"varint,1,opt,name=state,proto3,enum=health.HealthStatus_HealthState" json:"state,omitempty"` |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 62 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 63 | XXX_unrecognized []byte `json:"-"` |
| 64 | XXX_sizecache int32 `json:"-"` |
| 65 | } |
| 66 | |
| 67 | func (m *HealthStatus) Reset() { *m = HealthStatus{} } |
| 68 | func (m *HealthStatus) String() string { return proto.CompactTextString(m) } |
| 69 | func (*HealthStatus) ProtoMessage() {} |
| 70 | func (*HealthStatus) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 71 | return fileDescriptor_dd1fc2b2d96d69b8, []int{0} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 72 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 73 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 74 | func (m *HealthStatus) XXX_Unmarshal(b []byte) error { |
| 75 | return xxx_messageInfo_HealthStatus.Unmarshal(m, b) |
| 76 | } |
| 77 | func (m *HealthStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 78 | return xxx_messageInfo_HealthStatus.Marshal(b, m, deterministic) |
| 79 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 80 | func (m *HealthStatus) XXX_Merge(src proto.Message) { |
| 81 | xxx_messageInfo_HealthStatus.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 82 | } |
| 83 | func (m *HealthStatus) XXX_Size() int { |
| 84 | return xxx_messageInfo_HealthStatus.Size(m) |
| 85 | } |
| 86 | func (m *HealthStatus) XXX_DiscardUnknown() { |
| 87 | xxx_messageInfo_HealthStatus.DiscardUnknown(m) |
| 88 | } |
| 89 | |
| 90 | var xxx_messageInfo_HealthStatus proto.InternalMessageInfo |
| 91 | |
| 92 | func (m *HealthStatus) GetState() HealthStatus_HealthState { |
| 93 | if m != nil { |
| 94 | return m.State |
| 95 | } |
| 96 | return HealthStatus_HEALTHY |
| 97 | } |
| 98 | |
| 99 | func init() { |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 100 | proto.RegisterEnum("health.HealthStatus_HealthState", HealthStatus_HealthState_name, HealthStatus_HealthState_value) |
| 101 | proto.RegisterType((*HealthStatus)(nil), "health.HealthStatus") |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | func init() { proto.RegisterFile("voltha_protos/health.proto", fileDescriptor_dd1fc2b2d96d69b8) } |
| 105 | |
| 106 | var fileDescriptor_dd1fc2b2d96d69b8 = []byte{ |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 107 | // 287 bytes of a gzipped FileDescriptorProto |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 108 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xcb, 0xcf, 0x29, |
| 109 | 0xc9, 0x48, 0x8c, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 110 | 0xd0, 0x03, 0xf3, 0x84, 0xd8, 0x20, 0x3c, 0x29, 0x99, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xfd, |
| 111 | 0xc4, 0x82, 0x4c, 0xfd, 0xc4, 0xbc, 0xbc, 0xfc, 0x92, 0xc4, 0x92, 0xcc, 0xfc, 0xbc, 0x62, 0x88, |
| 112 | 0x2a, 0x29, 0x69, 0xa8, 0x2c, 0x98, 0x97, 0x54, 0x9a, 0xa6, 0x9f, 0x9a, 0x5b, 0x50, 0x52, 0x09, |
| 113 | 0x91, 0x54, 0xaa, 0xe5, 0xe2, 0xf1, 0x00, 0x1b, 0x12, 0x5c, 0x92, 0x58, 0x52, 0x5a, 0x2c, 0x64, |
| 114 | 0xc6, 0xc5, 0x5a, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x67, 0xa4, 0xa0, |
| 115 | 0x07, 0xb5, 0x10, 0x59, 0x11, 0x12, 0x27, 0x35, 0x08, 0xa2, 0x5c, 0xc9, 0x94, 0x8b, 0x1b, 0x49, |
| 116 | 0x54, 0x88, 0x9b, 0x8b, 0xdd, 0xc3, 0xd5, 0xd1, 0x27, 0xc4, 0x23, 0x52, 0x80, 0x41, 0x88, 0x8f, |
| 117 | 0x8b, 0xcb, 0x3f, 0xcc, 0x35, 0xc8, 0xc7, 0xdf, 0xd1, 0xc5, 0xd5, 0x45, 0x80, 0x51, 0x88, 0x93, |
| 118 | 0x8b, 0xd5, 0x25, 0xd2, 0xd3, 0xcf, 0x5d, 0x80, 0xc9, 0x28, 0x91, 0x8b, 0x17, 0xaa, 0x2d, 0xb5, |
| 119 | 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x28, 0x80, 0x8b, 0xdf, 0x3d, 0xb5, 0x04, 0xc5, 0x49, 0x62, 0x7a, |
| 120 | 0x10, 0x0f, 0xe8, 0xc1, 0x3c, 0xa0, 0xe7, 0x0a, 0xf2, 0x80, 0x94, 0x08, 0x36, 0xb7, 0x29, 0xf1, |
| 121 | 0x37, 0x5d, 0x7e, 0x32, 0x99, 0x89, 0x53, 0x88, 0x1d, 0x1a, 0x54, 0x4e, 0x3e, 0x5c, 0x52, 0xf9, |
| 122 | 0x45, 0xe9, 0x7a, 0xf9, 0x05, 0xa9, 0x79, 0xc9, 0xf9, 0x45, 0x29, 0x7a, 0x90, 0xf0, 0x84, 0xea, |
| 123 | 0x8d, 0xd2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0x29, 0xd1, |
| 124 | 0x87, 0x28, 0xd1, 0x85, 0x06, 0x79, 0x99, 0xa9, 0x7e, 0x7a, 0x3e, 0xd4, 0xb4, 0x24, 0x36, 0xb0, |
| 125 | 0xa0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x83, 0x1f, 0x28, 0x85, 0x97, 0x01, 0x00, 0x00, |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | // Reference imports to suppress errors if they are not otherwise used. |
| 129 | var _ context.Context |
| 130 | var _ grpc.ClientConn |
| 131 | |
| 132 | // This is a compile-time assertion to ensure that this generated file |
| 133 | // is compatible with the grpc package it is being compiled against. |
| 134 | const _ = grpc.SupportPackageIsVersion4 |
| 135 | |
| 136 | // HealthServiceClient is the client API for HealthService service. |
| 137 | // |
| 138 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 139 | type HealthServiceClient interface { |
| 140 | // Return current health status of a Voltha instance |
| 141 | GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error) |
| 142 | } |
| 143 | |
| 144 | type healthServiceClient struct { |
| 145 | cc *grpc.ClientConn |
| 146 | } |
| 147 | |
| 148 | func NewHealthServiceClient(cc *grpc.ClientConn) HealthServiceClient { |
| 149 | return &healthServiceClient{cc} |
| 150 | } |
| 151 | |
| 152 | func (c *healthServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error) { |
| 153 | out := new(HealthStatus) |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 154 | err := c.cc.Invoke(ctx, "/health.HealthService/GetHealthStatus", in, out, opts...) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 155 | if err != nil { |
| 156 | return nil, err |
| 157 | } |
| 158 | return out, nil |
| 159 | } |
| 160 | |
| 161 | // HealthServiceServer is the server API for HealthService service. |
| 162 | type HealthServiceServer interface { |
| 163 | // Return current health status of a Voltha instance |
| 164 | GetHealthStatus(context.Context, *empty.Empty) (*HealthStatus, error) |
| 165 | } |
| 166 | |
David K. Bainbridge | c4bf538 | 2021-04-08 16:06:54 +0000 | [diff] [blame] | 167 | // UnimplementedHealthServiceServer can be embedded to have forward compatible implementations. |
| 168 | type UnimplementedHealthServiceServer struct { |
| 169 | } |
| 170 | |
| 171 | func (*UnimplementedHealthServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*HealthStatus, error) { |
| 172 | return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented") |
| 173 | } |
| 174 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 175 | func RegisterHealthServiceServer(s *grpc.Server, srv HealthServiceServer) { |
| 176 | s.RegisterService(&_HealthService_serviceDesc, srv) |
| 177 | } |
| 178 | |
| 179 | func _HealthService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 180 | in := new(empty.Empty) |
| 181 | if err := dec(in); err != nil { |
| 182 | return nil, err |
| 183 | } |
| 184 | if interceptor == nil { |
| 185 | return srv.(HealthServiceServer).GetHealthStatus(ctx, in) |
| 186 | } |
| 187 | info := &grpc.UnaryServerInfo{ |
| 188 | Server: srv, |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 189 | FullMethod: "/health.HealthService/GetHealthStatus", |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 190 | } |
| 191 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 192 | return srv.(HealthServiceServer).GetHealthStatus(ctx, req.(*empty.Empty)) |
| 193 | } |
| 194 | return interceptor(ctx, in, info, handler) |
| 195 | } |
| 196 | |
| 197 | var _HealthService_serviceDesc = grpc.ServiceDesc{ |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 198 | ServiceName: "health.HealthService", |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 199 | HandlerType: (*HealthServiceServer)(nil), |
| 200 | Methods: []grpc.MethodDesc{ |
| 201 | { |
| 202 | MethodName: "GetHealthStatus", |
| 203 | Handler: _HealthService_GetHealthStatus_Handler, |
| 204 | }, |
| 205 | }, |
| 206 | Streams: []grpc.StreamDesc{}, |
| 207 | Metadata: "voltha_protos/health.proto", |
| 208 | } |