Documentation ¶
Index ¶
- func RegisterChatServer(s *grpc.Server, srv ChatServer)
- type ChatClient
- type ChatServer
- type Chat_ReceiveClient
- type Chat_ReceiveServer
- type Data
- func (*Data) Descriptor() ([]byte, []int)
- func (m *Data) GetId() *ID
- func (m *Data) GetText() string
- func (*Data) ProtoMessage()
- func (m *Data) Reset()
- func (m *Data) String() string
- func (m *Data) XXX_DiscardUnknown()
- func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Data) XXX_Merge(src proto.Message)
- func (m *Data) XXX_Size() int
- func (m *Data) XXX_Unmarshal(b []byte) error
- type ID
- func (*ID) Descriptor() ([]byte, []int)
- func (m *ID) GetId() int32
- func (*ID) ProtoMessage()
- func (m *ID) Reset()
- func (m *ID) String() string
- func (m *ID) XXX_DiscardUnknown()
- func (m *ID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ID) XXX_Merge(src proto.Message)
- func (m *ID) XXX_Size() int
- func (m *ID) XXX_Unmarshal(b []byte) error
- type UnimplementedChatServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatServer ¶
func RegisterChatServer(s *grpc.Server, srv ChatServer)
Types ¶
type ChatClient ¶
type ChatClient interface { Send(ctx context.Context, in *Data, opts ...grpc.CallOption) (*empty.Empty, error) Receive(ctx context.Context, in *ID, opts ...grpc.CallOption) (Chat_ReceiveClient, error) Who(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ID, error) }
ChatClient is the client API for Chat service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChatClient ¶
func NewChatClient(cc grpc.ClientConnInterface) ChatClient
type ChatServer ¶
type ChatServer interface { Send(context.Context, *Data) (*empty.Empty, error) Receive(*ID, Chat_ReceiveServer) error Who(context.Context, *empty.Empty) (*ID, error) }
ChatServer is the server API for Chat service.
type Chat_ReceiveClient ¶
type Chat_ReceiveClient interface { Recv() (*Data, error) grpc.ClientStream }
type Chat_ReceiveServer ¶
type Chat_ReceiveServer interface { Send(*Data) error grpc.ServerStream }
type Data ¶
type Data struct { Id *ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Data) Descriptor ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) XXX_DiscardUnknown ¶
func (m *Data) XXX_DiscardUnknown()
func (*Data) XXX_Unmarshal ¶
type ID ¶
type ID struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ID) Descriptor ¶
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
func (*ID) XXX_DiscardUnknown ¶
func (m *ID) XXX_DiscardUnknown()
func (*ID) XXX_Unmarshal ¶
type UnimplementedChatServer ¶
type UnimplementedChatServer struct { }
UnimplementedChatServer can be embedded to have forward compatible implementations.
func (*UnimplementedChatServer) Receive ¶
func (*UnimplementedChatServer) Receive(req *ID, srv Chat_ReceiveServer) error
Click to show internal directories.
Click to hide internal directories.