OLD | NEW |
1 // Code generated by protoc-gen-go. | 1 // Code generated by protoc-gen-go. |
2 // source: test.proto | 2 // source: test.proto |
3 // DO NOT EDIT! | 3 // DO NOT EDIT! |
4 | 4 |
5 /* | 5 /* |
6 Package test is a generated protocol buffer package. | 6 Package test is a generated protocol buffer package. |
7 | 7 |
8 It is generated from these files: | 8 It is generated from these files: |
9 test.proto | 9 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 */ | 14 */ |
15 package test | 15 package test |
16 | 16 |
| 17 import prpccommon "github.com/luci/luci-go/common/prpc" |
17 import prpc "github.com/luci/luci-go/server/prpc" | 18 import prpc "github.com/luci/luci-go/server/prpc" |
18 | 19 |
19 import proto "github.com/golang/protobuf/proto" | 20 import proto "github.com/golang/protobuf/proto" |
20 import fmt "fmt" | 21 import fmt "fmt" |
21 import math "math" | 22 import math "math" |
22 | 23 |
23 import ( | 24 import ( |
24 context "golang.org/x/net/context" | 25 context "golang.org/x/net/context" |
25 grpc "google.golang.org/grpc" | 26 grpc "google.golang.org/grpc" |
26 ) | 27 ) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Reference imports to suppress errors if they are not otherwise used. | 59 // Reference imports to suppress errors if they are not otherwise used. |
59 var _ context.Context | 60 var _ context.Context |
60 var _ grpc.ClientConn | 61 var _ grpc.ClientConn |
61 | 62 |
62 // Client API for Greeter service | 63 // Client API for Greeter service |
63 | 64 |
64 type GreeterClient interface { | 65 type GreeterClient interface { |
65 // Sends a greeting | 66 // Sends a greeting |
66 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption)
(*HelloReply, error) | 67 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption)
(*HelloReply, error) |
67 } | 68 } |
| 69 type greeterPRPCClient struct { |
| 70 client *prpccommon.Client |
| 71 } |
| 72 |
| 73 func NewGreeterPRPCClient(client *prpccommon.Client) GreeterClient { |
| 74 return &greeterPRPCClient{client} |
| 75 } |
| 76 |
| 77 func (c *greeterPRPCClient) SayHello(ctx context.Context, in *HelloRequest, opts
...grpc.CallOption) (*HelloReply, error) { |
| 78 out := new(HelloReply) |
| 79 err := c.client.Call(ctx, "test.Greeter", "SayHello", in, out, opts...) |
| 80 if err != nil { |
| 81 return nil, err |
| 82 } |
| 83 return out, nil |
| 84 } |
68 | 85 |
69 type greeterClient struct { | 86 type greeterClient struct { |
70 cc *grpc.ClientConn | 87 cc *grpc.ClientConn |
71 } | 88 } |
72 | 89 |
73 func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { | 90 func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { |
74 return &greeterClient{cc} | 91 return &greeterClient{cc} |
75 } | 92 } |
76 | 93 |
77 func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...
grpc.CallOption) (*HelloReply, error) { | 94 func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...
grpc.CallOption) (*HelloReply, error) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2,
0x2a, 0x49, 0x2d, 0x2e, | 140 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2,
0x2a, 0x49, 0x2d, 0x2e, |
124 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0x95, 0x64,
0xb8, 0x78, 0x3c, 0x52, | 141 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0x95, 0x64,
0xb8, 0x78, 0x3c, 0x52, |
125 0x73, 0x72, 0xf2, 0x83, 0x52, 0x0b, 0x4b, 0x81, 0x7c, 0x21, 0x1e, 0x2e,
0x96, 0xbc, 0xc4, 0xdc, | 142 0x73, 0x72, 0xf2, 0x83, 0x52, 0x0b, 0x4b, 0x81, 0x7c, 0x21, 0x1e, 0x2e,
0x96, 0xbc, 0xc4, 0xdc, |
126 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x25, 0x59, 0x2e, 0x2e, 0xa8,
0x6c, 0x41, 0x4e, 0xa5, | 143 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x25, 0x59, 0x2e, 0x2e, 0xa8,
0x6c, 0x41, 0x4e, 0xa5, |
127 0x10, 0x3f, 0x17, 0x7b, 0x6e, 0x6a, 0x71, 0x71, 0x62, 0x3a, 0x54, 0xda,
0xc8, 0x96, 0x8b, 0xdd, | 144 0x10, 0x3f, 0x17, 0x7b, 0x6e, 0x6a, 0x71, 0x71, 0x62, 0x3a, 0x54, 0xda,
0xc8, 0x96, 0x8b, 0xdd, |
128 0xbd, 0x28, 0x35, 0xb5, 0x24, 0xb5, 0x48, 0xc8, 0x88, 0x8b, 0x23, 0x38,
0xb1, 0x12, 0xac, 0x58, | 145 0xbd, 0x28, 0x35, 0xb5, 0x24, 0xb5, 0x48, 0xc8, 0x88, 0x8b, 0x23, 0x38,
0xb1, 0x12, 0xac, 0x58, |
129 0x48, 0x48, 0x0f, 0x6c, 0x0d, 0xb2, 0xb9, 0x52, 0x02, 0x28, 0x62, 0x40,
0xd3, 0x94, 0x18, 0x92, | 146 0x48, 0x48, 0x0f, 0x6c, 0x0d, 0xb2, 0xb9, 0x52, 0x02, 0x28, 0x62, 0x40,
0xd3, 0x94, 0x18, 0x92, |
130 0xd8, 0xc0, 0x0e, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x61, 0x7c,
0x92, 0xb8, 0x96, 0x00, | 147 0xd8, 0xc0, 0x0e, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x61, 0x7c,
0x92, 0xb8, 0x96, 0x00, |
131 0x00, 0x00, | 148 0x00, 0x00, |
132 } | 149 } |
OLD | NEW |