OLD | NEW |
1 // Code generated by protoc-gen-go. | 1 // Code generated by protoc-gen-go. |
2 // source: helloworld_test.proto | 2 // source: helloworld_test.proto |
3 // DO NOT EDIT! | 3 // DO NOT EDIT! |
4 | 4 |
5 /* | 5 /* |
6 Package prpc is a generated protocol buffer package. | 6 Package prpc is a generated protocol buffer package. |
7 | 7 |
8 It is generated from these files: | 8 It is generated from these files: |
9 helloworld_test.proto | 9 helloworld_test.proto |
10 | 10 |
11 It has these top-level messages: | 11 It has these top-level messages: |
12 HelloRequest | 12 HelloRequest |
13 HelloReply | 13 HelloReply |
14 MultiplyRequest | 14 MultiplyRequest |
15 MultiplyResponse | 15 MultiplyResponse |
16 */ | 16 */ |
17 package prpc | 17 package prpc |
18 | 18 |
| 19 import prpccommon "github.com/luci/luci-go/common/prpc" |
| 20 |
19 import proto "github.com/golang/protobuf/proto" | 21 import proto "github.com/golang/protobuf/proto" |
20 import fmt "fmt" | 22 import fmt "fmt" |
21 import math "math" | 23 import math "math" |
22 | 24 |
23 import ( | 25 import ( |
24 context "golang.org/x/net/context" | 26 context "golang.org/x/net/context" |
25 grpc "google.golang.org/grpc" | 27 grpc "google.golang.org/grpc" |
26 ) | 28 ) |
27 | 29 |
28 // Reference imports to suppress errors if they are not otherwise used. | 30 // Reference imports to suppress errors if they are not otherwise used. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // Reference imports to suppress errors if they are not otherwise used. | 81 // Reference imports to suppress errors if they are not otherwise used. |
80 var _ context.Context | 82 var _ context.Context |
81 var _ grpc.ClientConn | 83 var _ grpc.ClientConn |
82 | 84 |
83 // Client API for Greeter service | 85 // Client API for Greeter service |
84 | 86 |
85 type GreeterClient interface { | 87 type GreeterClient interface { |
86 // Sends a greeting | 88 // Sends a greeting |
87 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption)
(*HelloReply, error) | 89 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption)
(*HelloReply, error) |
88 } | 90 } |
| 91 type greeterPRPCClient struct { |
| 92 client *prpccommon.Client |
| 93 } |
| 94 |
| 95 func NewGreeterPRPCClient(client *prpccommon.Client) GreeterClient { |
| 96 return &greeterPRPCClient{client} |
| 97 } |
| 98 func (c *greeterPRPCClient) SayHello(ctx context.Context, in *HelloRequest, opts
...grpc.CallOption) (*HelloReply, error) { |
| 99 out := new(HelloReply) |
| 100 err := c.client.Call(ctx, "prpc.Greeter", "SayHello", in, out, opts...) |
| 101 if err != nil { |
| 102 return nil, err |
| 103 } |
| 104 return out, nil |
| 105 } |
89 | 106 |
90 type greeterClient struct { | 107 type greeterClient struct { |
91 cc *grpc.ClientConn | 108 cc *grpc.ClientConn |
92 } | 109 } |
93 | 110 |
94 func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { | 111 func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { |
95 return &greeterClient{cc} | 112 return &greeterClient{cc} |
96 } | 113 } |
97 | 114 |
98 func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...
grpc.CallOption) (*HelloReply, error) { | 115 func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...
grpc.CallOption) (*HelloReply, error) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 }, | 154 }, |
138 }, | 155 }, |
139 Streams: []grpc.StreamDesc{}, | 156 Streams: []grpc.StreamDesc{}, |
140 } | 157 } |
141 | 158 |
142 // Client API for Calc service | 159 // Client API for Calc service |
143 | 160 |
144 type CalcClient interface { | 161 type CalcClient interface { |
145 Multiply(ctx context.Context, in *MultiplyRequest, opts ...grpc.CallOpti
on) (*MultiplyResponse, error) | 162 Multiply(ctx context.Context, in *MultiplyRequest, opts ...grpc.CallOpti
on) (*MultiplyResponse, error) |
146 } | 163 } |
| 164 type calcPRPCClient struct { |
| 165 client *prpccommon.Client |
| 166 } |
| 167 |
| 168 func NewCalcPRPCClient(client *prpccommon.Client) CalcClient { |
| 169 return &calcPRPCClient{client} |
| 170 } |
| 171 func (c *calcPRPCClient) Multiply(ctx context.Context, in *MultiplyRequest, opts
...grpc.CallOption) (*MultiplyResponse, error) { |
| 172 out := new(MultiplyResponse) |
| 173 err := c.client.Call(ctx, "prpc.Calc", "Multiply", in, out, opts...) |
| 174 if err != nil { |
| 175 return nil, err |
| 176 } |
| 177 return out, nil |
| 178 } |
147 | 179 |
148 type calcClient struct { | 180 type calcClient struct { |
149 cc *grpc.ClientConn | 181 cc *grpc.ClientConn |
150 } | 182 } |
151 | 183 |
152 func NewCalcClient(cc *grpc.ClientConn) CalcClient { | 184 func NewCalcClient(cc *grpc.ClientConn) CalcClient { |
153 return &calcClient{cc} | 185 return &calcClient{cc} |
154 } | 186 } |
155 | 187 |
156 func (c *calcClient) Multiply(ctx context.Context, in *MultiplyRequest, opts ...
grpc.CallOption) (*MultiplyResponse, error) { | 188 func (c *calcClient) Multiply(ctx context.Context, in *MultiplyRequest, opts ...
grpc.CallOption) (*MultiplyResponse, error) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0x30, 0x69, 0x75, 0x2e, 0x7e, 0xdf, 0xd2,
0x9c, 0x92, 0x4c, 0xa0, | 238 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0x30, 0x69, 0x75, 0x2e, 0x7e, 0xdf, 0xd2,
0x9c, 0x92, 0x4c, 0xa0, |
207 0x24, 0x4c, 0x3f, 0x27, 0x17, 0x63, 0x05, 0x58, 0x96, 0x15, 0xc4, 0xac,
0x94, 0x60, 0x02, 0x31, | 239 0x24, 0x4c, 0x3f, 0x27, 0x17, 0x63, 0x05, 0x58, 0x96, 0x15, 0xc4, 0xac,
0x94, 0x60, 0x02, 0x31, |
208 0x81, 0xe6, 0x08, 0x20, 0x14, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x82,
0xa4, 0xab, 0x20, 0x2a, | 240 0x81, 0xe6, 0x08, 0x20, 0x14, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x82,
0xa4, 0xab, 0x20, 0x2a, |
209 0x8d, 0x6c, 0xb9, 0xd8, 0xdd, 0x8b, 0x52, 0x53, 0x4b, 0x52, 0x8b, 0x84,
0x8c, 0xb8, 0x38, 0x82, | 241 0x8d, 0x6c, 0xb9, 0xd8, 0xdd, 0x8b, 0x52, 0x53, 0x4b, 0x52, 0x8b, 0x84,
0x8c, 0xb8, 0x38, 0x82, |
210 0x13, 0x2b, 0xc1, 0x96, 0x0a, 0x09, 0xe9, 0x81, 0x9c, 0xa8, 0x87, 0xec,
0x3e, 0x29, 0x01, 0x14, | 242 0x13, 0x2b, 0xc1, 0x96, 0x0a, 0x09, 0xe9, 0x81, 0x9c, 0xa8, 0x87, 0xec,
0x3e, 0x29, 0x01, 0x14, |
211 0x31, 0xa0, 0x79, 0x4a, 0x0c, 0x46, 0xce, 0x5c, 0x2c, 0xce, 0x89, 0x39,
0xc9, 0x42, 0xd6, 0x5c, | 243 0x31, 0xa0, 0x79, 0x4a, 0x0c, 0x46, 0xce, 0x5c, 0x2c, 0xce, 0x89, 0x39,
0xc9, 0x42, 0xd6, 0x5c, |
212 0x1c, 0x30, 0x5b, 0x84, 0x44, 0x21, 0xea, 0xd0, 0x9c, 0x27, 0x25, 0x86,
0x2e, 0x0c, 0x71, 0x8c, | 244 0x1c, 0x30, 0x5b, 0x84, 0x44, 0x21, 0xea, 0xd0, 0x9c, 0x27, 0x25, 0x86,
0x2e, 0x0c, 0x71, 0x8c, |
213 0x12, 0x43, 0x12, 0x1b, 0x38, 0x54, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff,
0xff, 0x91, 0x40, 0xdf, | 245 0x12, 0x43, 0x12, 0x1b, 0x38, 0x54, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff,
0xff, 0x91, 0x40, 0xdf, |
214 0xb0, 0x2e, 0x01, 0x00, 0x00, | 246 0xb0, 0x2e, 0x01, 0x00, 0x00, |
215 } | 247 } |
OLD | NEW |