OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / grpc / health / grpc_health_v1 / health.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: grpc_health_v1/health.proto
3
4 /*
5 Package grpc_health_v1 is a generated protocol buffer package.
6
7 It is generated from these files:
8         grpc_health_v1/health.proto
9
10 It has these top-level messages:
11         HealthCheckRequest
12         HealthCheckResponse
13 */
14 package grpc_health_v1
15
16 import proto "github.com/golang/protobuf/proto"
17 import fmt "fmt"
18 import math "math"
19
20 import (
21         context "golang.org/x/net/context"
22         grpc "google.golang.org/grpc"
23 )
24
25 // Reference imports to suppress errors if they are not otherwise used.
26 var _ = proto.Marshal
27 var _ = fmt.Errorf
28 var _ = math.Inf
29
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
35
36 type HealthCheckResponse_ServingStatus int32
37
38 const (
39         HealthCheckResponse_UNKNOWN     HealthCheckResponse_ServingStatus = 0
40         HealthCheckResponse_SERVING     HealthCheckResponse_ServingStatus = 1
41         HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
42 )
43
44 var HealthCheckResponse_ServingStatus_name = map[int32]string{
45         0: "UNKNOWN",
46         1: "SERVING",
47         2: "NOT_SERVING",
48 }
49 var HealthCheckResponse_ServingStatus_value = map[string]int32{
50         "UNKNOWN":     0,
51         "SERVING":     1,
52         "NOT_SERVING": 2,
53 }
54
55 func (x HealthCheckResponse_ServingStatus) String() string {
56         return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x))
57 }
58 func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) {
59         return fileDescriptor0, []int{1, 0}
60 }
61
62 type HealthCheckRequest struct {
63         Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
64 }
65
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} }
70
71 func (m *HealthCheckRequest) GetService() string {
72         if m != nil {
73                 return m.Service
74         }
75         return ""
76 }
77
78 type HealthCheckResponse struct {
79         Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
80 }
81
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} }
86
87 func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus {
88         if m != nil {
89                 return m.Status
90         }
91         return HealthCheckResponse_UNKNOWN
92 }
93
94 func init() {
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)
98 }
99
100 // Reference imports to suppress errors if they are not otherwise used.
101 var _ context.Context
102 var _ grpc.ClientConn
103
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
107
108 // Client API for Health service
109
110 type HealthClient interface {
111         Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
112 }
113
114 type healthClient struct {
115         cc *grpc.ClientConn
116 }
117
118 func NewHealthClient(cc *grpc.ClientConn) HealthClient {
119         return &healthClient{cc}
120 }
121
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...)
125         if err != nil {
126                 return nil, err
127         }
128         return out, nil
129 }
130
131 // Server API for Health service
132
133 type HealthServer interface {
134         Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
135 }
136
137 func RegisterHealthServer(s *grpc.Server, srv HealthServer) {
138         s.RegisterService(&_Health_serviceDesc, srv)
139 }
140
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 {
144                 return nil, err
145         }
146         if interceptor == nil {
147                 return srv.(HealthServer).Check(ctx, in)
148         }
149         info := &grpc.UnaryServerInfo{
150                 Server:     srv,
151                 FullMethod: "/grpc.health.v1.Health/Check",
152         }
153         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
154                 return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest))
155         }
156         return interceptor(ctx, in, info, handler)
157 }
158
159 var _Health_serviceDesc = grpc.ServiceDesc{
160         ServiceName: "grpc.health.v1.Health",
161         HandlerType: (*HealthServer)(nil),
162         Methods: []grpc.MethodDesc{
163                 {
164                         MethodName: "Check",
165                         Handler:    _Health_Check_Handler,
166                 },
167         },
168         Streams:  []grpc.StreamDesc{},
169         Metadata: "grpc_health_v1/health.proto",
170 }
171
172 func init() { proto.RegisterFile("grpc_health_v1/health.proto", fileDescriptor0) }
173
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,
190 }