| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: go.chromium.org/luci/examples/k8s/helloworld/apipb/helloworld.proto |
| |
| package apipb |
| |
| import prpc "go.chromium.org/luci/grpc/prpc" |
| |
| import ( |
| context "context" |
| fmt "fmt" |
| proto "github.com/golang/protobuf/proto" |
| empty "github.com/golang/protobuf/ptypes/empty" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| math "math" |
| ) |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the proto package it is being compiled against. |
| // A compilation error at this line likely means your copy of the |
| // proto package needs to be updated. |
| const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| |
| func init() { |
| proto.RegisterFile("go.chromium.org/luci/examples/k8s/helloworld/apipb/helloworld.proto", fileDescriptor_9b18952dfbbf65f9) |
| } |
| |
| var fileDescriptor_9b18952dfbbf65f9 = []byte{ |
| // 164 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4e, 0xcf, 0xd7, 0x4b, |
| 0xce, 0x28, 0xca, 0xcf, 0xcd, 0x2c, 0xcd, 0xd5, 0xcb, 0x2f, 0x4a, 0xd7, 0xcf, 0x29, 0x4d, 0xce, |
| 0xd4, 0x4f, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0xcf, 0xb6, 0x28, 0xd6, 0xcf, 0x48, |
| 0xcd, 0xc9, 0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x4f, 0x2c, 0xc8, 0x2c, 0x48, 0x42, 0x12, |
| 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x00, 0x69, 0xd2, 0x83, 0x69, 0xd2, 0x43, 0xc8, |
| 0x4b, 0x49, 0xa7, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x83, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0xa7, |
| 0xe6, 0x16, 0x94, 0x54, 0x42, 0xb4, 0x19, 0xb9, 0x70, 0xb1, 0xbb, 0x17, 0xa5, 0xa6, 0x96, 0xa4, |
| 0x16, 0x09, 0x59, 0x72, 0xb1, 0x06, 0x27, 0x56, 0x7a, 0x64, 0x0a, 0x89, 0xe9, 0x41, 0x74, 0xe8, |
| 0xc1, 0x74, 0xe8, 0xb9, 0x82, 0x74, 0x48, 0xe1, 0x10, 0x57, 0x62, 0x70, 0x62, 0x8f, 0x62, 0x05, |
| 0x3b, 0x2b, 0x89, 0x0d, 0x2c, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x69, 0xd4, 0x75, |
| 0xd3, 0x00, 0x00, 0x00, |
| } |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ context.Context |
| var _ grpc.ClientConnInterface |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| const _ = grpc.SupportPackageIsVersion6 |
| |
| // GreeterClient is the client API for Greeter service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type GreeterClient interface { |
| SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) |
| } |
| type greeterPRPCClient struct { |
| client *prpc.Client |
| } |
| |
| func NewGreeterPRPCClient(client *prpc.Client) GreeterClient { |
| return &greeterPRPCClient{client} |
| } |
| |
| func (c *greeterPRPCClient) SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.client.Call(ctx, "luci.examples.helloworld.Greeter", "SayHi", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| type greeterClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { |
| return &greeterClient{cc} |
| } |
| |
| func (c *greeterClient) SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/luci.examples.helloworld.Greeter/SayHi", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // GreeterServer is the server API for Greeter service. |
| type GreeterServer interface { |
| SayHi(context.Context, *empty.Empty) (*empty.Empty, error) |
| } |
| |
| // UnimplementedGreeterServer can be embedded to have forward compatible implementations. |
| type UnimplementedGreeterServer struct { |
| } |
| |
| func (*UnimplementedGreeterServer) SayHi(ctx context.Context, req *empty.Empty) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method SayHi not implemented") |
| } |
| |
| func RegisterGreeterServer(s prpc.Registrar, srv GreeterServer) { |
| s.RegisterService(&_Greeter_serviceDesc, srv) |
| } |
| |
| func _Greeter_SayHi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(empty.Empty) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(GreeterServer).SayHi(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/luci.examples.helloworld.Greeter/SayHi", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(GreeterServer).SayHi(ctx, req.(*empty.Empty)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| var _Greeter_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "luci.examples.helloworld.Greeter", |
| HandlerType: (*GreeterServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "SayHi", |
| Handler: _Greeter_SayHi_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "go.chromium.org/luci/examples/k8s/helloworld/apipb/helloworld.proto", |
| } |