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 | |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 4 | package voltha |
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" |
Scott Baker | 383964b | 2019-11-01 14:26:07 -0700 | [diff] [blame] | 11 | _ "github.com/opencord/voltha-protos/v2/go/common" |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 12 | _ "google.golang.org/genproto/googleapis/api/annotations" |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 13 | grpc "google.golang.org/grpc" |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 14 | math "math" |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 15 | ) |
| 16 | |
| 17 | // Reference imports to suppress errors if they are not otherwise used. |
| 18 | var _ = proto.Marshal |
| 19 | var _ = fmt.Errorf |
| 20 | var _ = math.Inf |
| 21 | |
| 22 | // This is a compile-time assertion to ensure that this generated file |
| 23 | // is compatible with the proto package it is being compiled against. |
| 24 | // A compilation error at this line likely means your copy of the |
| 25 | // proto package needs to be updated. |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 26 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 27 | |
| 28 | // Health states |
| 29 | type HealthStatus_HealthState int32 |
| 30 | |
| 31 | const ( |
| 32 | HealthStatus_HEALTHY HealthStatus_HealthState = 0 |
| 33 | HealthStatus_OVERLOADED HealthStatus_HealthState = 1 |
| 34 | HealthStatus_DYING HealthStatus_HealthState = 2 |
| 35 | ) |
| 36 | |
| 37 | var HealthStatus_HealthState_name = map[int32]string{ |
| 38 | 0: "HEALTHY", |
| 39 | 1: "OVERLOADED", |
| 40 | 2: "DYING", |
| 41 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 42 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 43 | var HealthStatus_HealthState_value = map[string]int32{ |
| 44 | "HEALTHY": 0, |
| 45 | "OVERLOADED": 1, |
| 46 | "DYING": 2, |
| 47 | } |
| 48 | |
| 49 | func (x HealthStatus_HealthState) String() string { |
| 50 | return proto.EnumName(HealthStatus_HealthState_name, int32(x)) |
| 51 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 52 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 53 | func (HealthStatus_HealthState) EnumDescriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 54 | return fileDescriptor_dd1fc2b2d96d69b8, []int{0, 0} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | // Encode health status of a Voltha instance |
| 58 | type HealthStatus struct { |
| 59 | // Current state of health of this Voltha instance |
| 60 | State HealthStatus_HealthState `protobuf:"varint,1,opt,name=state,proto3,enum=voltha.HealthStatus_HealthState" json:"state,omitempty"` |
| 61 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 62 | XXX_unrecognized []byte `json:"-"` |
| 63 | XXX_sizecache int32 `json:"-"` |
| 64 | } |
| 65 | |
| 66 | func (m *HealthStatus) Reset() { *m = HealthStatus{} } |
| 67 | func (m *HealthStatus) String() string { return proto.CompactTextString(m) } |
| 68 | func (*HealthStatus) ProtoMessage() {} |
| 69 | func (*HealthStatus) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 70 | return fileDescriptor_dd1fc2b2d96d69b8, []int{0} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 71 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 72 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 73 | func (m *HealthStatus) XXX_Unmarshal(b []byte) error { |
| 74 | return xxx_messageInfo_HealthStatus.Unmarshal(m, b) |
| 75 | } |
| 76 | func (m *HealthStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 77 | return xxx_messageInfo_HealthStatus.Marshal(b, m, deterministic) |
| 78 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 79 | func (m *HealthStatus) XXX_Merge(src proto.Message) { |
| 80 | xxx_messageInfo_HealthStatus.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 81 | } |
| 82 | func (m *HealthStatus) XXX_Size() int { |
| 83 | return xxx_messageInfo_HealthStatus.Size(m) |
| 84 | } |
| 85 | func (m *HealthStatus) XXX_DiscardUnknown() { |
| 86 | xxx_messageInfo_HealthStatus.DiscardUnknown(m) |
| 87 | } |
| 88 | |
| 89 | var xxx_messageInfo_HealthStatus proto.InternalMessageInfo |
| 90 | |
| 91 | func (m *HealthStatus) GetState() HealthStatus_HealthState { |
| 92 | if m != nil { |
| 93 | return m.State |
| 94 | } |
| 95 | return HealthStatus_HEALTHY |
| 96 | } |
| 97 | |
| 98 | func init() { |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 99 | proto.RegisterEnum("voltha.HealthStatus_HealthState", HealthStatus_HealthState_name, HealthStatus_HealthState_value) |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 100 | proto.RegisterType((*HealthStatus)(nil), "voltha.HealthStatus") |
| 101 | } |
| 102 | |
| 103 | func init() { proto.RegisterFile("voltha_protos/health.proto", fileDescriptor_dd1fc2b2d96d69b8) } |
| 104 | |
| 105 | var fileDescriptor_dd1fc2b2d96d69b8 = []byte{ |
Scott Baker | 383964b | 2019-11-01 14:26:07 -0700 | [diff] [blame] | 106 | // 292 bytes of a gzipped FileDescriptorProto |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 107 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xcb, 0xcf, 0x29, |
| 108 | 0xc9, 0x48, 0x8c, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, |
| 109 | 0xd0, 0x03, 0xf3, 0x84, 0xd8, 0x20, 0x72, 0x52, 0x32, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, |
| 110 | 0x89, 0x05, 0x99, 0xfa, 0x89, 0x79, 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0x10, |
| 111 | 0x55, 0x52, 0xd2, 0x50, 0x59, 0x30, 0x2f, 0xa9, 0x34, 0x4d, 0x3f, 0x35, 0xb7, 0xa0, 0xa4, 0x12, |
| 112 | 0x2a, 0x29, 0x81, 0x6a, 0x7c, 0x6e, 0x6a, 0x49, 0x22, 0x44, 0x46, 0xa9, 0x85, 0x91, 0x8b, 0xc7, |
| 113 | 0x03, 0x6c, 0x5b, 0x70, 0x49, 0x62, 0x49, 0x69, 0xb1, 0x90, 0x2d, 0x17, 0x6b, 0x71, 0x49, 0x62, |
| 114 | 0x49, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0x82, 0x1e, 0x44, 0xab, 0x1e, 0xb2, 0x22, |
| 115 | 0x24, 0x4e, 0xaa, 0x13, 0xeb, 0x8b, 0x6f, 0x67, 0x65, 0x19, 0x83, 0x20, 0xba, 0x94, 0x4c, 0xb9, |
| 116 | 0xb8, 0x91, 0x24, 0x85, 0xb8, 0xb9, 0xd8, 0x3d, 0x5c, 0x1d, 0x7d, 0x42, 0x3c, 0x22, 0x05, 0x18, |
| 117 | 0x84, 0xf8, 0xb8, 0xb8, 0xfc, 0xc3, 0x5c, 0x83, 0x7c, 0xfc, 0x1d, 0x5d, 0x5c, 0x5d, 0x04, 0x18, |
| 118 | 0x85, 0x38, 0xb9, 0x58, 0x5d, 0x22, 0x3d, 0xfd, 0xdc, 0x05, 0x98, 0x8c, 0x12, 0xb9, 0x78, 0xa1, |
| 119 | 0xda, 0x52, 0x8b, 0xca, 0x32, 0x93, 0x53, 0x85, 0x02, 0xb8, 0xf8, 0xdd, 0x53, 0x4b, 0x50, 0x5c, |
| 120 | 0x26, 0xa6, 0x07, 0xf1, 0xa2, 0x1e, 0xcc, 0x8b, 0x7a, 0xae, 0x20, 0x2f, 0x4a, 0x89, 0x60, 0x73, |
Scott Baker | 383964b | 2019-11-01 14:26:07 -0700 | [diff] [blame] | 121 | 0xa2, 0x12, 0x7f, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0x38, 0x85, 0xd8, 0xa1, 0x81, 0xe9, 0x64, 0x10, |
| 122 | 0xa5, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x5f, 0x90, 0x9a, |
| 123 | 0x97, 0x9c, 0x5f, 0x94, 0xa2, 0x0f, 0xd1, 0xab, 0x0b, 0x0d, 0x99, 0x32, 0x23, 0xfd, 0xf4, 0x7c, |
| 124 | 0xa8, 0x58, 0x12, 0x1b, 0x58, 0xd0, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x61, 0x34, 0xd4, 0x32, |
| 125 | 0x9d, 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) |
| 154 | err := c.cc.Invoke(ctx, "/voltha.HealthService/GetHealthStatus", in, out, opts...) |
| 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 | |
| 167 | func RegisterHealthServiceServer(s *grpc.Server, srv HealthServiceServer) { |
| 168 | s.RegisterService(&_HealthService_serviceDesc, srv) |
| 169 | } |
| 170 | |
| 171 | func _HealthService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 172 | in := new(empty.Empty) |
| 173 | if err := dec(in); err != nil { |
| 174 | return nil, err |
| 175 | } |
| 176 | if interceptor == nil { |
| 177 | return srv.(HealthServiceServer).GetHealthStatus(ctx, in) |
| 178 | } |
| 179 | info := &grpc.UnaryServerInfo{ |
| 180 | Server: srv, |
| 181 | FullMethod: "/voltha.HealthService/GetHealthStatus", |
| 182 | } |
| 183 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 184 | return srv.(HealthServiceServer).GetHealthStatus(ctx, req.(*empty.Empty)) |
| 185 | } |
| 186 | return interceptor(ctx, in, info, handler) |
| 187 | } |
| 188 | |
| 189 | var _HealthService_serviceDesc = grpc.ServiceDesc{ |
| 190 | ServiceName: "voltha.HealthService", |
| 191 | HandlerType: (*HealthServiceServer)(nil), |
| 192 | Methods: []grpc.MethodDesc{ |
| 193 | { |
| 194 | MethodName: "GetHealthStatus", |
| 195 | Handler: _HealthService_GetHealthStatus_Handler, |
| 196 | }, |
| 197 | }, |
| 198 | Streams: []grpc.StreamDesc{}, |
| 199 | Metadata: "voltha_protos/health.proto", |
| 200 | } |