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

Unified Diff: tools/cmd/cproto/testdata/twoFiles/1.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/retrain.sh ('k') | tools/cmd/cproto/testdata/twoFiles/2.pb.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cmd/cproto/testdata/twoFiles/1.pb.golden
diff --git a/tools/cmd/cproto/testdata/twoFiles/1.pb.golden b/tools/cmd/cproto/testdata/twoFiles/1.pb.golden
index 2f066436c82c65e9174b4f89b942ac0bc4883465..994e7e37695bfc4bdd74a2d15c438a3def1f6f30 100644
--- a/tools/cmd/cproto/testdata/twoFiles/1.pb.golden
+++ b/tools/cmd/cproto/testdata/twoFiles/1.pb.golden
@@ -15,6 +15,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"
@@ -63,6 +64,22 @@ var _ grpc.ClientConn
type S1Client interface {
M(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
}
+type s1PRPCClient struct {
+ client *prpccommon.Client
+}
+
+func NewS1PRPCClient(client *prpccommon.Client) S1Client {
+ return &s1PRPCClient{client}
+}
+
+func (c *s1PRPCClient) M(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error) {
+ out := new(Res)
+ err := c.client.Call(ctx, "test.S1", "M", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
type s1Client struct {
cc *grpc.ClientConn
« no previous file with comments | « tools/cmd/cproto/testdata/retrain.sh ('k') | tools/cmd/cproto/testdata/twoFiles/2.pb.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698