1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: grpc_health_v1/health.proto
5 Package grpc_health_v1 is a generated protocol buffer package.
7 It is generated from these files:
8 grpc_health_v1/health.proto
10 It has these top-level messages:
14 package grpc_health_v1
16 import proto "github.com/golang/protobuf/proto"
21 context "golang.org/x/net/context"
22 grpc "google.golang.org/grpc"
25 // Reference imports to suppress errors if they are not otherwise used.
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the proto package it is being compiled against.
32 // A compilation error at this line likely means your copy of the
33 // proto package needs to be updated.
34 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
36 type HealthCheckResponse_ServingStatus int32
39 HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0
40 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1
41 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
44 var HealthCheckResponse_ServingStatus_name = map[int32]string{
49 var HealthCheckResponse_ServingStatus_value = map[string]int32{
55 func (x HealthCheckResponse_ServingStatus) String() string {
56 return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x))
58 func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) {
59 return fileDescriptor0, []int{1, 0}
62 type HealthCheckRequest struct {
63 Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
66 func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} }
67 func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) }
68 func (*HealthCheckRequest) ProtoMessage() {}
69 func (*HealthCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
71 func (m *HealthCheckRequest) GetService() string {
78 type HealthCheckResponse struct {
79 Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
82 func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} }
83 func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) }
84 func (*HealthCheckResponse) ProtoMessage() {}
85 func (*HealthCheckResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
87 func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus {
91 return HealthCheckResponse_UNKNOWN
95 proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v1.HealthCheckRequest")
96 proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v1.HealthCheckResponse")
97 proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value)
100 // Reference imports to suppress errors if they are not otherwise used.
101 var _ context.Context
102 var _ grpc.ClientConn
104 // This is a compile-time assertion to ensure that this generated file
105 // is compatible with the grpc package it is being compiled against.
106 const _ = grpc.SupportPackageIsVersion4
108 // Client API for Health service
110 type HealthClient interface {
111 Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
114 type healthClient struct {
118 func NewHealthClient(cc *grpc.ClientConn) HealthClient {
119 return &healthClient{cc}
122 func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
123 out := new(HealthCheckResponse)
124 err := grpc.Invoke(ctx, "/grpc.health.v1.Health/Check", in, out, c.cc, opts...)
131 // Server API for Health service
133 type HealthServer interface {
134 Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
137 func RegisterHealthServer(s *grpc.Server, srv HealthServer) {
138 s.RegisterService(&_Health_serviceDesc, srv)
141 func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
142 in := new(HealthCheckRequest)
143 if err := dec(in); err != nil {
146 if interceptor == nil {
147 return srv.(HealthServer).Check(ctx, in)
149 info := &grpc.UnaryServerInfo{
151 FullMethod: "/grpc.health.v1.Health/Check",
153 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
154 return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest))
156 return interceptor(ctx, in, info, handler)
159 var _Health_serviceDesc = grpc.ServiceDesc{
160 ServiceName: "grpc.health.v1.Health",
161 HandlerType: (*HealthServer)(nil),
162 Methods: []grpc.MethodDesc{
165 Handler: _Health_Check_Handler,
168 Streams: []grpc.StreamDesc{},
169 Metadata: "grpc_health_v1/health.proto",
172 func init() { proto.RegisterFile("grpc_health_v1/health.proto", fileDescriptor0) }
174 var fileDescriptor0 = []byte{
175 // 213 bytes of a gzipped FileDescriptorProto
176 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0x2a, 0x48,
177 0x8e, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, 0x88, 0x2f, 0x33, 0xd4, 0x87, 0xb0, 0xf4, 0x0a, 0x8a,
178 0xf2, 0x4b, 0xf2, 0x85, 0xf8, 0x40, 0x92, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21,
179 0x0f, 0x30, 0xc7, 0x39, 0x23, 0x35, 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48,
180 0x82, 0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33,
181 0x08, 0xc6, 0x55, 0x9a, 0xc3, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55,
182 0xc8, 0x93, 0x8b, 0xad, 0xb8, 0x24, 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f,
183 0xd5, 0x22, 0x3d, 0x2c, 0x9a, 0xf4, 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41,
184 0x0d, 0x50, 0xb2, 0xe2, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3,
185 0x0f, 0xf7, 0x13, 0x60, 0x00, 0x71, 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85,
186 0xf8, 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x46, 0x51, 0x5c, 0x6c, 0x10, 0x8b,
187 0x84, 0x02, 0xb8, 0x58, 0xc1, 0x96, 0x09, 0x29, 0xe1, 0x75, 0x09, 0xd8, 0xbf, 0x52, 0xca, 0x44,
188 0xb8, 0x36, 0x89, 0x0d, 0x1c, 0x82, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0x2b, 0x65,
189 0x20, 0x60, 0x01, 0x00, 0x00,