1 // Code generated by protoc-gen-go. DO NOT EDIT.
5 Package proto is a generated protocol buffer package.
7 It is generated from these files:
10 It has these top-level messages:
20 import proto1 "github.com/golang/protobuf/proto"
25 context "golang.org/x/net/context"
26 grpc "google.golang.org/grpc"
29 // Reference imports to suppress errors if they are not otherwise used.
30 var _ = proto1.Marshal
34 // This is a compile-time assertion to ensure that this generated file
35 // is compatible with the proto package it is being compiled against.
36 // A compilation error at this line likely means your copy of the
37 // proto package needs to be updated.
38 const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package
40 type GetRequest struct {
41 Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
44 func (m *GetRequest) Reset() { *m = GetRequest{} }
45 func (m *GetRequest) String() string { return proto1.CompactTextString(m) }
46 func (*GetRequest) ProtoMessage() {}
47 func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
49 func (m *GetRequest) GetKey() string {
56 type GetResponse struct {
57 Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
60 func (m *GetResponse) Reset() { *m = GetResponse{} }
61 func (m *GetResponse) String() string { return proto1.CompactTextString(m) }
62 func (*GetResponse) ProtoMessage() {}
63 func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
65 func (m *GetResponse) GetValue() int64 {
72 type PutRequest struct {
73 AddServer uint32 `protobuf:"varint,1,opt,name=add_server,json=addServer" json:"add_server,omitempty"`
74 Key string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
75 Value int64 `protobuf:"varint,3,opt,name=value" json:"value,omitempty"`
78 func (m *PutRequest) Reset() { *m = PutRequest{} }
79 func (m *PutRequest) String() string { return proto1.CompactTextString(m) }
80 func (*PutRequest) ProtoMessage() {}
81 func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
83 func (m *PutRequest) GetAddServer() uint32 {
90 func (m *PutRequest) GetKey() string {
97 func (m *PutRequest) GetValue() int64 {
107 func (m *Empty) Reset() { *m = Empty{} }
108 func (m *Empty) String() string { return proto1.CompactTextString(m) }
109 func (*Empty) ProtoMessage() {}
110 func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
112 type SumRequest struct {
113 A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
114 B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"`
117 func (m *SumRequest) Reset() { *m = SumRequest{} }
118 func (m *SumRequest) String() string { return proto1.CompactTextString(m) }
119 func (*SumRequest) ProtoMessage() {}
120 func (*SumRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
122 func (m *SumRequest) GetA() int64 {
129 func (m *SumRequest) GetB() int64 {
136 type SumResponse struct {
137 R int64 `protobuf:"varint,1,opt,name=r" json:"r,omitempty"`
140 func (m *SumResponse) Reset() { *m = SumResponse{} }
141 func (m *SumResponse) String() string { return proto1.CompactTextString(m) }
142 func (*SumResponse) ProtoMessage() {}
143 func (*SumResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
145 func (m *SumResponse) GetR() int64 {
153 proto1.RegisterType((*GetRequest)(nil), "proto.GetRequest")
154 proto1.RegisterType((*GetResponse)(nil), "proto.GetResponse")
155 proto1.RegisterType((*PutRequest)(nil), "proto.PutRequest")
156 proto1.RegisterType((*Empty)(nil), "proto.Empty")
157 proto1.RegisterType((*SumRequest)(nil), "proto.SumRequest")
158 proto1.RegisterType((*SumResponse)(nil), "proto.SumResponse")
161 // Reference imports to suppress errors if they are not otherwise used.
162 var _ context.Context
163 var _ grpc.ClientConn
165 // This is a compile-time assertion to ensure that this generated file
166 // is compatible with the grpc package it is being compiled against.
167 const _ = grpc.SupportPackageIsVersion4
169 // Client API for Counter service
171 type CounterClient interface {
172 Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
173 Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error)
176 type counterClient struct {
180 func NewCounterClient(cc *grpc.ClientConn) CounterClient {
181 return &counterClient{cc}
184 func (c *counterClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
185 out := new(GetResponse)
186 err := grpc.Invoke(ctx, "/proto.Counter/Get", in, out, c.cc, opts...)
193 func (c *counterClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error) {
195 err := grpc.Invoke(ctx, "/proto.Counter/Put", in, out, c.cc, opts...)
202 // Server API for Counter service
204 type CounterServer interface {
205 Get(context.Context, *GetRequest) (*GetResponse, error)
206 Put(context.Context, *PutRequest) (*Empty, error)
209 func RegisterCounterServer(s *grpc.Server, srv CounterServer) {
210 s.RegisterService(&_Counter_serviceDesc, srv)
213 func _Counter_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
214 in := new(GetRequest)
215 if err := dec(in); err != nil {
218 if interceptor == nil {
219 return srv.(CounterServer).Get(ctx, in)
221 info := &grpc.UnaryServerInfo{
223 FullMethod: "/proto.Counter/Get",
225 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
226 return srv.(CounterServer).Get(ctx, req.(*GetRequest))
228 return interceptor(ctx, in, info, handler)
231 func _Counter_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
232 in := new(PutRequest)
233 if err := dec(in); err != nil {
236 if interceptor == nil {
237 return srv.(CounterServer).Put(ctx, in)
239 info := &grpc.UnaryServerInfo{
241 FullMethod: "/proto.Counter/Put",
243 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
244 return srv.(CounterServer).Put(ctx, req.(*PutRequest))
246 return interceptor(ctx, in, info, handler)
249 var _Counter_serviceDesc = grpc.ServiceDesc{
250 ServiceName: "proto.Counter",
251 HandlerType: (*CounterServer)(nil),
252 Methods: []grpc.MethodDesc{
255 Handler: _Counter_Get_Handler,
259 Handler: _Counter_Put_Handler,
262 Streams: []grpc.StreamDesc{},
263 Metadata: "kv.proto",
266 // Client API for AddHelper service
268 type AddHelperClient interface {
269 Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error)
272 type addHelperClient struct {
276 func NewAddHelperClient(cc *grpc.ClientConn) AddHelperClient {
277 return &addHelperClient{cc}
280 func (c *addHelperClient) Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error) {
281 out := new(SumResponse)
282 err := grpc.Invoke(ctx, "/proto.AddHelper/Sum", in, out, c.cc, opts...)
289 // Server API for AddHelper service
291 type AddHelperServer interface {
292 Sum(context.Context, *SumRequest) (*SumResponse, error)
295 func RegisterAddHelperServer(s *grpc.Server, srv AddHelperServer) {
296 s.RegisterService(&_AddHelper_serviceDesc, srv)
299 func _AddHelper_Sum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
300 in := new(SumRequest)
301 if err := dec(in); err != nil {
304 if interceptor == nil {
305 return srv.(AddHelperServer).Sum(ctx, in)
307 info := &grpc.UnaryServerInfo{
309 FullMethod: "/proto.AddHelper/Sum",
311 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
312 return srv.(AddHelperServer).Sum(ctx, req.(*SumRequest))
314 return interceptor(ctx, in, info, handler)
317 var _AddHelper_serviceDesc = grpc.ServiceDesc{
318 ServiceName: "proto.AddHelper",
319 HandlerType: (*AddHelperServer)(nil),
320 Methods: []grpc.MethodDesc{
323 Handler: _AddHelper_Sum_Handler,
326 Streams: []grpc.StreamDesc{},
327 Metadata: "kv.proto",
330 func init() { proto1.RegisterFile("kv.proto", fileDescriptor0) }
332 var fileDescriptor0 = []byte{
333 // 253 bytes of a gzipped FileDescriptorProto
334 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x4f, 0x4b, 0x03, 0x31,
335 0x10, 0xc5, 0x89, 0x61, 0xad, 0xfb, 0xba, 0x82, 0x06, 0x0f, 0x52, 0x51, 0x24, 0x82, 0xf4, 0x20,
336 0x3d, 0xd4, 0x93, 0x47, 0x11, 0xa9, 0xc7, 0x92, 0xfd, 0x00, 0x25, 0x4b, 0xe6, 0xd4, 0x6e, 0x77,
337 0xcd, 0x26, 0x0b, 0xfd, 0xf6, 0xa5, 0xd9, 0x3f, 0xd9, 0x53, 0x32, 0x2f, 0x2f, 0xbf, 0x37, 0x33,
338 0xb8, 0xd9, 0xb7, 0xab, 0xda, 0x56, 0xae, 0x12, 0x49, 0x38, 0xe4, 0x0b, 0xb0, 0x21, 0xa7, 0xe8,
339 0xdf, 0x53, 0xe3, 0xc4, 0x1d, 0xf8, 0x9e, 0x4e, 0x8f, 0xec, 0x95, 0x2d, 0x53, 0x75, 0xb9, 0xca,
340 0x37, 0xcc, 0xc3, 0x7b, 0x53, 0x57, 0xc7, 0x86, 0xc4, 0x03, 0x92, 0x56, 0x1f, 0x3c, 0x05, 0x0b,
341 0x57, 0x5d, 0x21, 0x73, 0x60, 0xeb, 0x47, 0xc8, 0x33, 0xa0, 0x8d, 0xd9, 0x35, 0x64, 0x5b, 0xb2,
342 0xc1, 0x78, 0xab, 0x52, 0x6d, 0x4c, 0x1e, 0x84, 0x21, 0xe3, 0x6a, 0xcc, 0x88, 0x50, 0x3e, 0x85,
343 0xce, 0x90, 0xfc, 0x96, 0xb5, 0x3b, 0xc9, 0x25, 0x90, 0xfb, 0x72, 0xa0, 0x67, 0x60, 0xba, 0x4f,
344 0x67, 0xfa, 0x52, 0x15, 0x01, 0xc5, 0x15, 0x2b, 0xe4, 0x13, 0xe6, 0xc1, 0xd9, 0x37, 0x9b, 0x81,
345 0xd9, 0xc1, 0x6a, 0xd7, 0x3b, 0xcc, 0x7e, 0x2a, 0x7f, 0x74, 0x64, 0xc5, 0x07, 0xf8, 0x86, 0x9c,
346 0xb8, 0xef, 0x56, 0xb1, 0x8a, 0x0b, 0x58, 0x88, 0xa9, 0xd4, 0x63, 0xde, 0xc1, 0xb7, 0x3e, 0xba,
347 0xe3, 0xa4, 0x8b, 0xac, 0x97, 0x42, 0x9f, 0xeb, 0x2f, 0xa4, 0xdf, 0xc6, 0xfc, 0xd1, 0xa1, 0xee,
348 0x22, 0x72, 0x5f, 0x8e, 0x9f, 0xe2, 0x00, 0x63, 0xc4, 0xa4, 0xd3, 0xe2, 0x3a, 0x48, 0x9f, 0xe7,
349 0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0xa3, 0x85, 0x07, 0x9f, 0x01, 0x00, 0x00,