Documentation
¶
Index ¶
- func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)
- type ChatServiceClient
- type ChatServiceServer
- type ChatService_ReceiveClient
- type ChatService_ReceiveServer
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetMessage() string
- func (m *Message) GetNickname() string
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type ReceiveResponse
- func (*ReceiveResponse) Descriptor() ([]byte, []int)
- func (m *ReceiveResponse) GetMsg() *Message
- func (*ReceiveResponse) ProtoMessage()
- func (m *ReceiveResponse) Reset()
- func (m *ReceiveResponse) String() string
- func (m *ReceiveResponse) XXX_DiscardUnknown()
- func (m *ReceiveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReceiveResponse) XXX_Merge(src proto.Message)
- func (m *ReceiveResponse) XXX_Size() int
- func (m *ReceiveResponse) XXX_Unmarshal(b []byte) error
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)
- func (m *SendRequest) GetMsg() *Message
- func (*SendRequest) ProtoMessage()
- func (m *SendRequest) Reset()
- func (m *SendRequest) String() string
- func (m *SendRequest) XXX_DiscardUnknown()
- func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SendRequest) XXX_Merge(src proto.Message)
- func (m *SendRequest) XXX_Size() int
- func (m *SendRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedChatServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)
Types ¶
type ChatServiceClient ¶
type ChatServiceClient interface {
// Sends a message to the chat room
Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Streams back all other messages from the chat room
Receive(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (ChatService_ReceiveClient, error)
}
ChatServiceClient is the client API for ChatService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChatServiceClient ¶
func NewChatServiceClient(cc *grpc.ClientConn) ChatServiceClient
type ChatServiceServer ¶
type ChatServiceServer interface {
// Sends a message to the chat room
Send(context.Context, *SendRequest) (*empty.Empty, error)
// Streams back all other messages from the chat room
Receive(*empty.Empty, ChatService_ReceiveServer) error
}
ChatServiceServer is the server API for ChatService service.
type ChatService_ReceiveClient ¶
type ChatService_ReceiveClient interface {
Recv() (*ReceiveResponse, error)
grpc.ClientStream
}
type ChatService_ReceiveServer ¶
type ChatService_ReceiveServer interface {
Send(*ReceiveResponse) error
grpc.ServerStream
}
type Message ¶
type Message struct {
Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Message) Descriptor ¶
func (*Message) GetMessage ¶
func (*Message) GetNickname ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type ReceiveResponse ¶
type ReceiveResponse struct {
Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ReceiveResponse) Descriptor ¶
func (*ReceiveResponse) Descriptor() ([]byte, []int)
func (*ReceiveResponse) GetMsg ¶
func (m *ReceiveResponse) GetMsg() *Message
func (*ReceiveResponse) ProtoMessage ¶
func (*ReceiveResponse) ProtoMessage()
func (*ReceiveResponse) Reset ¶
func (m *ReceiveResponse) Reset()
func (*ReceiveResponse) String ¶
func (m *ReceiveResponse) String() string
func (*ReceiveResponse) XXX_DiscardUnknown ¶
func (m *ReceiveResponse) XXX_DiscardUnknown()
func (*ReceiveResponse) XXX_Marshal ¶
func (m *ReceiveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReceiveResponse) XXX_Merge ¶
func (m *ReceiveResponse) XXX_Merge(src proto.Message)
func (*ReceiveResponse) XXX_Size ¶
func (m *ReceiveResponse) XXX_Size() int
func (*ReceiveResponse) XXX_Unmarshal ¶
func (m *ReceiveResponse) XXX_Unmarshal(b []byte) error
type SendRequest ¶
type SendRequest struct {
Msg *Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*SendRequest) Descriptor ¶
func (*SendRequest) Descriptor() ([]byte, []int)
func (*SendRequest) GetMsg ¶
func (m *SendRequest) GetMsg() *Message
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) Reset ¶
func (m *SendRequest) Reset()
func (*SendRequest) String ¶
func (m *SendRequest) String() string
func (*SendRequest) XXX_DiscardUnknown ¶
func (m *SendRequest) XXX_DiscardUnknown()
func (*SendRequest) XXX_Marshal ¶
func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SendRequest) XXX_Merge ¶
func (m *SendRequest) XXX_Merge(src proto.Message)
func (*SendRequest) XXX_Size ¶
func (m *SendRequest) XXX_Size() int
func (*SendRequest) XXX_Unmarshal ¶
func (m *SendRequest) XXX_Unmarshal(b []byte) error
type UnimplementedChatServiceServer ¶
type UnimplementedChatServiceServer struct {
}
UnimplementedChatServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedChatServiceServer) Receive ¶
func (*UnimplementedChatServiceServer) Receive(req *empty.Empty, srv ChatService_ReceiveServer) error
func (*UnimplementedChatServiceServer) Send ¶
func (*UnimplementedChatServiceServer) Send(ctx context.Context, req *SendRequest) (*empty.Empty, error)
Click to show internal directories.
Click to hide internal directories.