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

Unified Diff: tools/cmd/cproto/testdata/helloworld/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 | « server/prpc/service.go ('k') | tools/cmd/cproto/testdata/importGoogle/test.pb.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cmd/cproto/testdata/helloworld/test.pb.golden
diff --git a/tools/cmd/cproto/testdata/helloworld/test.pb.golden b/tools/cmd/cproto/testdata/helloworld/test.pb.golden
index 0a9cc036b3e8d2e674184d6e29dbbe115cf97e90..e584a7ccd48fc19840311377b3a3628859bfac27 100644
--- a/tools/cmd/cproto/testdata/helloworld/test.pb.golden
+++ b/tools/cmd/cproto/testdata/helloworld/test.pb.golden
@@ -14,6 +14,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"
@@ -65,6 +66,22 @@ type GreeterClient interface {
// Sends a greeting
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}
+type greeterPRPCClient struct {
+ client *prpccommon.Client
+}
+
+func NewGreeterPRPCClient(client *prpccommon.Client) GreeterClient {
+ return &greeterPRPCClient{client}
+}
+
+func (c *greeterPRPCClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
+ out := new(HelloReply)
+ err := c.client.Call(ctx, "test.Greeter", "SayHello", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
type greeterClient struct {
cc *grpc.ClientConn
« no previous file with comments | « server/prpc/service.go ('k') | tools/cmd/cproto/testdata/importGoogle/test.pb.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698