Documentation ¶
Index ¶
- Variables
- func RegisterGreetsServer(s *grpc.Server, srv GreetsServer)
- type GreetsClient
- type GreetsServer
- type Greets_SayHelloClient
- type Greets_SayHelloServer
- type HelloReply
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetMessage() string
- func (x *HelloRequest) GetName() string
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type UnimplementedGreetsServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_server_stream_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGreetsServer ¶
func RegisterGreetsServer(s *grpc.Server, srv GreetsServer)
Types ¶
type GreetsClient ¶
type GreetsClient interface {
SayHello(ctx context.Context, opts ...grpc.CallOption) (Greets_SayHelloClient, error)
}
GreetsClient is the client API for Greets service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreetsClient ¶
func NewGreetsClient(cc grpc.ClientConnInterface) GreetsClient
type GreetsServer ¶
type GreetsServer interface {
SayHello(Greets_SayHelloServer) error
}
GreetsServer is the server API for Greets service.
type Greets_SayHelloClient ¶
type Greets_SayHelloClient interface { Send(*HelloRequest) error CloseAndRecv() (*HelloReply, error) grpc.ClientStream }
type Greets_SayHelloServer ¶
type Greets_SayHelloServer interface { SendAndClose(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type HelloReply ¶
type HelloReply struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
HelloReply协议内容
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) GetName ¶
func (x *HelloReply) GetName() 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"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
HelloRequest协议
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetMessage ¶
func (x *HelloRequest) GetMessage() string
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
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 UnimplementedGreetsServer ¶
type UnimplementedGreetsServer struct { }
UnimplementedGreetsServer can be embedded to have forward compatible implementations.
func (*UnimplementedGreetsServer) SayHello ¶
func (*UnimplementedGreetsServer) SayHello(Greets_SayHelloServer) error
Click to show internal directories.
Click to hide internal directories.