Codebase list golang-github-go-kit-kit / 2d34561
Merge pull request #238 from go-kit/new-grpc-defs Apparently there are new gRPC definitions upstream Peter Bourgon 8 years ago
1 changed file(s) with 72 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
2929 var _ = fmt.Errorf
3030 var _ = math.Inf
3131
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the proto package it is being compiled against.
34 const _ = proto.ProtoPackageIsVersion1
35
3236 // The sum request contains two parameters.
3337 type SumRequest struct {
3438 A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
3539 B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"`
3640 }
3741
38 func (m *SumRequest) Reset() { *m = SumRequest{} }
39 func (m *SumRequest) String() string { return proto.CompactTextString(m) }
40 func (*SumRequest) ProtoMessage() {}
42 func (m *SumRequest) Reset() { *m = SumRequest{} }
43 func (m *SumRequest) String() string { return proto.CompactTextString(m) }
44 func (*SumRequest) ProtoMessage() {}
45 func (*SumRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
4146
4247 // The sum response contains the result of the calculation.
4348 type SumReply struct {
4449 V int64 `protobuf:"varint,1,opt,name=v" json:"v,omitempty"`
4550 }
4651
47 func (m *SumReply) Reset() { *m = SumReply{} }
48 func (m *SumReply) String() string { return proto.CompactTextString(m) }
49 func (*SumReply) ProtoMessage() {}
52 func (m *SumReply) Reset() { *m = SumReply{} }
53 func (m *SumReply) String() string { return proto.CompactTextString(m) }
54 func (*SumReply) ProtoMessage() {}
55 func (*SumReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
5056
5157 // The Concat request contains two parameters.
5258 type ConcatRequest struct {
5460 B string `protobuf:"bytes,2,opt,name=b" json:"b,omitempty"`
5561 }
5662
57 func (m *ConcatRequest) Reset() { *m = ConcatRequest{} }
58 func (m *ConcatRequest) String() string { return proto.CompactTextString(m) }
59 func (*ConcatRequest) ProtoMessage() {}
63 func (m *ConcatRequest) Reset() { *m = ConcatRequest{} }
64 func (m *ConcatRequest) String() string { return proto.CompactTextString(m) }
65 func (*ConcatRequest) ProtoMessage() {}
66 func (*ConcatRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
6067
6168 // The Concat response contains the result of the concatenation.
6269 type ConcatReply struct {
6370 V string `protobuf:"bytes,1,opt,name=v" json:"v,omitempty"`
6471 }
6572
66 func (m *ConcatReply) Reset() { *m = ConcatReply{} }
67 func (m *ConcatReply) String() string { return proto.CompactTextString(m) }
68 func (*ConcatReply) ProtoMessage() {}
73 func (m *ConcatReply) Reset() { *m = ConcatReply{} }
74 func (m *ConcatReply) String() string { return proto.CompactTextString(m) }
75 func (*ConcatReply) ProtoMessage() {}
76 func (*ConcatReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
77
78 func init() {
79 proto.RegisterType((*SumRequest)(nil), "pb.SumRequest")
80 proto.RegisterType((*SumReply)(nil), "pb.SumReply")
81 proto.RegisterType((*ConcatRequest)(nil), "pb.ConcatRequest")
82 proto.RegisterType((*ConcatReply)(nil), "pb.ConcatReply")
83 }
6984
7085 // Reference imports to suppress errors if they are not otherwise used.
7186 var _ context.Context
7287 var _ grpc.ClientConn
88
89 // This is a compile-time assertion to ensure that this generated file
90 // is compatible with the grpc package it is being compiled against.
91 const _ = grpc.SupportPackageIsVersion2
7392
7493 // Client API for Add service
7594
119138 s.RegisterService(&_Add_serviceDesc, srv)
120139 }
121140
122 func _Add_Sum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
141 func _Add_Sum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
123142 in := new(SumRequest)
124143 if err := dec(in); err != nil {
125144 return nil, err
126145 }
127 out, err := srv.(AddServer).Sum(ctx, in)
128 if err != nil {
129 return nil, err
130 }
131 return out, nil
132 }
133
134 func _Add_Concat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
146 if interceptor == nil {
147 return srv.(AddServer).Sum(ctx, in)
148 }
149 info := &grpc.UnaryServerInfo{
150 Server: srv,
151 FullMethod: "/pb.Add/Sum",
152 }
153 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
154 return srv.(AddServer).Sum(ctx, req.(*SumRequest))
155 }
156 return interceptor(ctx, in, info, handler)
157 }
158
159 func _Add_Concat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
135160 in := new(ConcatRequest)
136161 if err := dec(in); err != nil {
137162 return nil, err
138163 }
139 out, err := srv.(AddServer).Concat(ctx, in)
140 if err != nil {
141 return nil, err
142 }
143 return out, nil
164 if interceptor == nil {
165 return srv.(AddServer).Concat(ctx, in)
166 }
167 info := &grpc.UnaryServerInfo{
168 Server: srv,
169 FullMethod: "/pb.Add/Concat",
170 }
171 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
172 return srv.(AddServer).Concat(ctx, req.(*ConcatRequest))
173 }
174 return interceptor(ctx, in, info, handler)
144175 }
145176
146177 var _Add_serviceDesc = grpc.ServiceDesc{
158189 },
159190 Streams: []grpc.StreamDesc{},
160191 }
192
193 var fileDescriptor0 = []byte{
194 // 171 bytes of a gzipped FileDescriptorProto
195 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0x4c, 0x49, 0xd1,
196 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0xd2, 0xe0, 0xe2, 0x0a, 0x2e, 0xcd,
197 0x0d, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0xe2, 0xe1, 0x62, 0x4c, 0x94, 0x60, 0x54, 0x60,
198 0xd4, 0x60, 0x0e, 0x62, 0x4c, 0x04, 0xf1, 0x92, 0x24, 0x98, 0x20, 0xbc, 0x24, 0x25, 0x09, 0x2e,
199 0x0e, 0xb0, 0xca, 0x82, 0x9c, 0x4a, 0x90, 0x4c, 0x19, 0x4c, 0x5d, 0x99, 0x92, 0x36, 0x17, 0xaf,
200 0x73, 0x7e, 0x5e, 0x72, 0x62, 0x09, 0x86, 0x31, 0x9c, 0x28, 0xc6, 0x70, 0x82, 0x8c, 0x91, 0xe6,
201 0xe2, 0x86, 0x29, 0x46, 0x31, 0x09, 0x28, 0x59, 0x66, 0x14, 0xc3, 0xc5, 0xec, 0x98, 0x92, 0x22,
202 0xa4, 0xca, 0xc5, 0x0c, 0xb4, 0x4a, 0x88, 0x4f, 0xaf, 0x20, 0x49, 0x0f, 0xe1, 0x3a, 0x29, 0x1e,
203 0x38, 0x1f, 0xa8, 0x53, 0x89, 0x41, 0x48, 0x8f, 0x8b, 0x0d, 0x62, 0x94, 0x90, 0x20, 0x48, 0x06,
204 0xc5, 0x0d, 0x52, 0xfc, 0xc8, 0x42, 0x60, 0xf5, 0x49, 0x6c, 0x60, 0x6f, 0x1b, 0x03, 0x02, 0x00,
205 0x00, 0xff, 0xff, 0xb4, 0xc9, 0xe7, 0x58, 0x03, 0x01, 0x00, 0x00,
206 }