Documentation
¶
Index ¶
- Variables
- func RegisterChatServer(s *grpc.Server, srv ChatServer)
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type ChatClient
- type ChatServer
- type Chat_SayClient
- type Chat_SayServer
- type ClientMessage
- type GreeterClient
- type GreeterServer
- type HelloRequest
- type HelloResponse
- type ServerMessage
- type UnimplementedChatServer
- type UnimplementedGreeterServer
- type UnsafeChatServer
- type UnsafeGreeterServer
Constants ¶
This section is empty.
Variables ¶
var File_chat_proto protoreflect.FileDescriptor
var File_greeter_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatServer ¶
func RegisterChatServer(s *grpc.Server, srv ChatServer)
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type ChatClient ¶
type ChatClient interface {
Say(ctx context.Context, opts ...grpc.CallOption) (Chat_SayClient, error)
}
ChatClient is the client API for Chat service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewChatClient ¶
func NewChatClient(cc grpc.ClientConnInterface) ChatClient
type ChatServer ¶
type ChatServer interface {
Say(Chat_SayServer) error
}
ChatServer is the server API for Chat service. All implementations should embed UnimplementedChatServer for forward compatibility
type Chat_SayClient ¶
type Chat_SayClient interface { Send(*ServerMessage) error Recv() (*ClientMessage, error) grpc.ClientStream }
type Chat_SayServer ¶
type Chat_SayServer interface { Send(*ClientMessage) error Recv() (*ServerMessage, error) grpc.ServerStream }
type ClientMessage ¶
type ClientMessage struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ClientMessage) Descriptor
deprecated
func (*ClientMessage) Descriptor() ([]byte, []int)
Deprecated: Use ClientMessage.ProtoReflect.Descriptor instead.
func (*ClientMessage) GetMessage ¶
func (x *ClientMessage) GetMessage() string
func (*ClientMessage) ProtoMessage ¶
func (*ClientMessage) ProtoMessage()
func (*ClientMessage) ProtoReflect ¶
func (x *ClientMessage) ProtoReflect() protoreflect.Message
func (*ClientMessage) Reset ¶
func (x *ClientMessage) Reset()
func (*ClientMessage) String ¶
func (x *ClientMessage) String() string
type GreeterClient ¶
type GreeterClient interface {
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface {
SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
}
GreeterServer is the server API for Greeter service. All implementations should embed UnimplementedGreeterServer for forward compatibility
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
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) 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 HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetMessage ¶
func (x *HelloResponse) GetMessage() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type ServerMessage ¶
type ServerMessage struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ServerMessage) Descriptor
deprecated
func (*ServerMessage) Descriptor() ([]byte, []int)
Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.
func (*ServerMessage) GetMessage ¶
func (x *ServerMessage) GetMessage() string
func (*ServerMessage) ProtoMessage ¶
func (*ServerMessage) ProtoMessage()
func (*ServerMessage) ProtoReflect ¶
func (x *ServerMessage) ProtoReflect() protoreflect.Message
func (*ServerMessage) Reset ¶
func (x *ServerMessage) Reset()
func (*ServerMessage) String ¶
func (x *ServerMessage) String() string
type UnimplementedChatServer ¶
type UnimplementedChatServer struct { }
UnimplementedChatServer should be embedded to have forward compatible implementations.
func (UnimplementedChatServer) Say ¶
func (UnimplementedChatServer) Say(Chat_SayServer) error
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer should be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) SayHello ¶
func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
type UnsafeChatServer ¶
type UnsafeChatServer interface {
// contains filtered or unexported methods
}
UnsafeChatServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatServer will result in compilation errors.
type UnsafeGreeterServer ¶
type UnsafeGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.