Created
November 8, 2016 21:46
-
-
Save jordanorelli/fbade2249d425d2afb56f029578d4936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/helloworld/helloworld/helloworld.pb.go b/examples/helloworld/helloworld/helloworld.pb.go | |
index c8c8942..f373533 100644 | |
--- a/examples/helloworld/helloworld/helloworld.pb.go | |
+++ b/examples/helloworld/helloworld/helloworld.pb.go | |
@@ -72,6 +72,7 @@ const _ = grpc.SupportPackageIsVersion4 | |
type GreeterClient interface { | |
// Sends a greeting | |
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) | |
+ SayHelloAgain(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) | |
} | |
type greeterClient struct { | |
@@ -91,11 +92,21 @@ func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ... | |
return out, nil | |
} | |
+func (c *greeterClient) SayHelloAgain(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) { | |
+ out := new(HelloReply) | |
+ err := grpc.Invoke(ctx, "/helloworld.Greeter/SayHelloAgain", in, out, c.cc, opts...) | |
+ if err != nil { | |
+ return nil, err | |
+ } | |
+ return out, nil | |
+} | |
+ | |
// Server API for Greeter service | |
type GreeterServer interface { | |
// Sends a greeting | |
SayHello(context.Context, *HelloRequest) (*HelloReply, error) | |
+ SayHelloAgain(context.Context, *HelloRequest) (*HelloReply, error) | |
} | |
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) { | |
@@ -120,6 +131,24 @@ func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(in | |
return interceptor(ctx, in, info, handler) | |
} | |
+func _Greeter_SayHelloAgain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |
+ in := new(HelloRequest) | |
+ if err := dec(in); err != nil { | |
+ return nil, err | |
+ } | |
+ if interceptor == nil { | |
+ return srv.(GreeterServer).SayHelloAgain(ctx, in) | |
+ } | |
+ info := &grpc.UnaryServerInfo{ | |
+ Server: srv, | |
+ FullMethod: "/helloworld.Greeter/SayHelloAgain", | |
+ } | |
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |
+ return srv.(GreeterServer).SayHelloAgain(ctx, req.(*HelloRequest)) | |
+ } | |
+ return interceptor(ctx, in, info, handler) | |
+} | |
+ | |
var _Greeter_serviceDesc = grpc.ServiceDesc{ | |
ServiceName: "helloworld.Greeter", | |
HandlerType: (*GreeterServer)(nil), | |
@@ -128,6 +157,10 @@ var _Greeter_serviceDesc = grpc.ServiceDesc{ | |
MethodName: "SayHello", | |
Handler: _Greeter_SayHello_Handler, | |
}, | |
+ { | |
+ MethodName: "SayHelloAgain", | |
+ Handler: _Greeter_SayHelloAgain_Handler, | |
+ }, | |
}, | |
Streams: []grpc.StreamDesc{}, | |
Metadata: "helloworld.proto", | |
@@ -136,16 +169,17 @@ var _Greeter_serviceDesc = grpc.ServiceDesc{ | |
func init() { proto.RegisterFile("helloworld.proto", fileDescriptor0) } | |
var fileDescriptor0 = []byte{ | |
- // 174 bytes of a gzipped FileDescriptorProto | |
+ // 190 bytes of a gzipped FileDescriptorProto | |
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0x48, 0xcd, 0xc9, | |
0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, | |
0x28, 0x29, 0x71, 0xf1, 0x78, 0x80, 0x78, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x42, | |
0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x92, | |
0x1a, 0x17, 0x17, 0x54, 0x4d, 0x41, 0x4e, 0xa5, 0x90, 0x04, 0x17, 0x7b, 0x6e, 0x6a, 0x71, 0x71, | |
- 0x62, 0x3a, 0x4c, 0x11, 0x8c, 0x6b, 0xe4, 0xc9, 0xc5, 0xee, 0x5e, 0x94, 0x9a, 0x5a, 0x92, 0x5a, | |
- 0x24, 0x64, 0xc7, 0xc5, 0x11, 0x9c, 0x58, 0x09, 0xd6, 0x25, 0x24, 0xa1, 0x87, 0xe4, 0x02, 0x64, | |
- 0xcb, 0xa4, 0xc4, 0xb0, 0xc8, 0x00, 0xad, 0x50, 0x62, 0x70, 0x32, 0xe0, 0x92, 0xce, 0xcc, 0xd7, | |
- 0x4b, 0x2f, 0x2a, 0x48, 0xd6, 0x4b, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0x46, 0x52, 0xeb, | |
- 0xc4, 0x0f, 0x56, 0x1c, 0x0e, 0x62, 0x07, 0x80, 0xbc, 0x14, 0xc0, 0x98, 0xc4, 0x06, 0xf6, 0x9b, | |
- 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xb7, 0xcd, 0xf2, 0xef, 0x00, 0x00, 0x00, | |
+ 0x62, 0x3a, 0x4c, 0x11, 0x8c, 0x6b, 0xd4, 0xc7, 0xc8, 0xc5, 0xee, 0x5e, 0x94, 0x9a, 0x5a, 0x92, | |
+ 0x5a, 0x24, 0x64, 0xc7, 0xc5, 0x11, 0x9c, 0x58, 0x09, 0xd6, 0x26, 0x24, 0xa1, 0x87, 0xe4, 0x04, | |
+ 0x64, 0xdb, 0xa4, 0xc4, 0xb0, 0xc8, 0x14, 0xe4, 0x54, 0x2a, 0x31, 0x08, 0x39, 0x73, 0xf1, 0xc2, | |
+ 0xf4, 0x3b, 0xa6, 0x27, 0x66, 0xe6, 0x91, 0x63, 0x88, 0x93, 0x01, 0x97, 0x74, 0x66, 0xbe, 0x5e, | |
+ 0x7a, 0x51, 0x41, 0xb2, 0x5e, 0x6a, 0x45, 0x62, 0x6e, 0x41, 0x4e, 0x6a, 0x31, 0x92, 0x5a, 0x27, | |
+ 0x7e, 0xb0, 0xe2, 0x70, 0x10, 0x3b, 0x00, 0x14, 0x30, 0x01, 0x8c, 0x49, 0x6c, 0xe0, 0x10, 0x32, | |
+ 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xea, 0x40, 0x66, 0x35, 0x01, 0x00, 0x00, | |
} | |
diff --git a/examples/helloworld/helloworld/helloworld.proto b/examples/helloworld/helloworld/helloworld.proto | |
index c3ddd4a..22fbcba 100644 | |
--- a/examples/helloworld/helloworld/helloworld.proto | |
+++ b/examples/helloworld/helloworld/helloworld.proto | |
@@ -39,6 +39,8 @@ package helloworld; | |
service Greeter { | |
// Sends a greeting | |
rpc SayHello (HelloRequest) returns (HelloReply) {} | |
+ | |
+ rpc SayHelloAgain (HelloRequest) returns (HelloReply) {} | |
} | |
// The request message containing the user's name. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment