Merge pull request #238 from go-kit/new-grpc-defs
Apparently there are new gRPC definitions upstream
Peter Bourgon
8 years ago
29 | 29 | var _ = fmt.Errorf |
30 | 30 | var _ = math.Inf |
31 | 31 | |
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 | ||
32 | 36 | // The sum request contains two parameters. |
33 | 37 | type SumRequest struct { |
34 | 38 | A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` |
35 | 39 | B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"` |
36 | 40 | } |
37 | 41 | |
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} } | |
41 | 46 | |
42 | 47 | // The sum response contains the result of the calculation. |
43 | 48 | type SumReply struct { |
44 | 49 | V int64 `protobuf:"varint,1,opt,name=v" json:"v,omitempty"` |
45 | 50 | } |
46 | 51 | |
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} } | |
50 | 56 | |
51 | 57 | // The Concat request contains two parameters. |
52 | 58 | type ConcatRequest struct { |
54 | 60 | B string `protobuf:"bytes,2,opt,name=b" json:"b,omitempty"` |
55 | 61 | } |
56 | 62 | |
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} } | |
60 | 67 | |
61 | 68 | // The Concat response contains the result of the concatenation. |
62 | 69 | type ConcatReply struct { |
63 | 70 | V string `protobuf:"bytes,1,opt,name=v" json:"v,omitempty"` |
64 | 71 | } |
65 | 72 | |
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 | } | |
69 | 84 | |
70 | 85 | // Reference imports to suppress errors if they are not otherwise used. |
71 | 86 | var _ context.Context |
72 | 87 | 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 | |
73 | 92 | |
74 | 93 | // Client API for Add service |
75 | 94 | |
119 | 138 | s.RegisterService(&_Add_serviceDesc, srv) |
120 | 139 | } |
121 | 140 | |
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) { | |
123 | 142 | in := new(SumRequest) |
124 | 143 | if err := dec(in); err != nil { |
125 | 144 | return nil, err |
126 | 145 | } |
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) { | |
135 | 160 | in := new(ConcatRequest) |
136 | 161 | if err := dec(in); err != nil { |
137 | 162 | return nil, err |
138 | 163 | } |
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) | |
144 | 175 | } |
145 | 176 | |
146 | 177 | var _Add_serviceDesc = grpc.ServiceDesc{ |
158 | 189 | }, |
159 | 190 | Streams: []grpc.StreamDesc{}, |
160 | 191 | } |
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 | } |