blob: 4bde8738b8599b88f77b6bfee5197509c9f12a06 [file] [log] [blame]
William Kurkian1b363f42019-03-12 15:28:12 -04001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: voltha_protos/health.proto
3
William Kurkianad745652019-03-20 08:45:51 -04004package voltha
William Kurkian1b363f42019-03-12 15:28:12 -04005
6import (
William Kurkianad745652019-03-20 08:45:51 -04007 context "context"
8 fmt "fmt"
9 proto "github.com/golang/protobuf/proto"
10 empty "github.com/golang/protobuf/ptypes/empty"
Matteo Scandolob3c08ae2020-10-14 13:15:43 -070011 _ "github.com/opencord/voltha-protos/v4/go/common"
William Kurkianad745652019-03-20 08:45:51 -040012 _ "google.golang.org/genproto/googleapis/api/annotations"
William Kurkian1b363f42019-03-12 15:28:12 -040013 grpc "google.golang.org/grpc"
David K. Bainbridgec4bf5382021-04-08 16:06:54 +000014 codes "google.golang.org/grpc/codes"
15 status "google.golang.org/grpc/status"
William Kurkianad745652019-03-20 08:45:51 -040016 math "math"
William Kurkian1b363f42019-03-12 15:28:12 -040017)
18
19// Reference imports to suppress errors if they are not otherwise used.
20var _ = proto.Marshal
21var _ = fmt.Errorf
22var _ = math.Inf
23
24// This is a compile-time assertion to ensure that this generated file
25// is compatible with the proto package it is being compiled against.
26// A compilation error at this line likely means your copy of the
27// proto package needs to be updated.
William Kurkianad745652019-03-20 08:45:51 -040028const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
William Kurkian1b363f42019-03-12 15:28:12 -040029
30// Health states
31type HealthStatus_HealthState int32
32
33const (
34 HealthStatus_HEALTHY HealthStatus_HealthState = 0
35 HealthStatus_OVERLOADED HealthStatus_HealthState = 1
36 HealthStatus_DYING HealthStatus_HealthState = 2
37)
38
39var HealthStatus_HealthState_name = map[int32]string{
40 0: "HEALTHY",
41 1: "OVERLOADED",
42 2: "DYING",
43}
William Kurkianad745652019-03-20 08:45:51 -040044
William Kurkian1b363f42019-03-12 15:28:12 -040045var HealthStatus_HealthState_value = map[string]int32{
46 "HEALTHY": 0,
47 "OVERLOADED": 1,
48 "DYING": 2,
49}
50
51func (x HealthStatus_HealthState) String() string {
52 return proto.EnumName(HealthStatus_HealthState_name, int32(x))
53}
William Kurkianad745652019-03-20 08:45:51 -040054
William Kurkian1b363f42019-03-12 15:28:12 -040055func (HealthStatus_HealthState) EnumDescriptor() ([]byte, []int) {
William Kurkianad745652019-03-20 08:45:51 -040056 return fileDescriptor_dd1fc2b2d96d69b8, []int{0, 0}
William Kurkian1b363f42019-03-12 15:28:12 -040057}
58
59// Encode health status of a Voltha instance
60type HealthStatus struct {
61 // Current state of health of this Voltha instance
62 State HealthStatus_HealthState `protobuf:"varint,1,opt,name=state,proto3,enum=voltha.HealthStatus_HealthState" json:"state,omitempty"`
63 XXX_NoUnkeyedLiteral struct{} `json:"-"`
64 XXX_unrecognized []byte `json:"-"`
65 XXX_sizecache int32 `json:"-"`
66}
67
68func (m *HealthStatus) Reset() { *m = HealthStatus{} }
69func (m *HealthStatus) String() string { return proto.CompactTextString(m) }
70func (*HealthStatus) ProtoMessage() {}
71func (*HealthStatus) Descriptor() ([]byte, []int) {
William Kurkianad745652019-03-20 08:45:51 -040072 return fileDescriptor_dd1fc2b2d96d69b8, []int{0}
William Kurkian1b363f42019-03-12 15:28:12 -040073}
William Kurkianad745652019-03-20 08:45:51 -040074
William Kurkian1b363f42019-03-12 15:28:12 -040075func (m *HealthStatus) XXX_Unmarshal(b []byte) error {
76 return xxx_messageInfo_HealthStatus.Unmarshal(m, b)
77}
78func (m *HealthStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
79 return xxx_messageInfo_HealthStatus.Marshal(b, m, deterministic)
80}
William Kurkianad745652019-03-20 08:45:51 -040081func (m *HealthStatus) XXX_Merge(src proto.Message) {
82 xxx_messageInfo_HealthStatus.Merge(m, src)
William Kurkian1b363f42019-03-12 15:28:12 -040083}
84func (m *HealthStatus) XXX_Size() int {
85 return xxx_messageInfo_HealthStatus.Size(m)
86}
87func (m *HealthStatus) XXX_DiscardUnknown() {
88 xxx_messageInfo_HealthStatus.DiscardUnknown(m)
89}
90
91var xxx_messageInfo_HealthStatus proto.InternalMessageInfo
92
93func (m *HealthStatus) GetState() HealthStatus_HealthState {
94 if m != nil {
95 return m.State
96 }
97 return HealthStatus_HEALTHY
98}
99
100func init() {
William Kurkian1b363f42019-03-12 15:28:12 -0400101 proto.RegisterEnum("voltha.HealthStatus_HealthState", HealthStatus_HealthState_name, HealthStatus_HealthState_value)
William Kurkianad745652019-03-20 08:45:51 -0400102 proto.RegisterType((*HealthStatus)(nil), "voltha.HealthStatus")
103}
104
105func init() { proto.RegisterFile("voltha_protos/health.proto", fileDescriptor_dd1fc2b2d96d69b8) }
106
107var fileDescriptor_dd1fc2b2d96d69b8 = []byte{
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300108 // 302 bytes of a gzipped FileDescriptorProto
William Kurkianad745652019-03-20 08:45:51 -0400109 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xcb, 0xcf, 0x29,
110 0xc9, 0x48, 0x8c, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9,
111 0xd0, 0x03, 0xf3, 0x84, 0xd8, 0x20, 0x72, 0x52, 0x32, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa,
112 0x89, 0x05, 0x99, 0xfa, 0x89, 0x79, 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0x10,
113 0x55, 0x52, 0xd2, 0x50, 0x59, 0x30, 0x2f, 0xa9, 0x34, 0x4d, 0x3f, 0x35, 0xb7, 0xa0, 0xa4, 0x12,
114 0x2a, 0x29, 0x81, 0x6a, 0x7c, 0x6e, 0x6a, 0x49, 0x22, 0x44, 0x46, 0xa9, 0x85, 0x91, 0x8b, 0xc7,
115 0x03, 0x6c, 0x5b, 0x70, 0x49, 0x62, 0x49, 0x69, 0xb1, 0x90, 0x2d, 0x17, 0x6b, 0x71, 0x49, 0x62,
116 0x49, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0x82, 0x1e, 0x44, 0xab, 0x1e, 0xb2, 0x22,
117 0x24, 0x4e, 0xaa, 0x13, 0xeb, 0x8b, 0x6f, 0x67, 0x65, 0x19, 0x83, 0x20, 0xba, 0x94, 0x4c, 0xb9,
118 0xb8, 0x91, 0x24, 0x85, 0xb8, 0xb9, 0xd8, 0x3d, 0x5c, 0x1d, 0x7d, 0x42, 0x3c, 0x22, 0x05, 0x18,
119 0x84, 0xf8, 0xb8, 0xb8, 0xfc, 0xc3, 0x5c, 0x83, 0x7c, 0xfc, 0x1d, 0x5d, 0x5c, 0x5d, 0x04, 0x18,
120 0x85, 0x38, 0xb9, 0x58, 0x5d, 0x22, 0x3d, 0xfd, 0xdc, 0x05, 0x98, 0x8c, 0x12, 0xb9, 0x78, 0xa1,
121 0xda, 0x52, 0x8b, 0xca, 0x32, 0x93, 0x53, 0x85, 0x02, 0xb8, 0xf8, 0xdd, 0x53, 0x4b, 0x50, 0x5c,
122 0x26, 0xa6, 0x07, 0xf1, 0xa2, 0x1e, 0xcc, 0x8b, 0x7a, 0xae, 0x20, 0x2f, 0x4a, 0x89, 0x60, 0x73,
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300123 0xa2, 0x12, 0x7f, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0x38, 0x85, 0xd8, 0xa1, 0x81, 0xe9, 0xe4, 0xca,
124 0x25, 0x9c, 0x5f, 0x94, 0xae, 0x97, 0x5f, 0x90, 0x9a, 0x97, 0x9c, 0x5f, 0x94, 0x02, 0xd5, 0x14,
125 0xa5, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x93, 0xd3, 0x87,
Matteo Scandolob3c08ae2020-10-14 13:15:43 -0700126 0xc8, 0xe9, 0x42, 0x83, 0xab, 0xcc, 0x44, 0x3f, 0x3d, 0x1f, 0x2a, 0x96, 0xc4, 0x06, 0x16, 0x34,
127 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x72, 0x0c, 0x5a, 0x9d, 0xb2, 0x01, 0x00, 0x00,
William Kurkian1b363f42019-03-12 15:28:12 -0400128}
129
130// Reference imports to suppress errors if they are not otherwise used.
131var _ context.Context
132var _ grpc.ClientConn
133
134// This is a compile-time assertion to ensure that this generated file
135// is compatible with the grpc package it is being compiled against.
136const _ = grpc.SupportPackageIsVersion4
137
138// HealthServiceClient is the client API for HealthService service.
139//
140// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
141type HealthServiceClient interface {
142 // Return current health status of a Voltha instance
143 GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error)
144}
145
146type healthServiceClient struct {
147 cc *grpc.ClientConn
148}
149
150func NewHealthServiceClient(cc *grpc.ClientConn) HealthServiceClient {
151 return &healthServiceClient{cc}
152}
153
154func (c *healthServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error) {
155 out := new(HealthStatus)
156 err := c.cc.Invoke(ctx, "/voltha.HealthService/GetHealthStatus", in, out, opts...)
157 if err != nil {
158 return nil, err
159 }
160 return out, nil
161}
162
163// HealthServiceServer is the server API for HealthService service.
164type HealthServiceServer interface {
165 // Return current health status of a Voltha instance
166 GetHealthStatus(context.Context, *empty.Empty) (*HealthStatus, error)
167}
168
David K. Bainbridgec4bf5382021-04-08 16:06:54 +0000169// UnimplementedHealthServiceServer can be embedded to have forward compatible implementations.
170type UnimplementedHealthServiceServer struct {
171}
172
173func (*UnimplementedHealthServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*HealthStatus, error) {
174 return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
175}
176
William Kurkian1b363f42019-03-12 15:28:12 -0400177func RegisterHealthServiceServer(s *grpc.Server, srv HealthServiceServer) {
178 s.RegisterService(&_HealthService_serviceDesc, srv)
179}
180
181func _HealthService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
182 in := new(empty.Empty)
183 if err := dec(in); err != nil {
184 return nil, err
185 }
186 if interceptor == nil {
187 return srv.(HealthServiceServer).GetHealthStatus(ctx, in)
188 }
189 info := &grpc.UnaryServerInfo{
190 Server: srv,
191 FullMethod: "/voltha.HealthService/GetHealthStatus",
192 }
193 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
194 return srv.(HealthServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
195 }
196 return interceptor(ctx, in, info, handler)
197}
198
199var _HealthService_serviceDesc = grpc.ServiceDesc{
200 ServiceName: "voltha.HealthService",
201 HandlerType: (*HealthServiceServer)(nil),
202 Methods: []grpc.MethodDesc{
203 {
204 MethodName: "GetHealthStatus",
205 Handler: _HealthService_GetHealthStatus_Handler,
206 },
207 },
208 Streams: []grpc.StreamDesc{},
209 Metadata: "voltha_protos/health.proto",
210}