Matthias Andreas Benkard | 832a54e | 2019-01-29 09:27:38 +0100 | [diff] [blame^] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: grpc/health/v1/health.proto |
| 3 | |
| 4 | package grpc_health_v1 // import "google.golang.org/grpc/health/grpc_health_v1" |
| 5 | |
| 6 | import proto "github.com/golang/protobuf/proto" |
| 7 | import fmt "fmt" |
| 8 | import math "math" |
| 9 | |
| 10 | import ( |
| 11 | context "golang.org/x/net/context" |
| 12 | grpc "google.golang.org/grpc" |
| 13 | ) |
| 14 | |
| 15 | // Reference imports to suppress errors if they are not otherwise used. |
| 16 | var _ = proto.Marshal |
| 17 | var _ = fmt.Errorf |
| 18 | var _ = math.Inf |
| 19 | |
| 20 | // This is a compile-time assertion to ensure that this generated file |
| 21 | // is compatible with the proto package it is being compiled against. |
| 22 | // A compilation error at this line likely means your copy of the |
| 23 | // proto package needs to be updated. |
| 24 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package |
| 25 | |
| 26 | type HealthCheckResponse_ServingStatus int32 |
| 27 | |
| 28 | const ( |
| 29 | HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 |
| 30 | HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 |
| 31 | HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 |
| 32 | ) |
| 33 | |
| 34 | var HealthCheckResponse_ServingStatus_name = map[int32]string{ |
| 35 | 0: "UNKNOWN", |
| 36 | 1: "SERVING", |
| 37 | 2: "NOT_SERVING", |
| 38 | } |
| 39 | var HealthCheckResponse_ServingStatus_value = map[string]int32{ |
| 40 | "UNKNOWN": 0, |
| 41 | "SERVING": 1, |
| 42 | "NOT_SERVING": 2, |
| 43 | } |
| 44 | |
| 45 | func (x HealthCheckResponse_ServingStatus) String() string { |
| 46 | return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x)) |
| 47 | } |
| 48 | func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) { |
| 49 | return fileDescriptor_health_85731b6c49265086, []int{1, 0} |
| 50 | } |
| 51 | |
| 52 | type HealthCheckRequest struct { |
| 53 | Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` |
| 54 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 55 | XXX_unrecognized []byte `json:"-"` |
| 56 | XXX_sizecache int32 `json:"-"` |
| 57 | } |
| 58 | |
| 59 | func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} } |
| 60 | func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) } |
| 61 | func (*HealthCheckRequest) ProtoMessage() {} |
| 62 | func (*HealthCheckRequest) Descriptor() ([]byte, []int) { |
| 63 | return fileDescriptor_health_85731b6c49265086, []int{0} |
| 64 | } |
| 65 | func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error { |
| 66 | return xxx_messageInfo_HealthCheckRequest.Unmarshal(m, b) |
| 67 | } |
| 68 | func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 69 | return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic) |
| 70 | } |
| 71 | func (dst *HealthCheckRequest) XXX_Merge(src proto.Message) { |
| 72 | xxx_messageInfo_HealthCheckRequest.Merge(dst, src) |
| 73 | } |
| 74 | func (m *HealthCheckRequest) XXX_Size() int { |
| 75 | return xxx_messageInfo_HealthCheckRequest.Size(m) |
| 76 | } |
| 77 | func (m *HealthCheckRequest) XXX_DiscardUnknown() { |
| 78 | xxx_messageInfo_HealthCheckRequest.DiscardUnknown(m) |
| 79 | } |
| 80 | |
| 81 | var xxx_messageInfo_HealthCheckRequest proto.InternalMessageInfo |
| 82 | |
| 83 | func (m *HealthCheckRequest) GetService() string { |
| 84 | if m != nil { |
| 85 | return m.Service |
| 86 | } |
| 87 | return "" |
| 88 | } |
| 89 | |
| 90 | type HealthCheckResponse struct { |
| 91 | Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"` |
| 92 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 93 | XXX_unrecognized []byte `json:"-"` |
| 94 | XXX_sizecache int32 `json:"-"` |
| 95 | } |
| 96 | |
| 97 | func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } |
| 98 | func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) } |
| 99 | func (*HealthCheckResponse) ProtoMessage() {} |
| 100 | func (*HealthCheckResponse) Descriptor() ([]byte, []int) { |
| 101 | return fileDescriptor_health_85731b6c49265086, []int{1} |
| 102 | } |
| 103 | func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { |
| 104 | return xxx_messageInfo_HealthCheckResponse.Unmarshal(m, b) |
| 105 | } |
| 106 | func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 107 | return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) |
| 108 | } |
| 109 | func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { |
| 110 | xxx_messageInfo_HealthCheckResponse.Merge(dst, src) |
| 111 | } |
| 112 | func (m *HealthCheckResponse) XXX_Size() int { |
| 113 | return xxx_messageInfo_HealthCheckResponse.Size(m) |
| 114 | } |
| 115 | func (m *HealthCheckResponse) XXX_DiscardUnknown() { |
| 116 | xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) |
| 117 | } |
| 118 | |
| 119 | var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo |
| 120 | |
| 121 | func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus { |
| 122 | if m != nil { |
| 123 | return m.Status |
| 124 | } |
| 125 | return HealthCheckResponse_UNKNOWN |
| 126 | } |
| 127 | |
| 128 | func init() { |
| 129 | proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v1.HealthCheckRequest") |
| 130 | proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v1.HealthCheckResponse") |
| 131 | proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) |
| 132 | } |
| 133 | |
| 134 | // Reference imports to suppress errors if they are not otherwise used. |
| 135 | var _ context.Context |
| 136 | var _ grpc.ClientConn |
| 137 | |
| 138 | // This is a compile-time assertion to ensure that this generated file |
| 139 | // is compatible with the grpc package it is being compiled against. |
| 140 | const _ = grpc.SupportPackageIsVersion4 |
| 141 | |
| 142 | // HealthClient is the client API for Health service. |
| 143 | // |
| 144 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 145 | type HealthClient interface { |
| 146 | Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) |
| 147 | } |
| 148 | |
| 149 | type healthClient struct { |
| 150 | cc *grpc.ClientConn |
| 151 | } |
| 152 | |
| 153 | func NewHealthClient(cc *grpc.ClientConn) HealthClient { |
| 154 | return &healthClient{cc} |
| 155 | } |
| 156 | |
| 157 | func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { |
| 158 | out := new(HealthCheckResponse) |
| 159 | err := c.cc.Invoke(ctx, "/grpc.health.v1.Health/Check", in, out, opts...) |
| 160 | if err != nil { |
| 161 | return nil, err |
| 162 | } |
| 163 | return out, nil |
| 164 | } |
| 165 | |
| 166 | // HealthServer is the server API for Health service. |
| 167 | type HealthServer interface { |
| 168 | Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) |
| 169 | } |
| 170 | |
| 171 | func RegisterHealthServer(s *grpc.Server, srv HealthServer) { |
| 172 | s.RegisterService(&_Health_serviceDesc, srv) |
| 173 | } |
| 174 | |
| 175 | func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 176 | in := new(HealthCheckRequest) |
| 177 | if err := dec(in); err != nil { |
| 178 | return nil, err |
| 179 | } |
| 180 | if interceptor == nil { |
| 181 | return srv.(HealthServer).Check(ctx, in) |
| 182 | } |
| 183 | info := &grpc.UnaryServerInfo{ |
| 184 | Server: srv, |
| 185 | FullMethod: "/grpc.health.v1.Health/Check", |
| 186 | } |
| 187 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 188 | return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest)) |
| 189 | } |
| 190 | return interceptor(ctx, in, info, handler) |
| 191 | } |
| 192 | |
| 193 | var _Health_serviceDesc = grpc.ServiceDesc{ |
| 194 | ServiceName: "grpc.health.v1.Health", |
| 195 | HandlerType: (*HealthServer)(nil), |
| 196 | Methods: []grpc.MethodDesc{ |
| 197 | { |
| 198 | MethodName: "Check", |
| 199 | Handler: _Health_Check_Handler, |
| 200 | }, |
| 201 | }, |
| 202 | Streams: []grpc.StreamDesc{}, |
| 203 | Metadata: "grpc/health/v1/health.proto", |
| 204 | } |
| 205 | |
| 206 | func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_health_85731b6c49265086) } |
| 207 | |
| 208 | var fileDescriptor_health_85731b6c49265086 = []byte{ |
| 209 | // 271 bytes of a gzipped FileDescriptorProto |
| 210 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0x2a, 0x48, |
| 211 | 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, 0xd0, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, |
| 212 | 0x4b, 0xf2, 0x85, 0xf8, 0x40, 0x92, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21, 0x0f, |
| 213 | 0x30, 0xc7, 0x39, 0x23, 0x35, 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, |
| 214 | 0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, |
| 215 | 0xc6, 0x55, 0x9a, 0xc3, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, |
| 216 | 0x93, 0x8b, 0xad, 0xb8, 0x24, 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5, |
| 217 | 0x22, 0x3d, 0x2c, 0x9a, 0xf4, 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d, |
| 218 | 0x50, 0xb2, 0xe2, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, |
| 219 | 0xf7, 0x13, 0x60, 0x00, 0x71, 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8, |
| 220 | 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x46, 0x51, 0x5c, 0x6c, 0x10, 0x8b, 0x84, |
| 221 | 0x02, 0xb8, 0x58, 0xc1, 0x96, 0x09, 0x29, 0xe1, 0x75, 0x09, 0xd8, 0xbf, 0x52, 0xca, 0x44, 0xb8, |
| 222 | 0xd6, 0x29, 0x91, 0x4b, 0x30, 0x33, 0x1f, 0x4d, 0xa1, 0x13, 0x37, 0x44, 0x65, 0x00, 0x28, 0x70, |
| 223 | 0x03, 0x18, 0xa3, 0x74, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xd2, 0xf3, 0x73, 0x12, 0xf3, |
| 224 | 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, 0x91, 0x63, 0x03, 0xc4, 0x8e, 0x87, 0xb0, 0xe3, 0xcb, 0x0c, |
| 225 | 0x57, 0x31, 0xf1, 0xb9, 0x83, 0x4c, 0x83, 0x18, 0xa1, 0x17, 0x66, 0x98, 0xc4, 0x06, 0x8e, 0x24, |
| 226 | 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0x66, 0x81, 0xcb, 0xc3, 0x01, 0x00, 0x00, |
| 227 | } |