Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: tools/cmd/cproto/testdata/importGoogle/test.pb.golden

Issue 1605363002: common/prpc, tools/cmd/cproto: prpc client (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: rebased and addressed comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cmd/cproto/testdata/helloworld/test.pb.golden ('k') | tools/cmd/cproto/testdata/retrain.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cmd/cproto/testdata/importGoogle/test.pb.golden
diff --git a/tools/cmd/cproto/testdata/importGoogle/test.pb.golden b/tools/cmd/cproto/testdata/importGoogle/test.pb.golden
index 96db5012b125cbda8b5697d7833b173ae20dbe3d..9c6d7bc956eb1bd6d919802681d6a02958f2db27 100644
--- a/tools/cmd/cproto/testdata/importGoogle/test.pb.golden
+++ b/tools/cmd/cproto/testdata/importGoogle/test.pb.golden
@@ -13,6 +13,7 @@ It has these top-level messages:
*/
package test
+import prpccommon "github.com/luci/luci-go/common/prpc"
import prpc "github.com/luci/luci-go/server/prpc"
import proto "github.com/golang/protobuf/proto"
@@ -53,6 +54,31 @@ type GreeterClient interface {
Describe(ctx context.Context, in *Void, opts ...grpc.CallOption) (*google_protobuf.FileDescriptorProto, error)
Timestamp(ctx context.Context, in *Void, opts ...grpc.CallOption) (*google_protobuf1.Timestamp, error)
}
+type greeterPRPCClient struct {
+ client *prpccommon.Client
+}
+
+func NewGreeterPRPCClient(client *prpccommon.Client) GreeterClient {
+ return &greeterPRPCClient{client}
+}
+
+func (c *greeterPRPCClient) Describe(ctx context.Context, in *Void, opts ...grpc.CallOption) (*google_protobuf.FileDescriptorProto, error) {
+ out := new(google_protobuf.FileDescriptorProto)
+ err := c.client.Call(ctx, "test.Greeter", "Describe", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *greeterPRPCClient) Timestamp(ctx context.Context, in *Void, opts ...grpc.CallOption) (*google_protobuf1.Timestamp, error) {
+ out := new(google_protobuf1.Timestamp)
+ err := c.client.Call(ctx, "test.Greeter", "Timestamp", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
type greeterClient struct {
cc *grpc.ClientConn
« no previous file with comments | « tools/cmd/cproto/testdata/helloworld/test.pb.golden ('k') | tools/cmd/cproto/testdata/retrain.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698