Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type Greeter_SayHelloStreamingReplyClient
- type Greeter_SayHelloStreamingReplyServer
- type Greeter_SayHelloStreamingRequestClient
- type Greeter_SayHelloStreamingRequestReplyClient
- type Greeter_SayHelloStreamingRequestReplyServer
- type Greeter_SayHelloStreamingRequestServer
- type HelloReply
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetName() string
- func (x *HelloRequest) GetNested() *HelloRequest_Nested
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type HelloRequest_Nested
- func (*HelloRequest_Nested) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest_Nested) GetInternalValue() string
- func (*HelloRequest_Nested) ProtoMessage()
- func (x *HelloRequest_Nested) ProtoReflect() protoreflect.Message
- func (x *HelloRequest_Nested) Reset()
- func (x *HelloRequest_Nested) String() string
- type UnimplementedGreeterServer
- func (*UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
- func (*UnimplementedGreeterServer) SayHelloStreamingReply(*HelloRequest, Greeter_SayHelloStreamingReplyServer) error
- func (*UnimplementedGreeterServer) SayHelloStreamingRequest(Greeter_SayHelloStreamingRequestServer) error
- func (*UnimplementedGreeterServer) SayHelloStreamingRequestReply(Greeter_SayHelloStreamingRequestReplyServer) error
Constants ¶
This section is empty.
Variables ¶
var File_helloworld_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = _Greeter_serviceDesc // nolint: golint
Greeter_ServiceDesc is just the servicedesc We do this as a hack to work around older versions of generated protobufs (<1.37, at least)
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) SayHelloStreamingReply(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Greeter_SayHelloStreamingReplyClient, error) SayHelloStreamingRequest(ctx context.Context, opts ...grpc.CallOption) (Greeter_SayHelloStreamingRequestClient, error) SayHelloStreamingRequestReply(ctx context.Context, opts ...grpc.CallOption) (Greeter_SayHelloStreamingRequestReplyClient, error) }
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.
func NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) SayHelloStreamingReply(*HelloRequest, Greeter_SayHelloStreamingReplyServer) error SayHelloStreamingRequest(Greeter_SayHelloStreamingRequestServer) error SayHelloStreamingRequestReply(Greeter_SayHelloStreamingRequestReplyServer) error }
GreeterServer is the server API for Greeter service.
type Greeter_SayHelloStreamingReplyClient ¶
type Greeter_SayHelloStreamingReplyClient interface { Recv() (*HelloReply, error) grpc.ClientStream }
type Greeter_SayHelloStreamingReplyServer ¶
type Greeter_SayHelloStreamingReplyServer interface { Send(*HelloReply) error grpc.ServerStream }
type Greeter_SayHelloStreamingRequestClient ¶
type Greeter_SayHelloStreamingRequestClient interface { Send(*HelloRequest) error CloseAndRecv() (*HelloReply, error) grpc.ClientStream }
type Greeter_SayHelloStreamingRequestReplyClient ¶
type Greeter_SayHelloStreamingRequestReplyClient interface { Send(*HelloRequest) error Recv() (*HelloReply, error) grpc.ClientStream }
type Greeter_SayHelloStreamingRequestReplyServer ¶
type Greeter_SayHelloStreamingRequestReplyServer interface { Send(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type Greeter_SayHelloStreamingRequestServer ¶
type Greeter_SayHelloStreamingRequestServer interface { SendAndClose(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Nested *HelloRequest_Nested `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) GetNested ¶
func (x *HelloRequest) GetNested() *HelloRequest_Nested
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloRequest_Nested ¶
type HelloRequest_Nested struct { InternalValue string `protobuf:"bytes,1,opt,name=internalValue,proto3" json:"internalValue,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest_Nested) Descriptor
deprecated
func (*HelloRequest_Nested) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest_Nested.ProtoReflect.Descriptor instead.
func (*HelloRequest_Nested) GetInternalValue ¶
func (x *HelloRequest_Nested) GetInternalValue() string
func (*HelloRequest_Nested) ProtoMessage ¶
func (*HelloRequest_Nested) ProtoMessage()
func (*HelloRequest_Nested) ProtoReflect ¶
func (x *HelloRequest_Nested) ProtoReflect() protoreflect.Message
func (*HelloRequest_Nested) Reset ¶
func (x *HelloRequest_Nested) Reset()
func (*HelloRequest_Nested) String ¶
func (x *HelloRequest_Nested) String() string
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer can be embedded to have forward compatible implementations.
func (*UnimplementedGreeterServer) SayHello ¶
func (*UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
func (*UnimplementedGreeterServer) SayHelloStreamingReply ¶
func (*UnimplementedGreeterServer) SayHelloStreamingReply(*HelloRequest, Greeter_SayHelloStreamingReplyServer) error
func (*UnimplementedGreeterServer) SayHelloStreamingRequest ¶
func (*UnimplementedGreeterServer) SayHelloStreamingRequest(Greeter_SayHelloStreamingRequestServer) error
func (*UnimplementedGreeterServer) SayHelloStreamingRequestReply ¶
func (*UnimplementedGreeterServer) SayHelloStreamingRequestReply(Greeter_SayHelloStreamingRequestReplyServer) error