blob: 8b261264fa231ce58d9c4f03fbf68671fda5dc1a [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: voltha_protos/health.proto
package health
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Health states
type HealthStatus_HealthState int32
const (
HealthStatus_HEALTHY HealthStatus_HealthState = 0
HealthStatus_OVERLOADED HealthStatus_HealthState = 1
HealthStatus_DYING HealthStatus_HealthState = 2
)
var HealthStatus_HealthState_name = map[int32]string{
0: "HEALTHY",
1: "OVERLOADED",
2: "DYING",
}
var HealthStatus_HealthState_value = map[string]int32{
"HEALTHY": 0,
"OVERLOADED": 1,
"DYING": 2,
}
func (x HealthStatus_HealthState) String() string {
return proto.EnumName(HealthStatus_HealthState_name, int32(x))
}
func (HealthStatus_HealthState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_dd1fc2b2d96d69b8, []int{0, 0}
}
// Encode health status of a Voltha instance
type HealthStatus struct {
// Current state of health of this Voltha instance
State HealthStatus_HealthState `protobuf:"varint,1,opt,name=state,proto3,enum=health.HealthStatus_HealthState" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HealthStatus) Reset() { *m = HealthStatus{} }
func (m *HealthStatus) String() string { return proto.CompactTextString(m) }
func (*HealthStatus) ProtoMessage() {}
func (*HealthStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_dd1fc2b2d96d69b8, []int{0}
}
func (m *HealthStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HealthStatus.Unmarshal(m, b)
}
func (m *HealthStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HealthStatus.Marshal(b, m, deterministic)
}
func (m *HealthStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_HealthStatus.Merge(m, src)
}
func (m *HealthStatus) XXX_Size() int {
return xxx_messageInfo_HealthStatus.Size(m)
}
func (m *HealthStatus) XXX_DiscardUnknown() {
xxx_messageInfo_HealthStatus.DiscardUnknown(m)
}
var xxx_messageInfo_HealthStatus proto.InternalMessageInfo
func (m *HealthStatus) GetState() HealthStatus_HealthState {
if m != nil {
return m.State
}
return HealthStatus_HEALTHY
}
func init() {
proto.RegisterEnum("health.HealthStatus_HealthState", HealthStatus_HealthState_name, HealthStatus_HealthState_value)
proto.RegisterType((*HealthStatus)(nil), "health.HealthStatus")
}
func init() { proto.RegisterFile("voltha_protos/health.proto", fileDescriptor_dd1fc2b2d96d69b8) }
var fileDescriptor_dd1fc2b2d96d69b8 = []byte{
// 287 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xcb, 0xcf, 0x29,
0xc9, 0x48, 0x8c, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9,
0xd0, 0x03, 0xf3, 0x84, 0xd8, 0x20, 0x3c, 0x29, 0x99, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xfd,
0xc4, 0x82, 0x4c, 0xfd, 0xc4, 0xbc, 0xbc, 0xfc, 0x92, 0xc4, 0x92, 0xcc, 0xfc, 0xbc, 0x62, 0x88,
0x2a, 0x29, 0x69, 0xa8, 0x2c, 0x98, 0x97, 0x54, 0x9a, 0xa6, 0x9f,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 0x85, 0x06, 0x79, 0x99, 0xa9, 0x7e, 0x7a, 0x3e, 0xd4, 0xb4, 0x24, 0x36, 0xb0,
0xa0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x83, 0x1f, 0x28, 0x85, 0x97, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// HealthServiceClient is the client API for HealthService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HealthServiceClient interface {
// Return current health status of a Voltha instance
GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error)
}
type healthServiceClient struct {
cc *grpc.ClientConn
}
func NewHealthServiceClient(cc *grpc.ClientConn) HealthServiceClient {
return &healthServiceClient{cc}
}
func (c *healthServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error) {
out := new(HealthStatus)
err := c.cc.Invoke(ctx, "/health.HealthService/GetHealthStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HealthServiceServer is the server API for HealthService service.
type HealthServiceServer interface {
// Return current health status of a Voltha instance
GetHealthStatus(context.Context, *empty.Empty) (*HealthStatus, error)
}
// UnimplementedHealthServiceServer can be embedded to have forward compatible implementations.
type UnimplementedHealthServiceServer struct {
}
func (*UnimplementedHealthServiceServer) GetHealthStatus(ctx context.Context, req *empty.Empty) (*HealthStatus, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func RegisterHealthServiceServer(s *grpc.Server, srv HealthServiceServer) {
s.RegisterService(&_HealthService_serviceDesc, srv)
}
func _HealthService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HealthServiceServer).GetHealthStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/health.HealthService/GetHealthStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HealthServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _HealthService_serviceDesc = grpc.ServiceDesc{
ServiceName: "health.HealthService",
HandlerType: (*HealthServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetHealthStatus",
Handler: _HealthService_GetHealthStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "voltha_protos/health.proto",
}