Documentation
¶
Index ¶
- Constants
- func RegisterChatServer(s *grpc.Server, srv ChatServer)
- type ChatClient
- type ChatServer
- type Chat_StreamClient
- type Chat_StreamServer
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetID() string
- func (m *Message) GetPayload() isMessage_Payload
- func (m *Message) GetText() string
- func (m *Message) GetTimestamp() *timestamp.Timestamp
- 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 (*Message) XXX_OneofWrappers() []interface{}
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type Message_Text
Constants ¶
View Source
const ( HeaderPeerID = "x-peer-id" HeaderPeerName = "x-peer-name" )
Metadata keys.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatServer ¶
func RegisterChatServer(s *grpc.Server, srv ChatServer)
Types ¶
type ChatClient ¶
type ChatClient interface {
Stream(ctx context.Context, opts ...grpc.CallOption) (Chat_StreamClient, 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.ClientConn) ChatClient
type ChatServer ¶
type ChatServer interface {
Stream(Chat_StreamServer) error
}
ChatServer is the server API for Chat service.
type Chat_StreamClient ¶
type Chat_StreamServer ¶
type Message ¶
type Message struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // Types that are valid to be assigned to Payload: // *Message_Text Payload isMessage_Payload `protobuf_oneof:"Payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Message) Descriptor ¶
func (*Message) GetPayload ¶
func (m *Message) GetPayload() isMessage_Payload
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_OneofWrappers ¶
func (*Message) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Message) XXX_Unmarshal ¶
type Message_Text ¶
type Message_Text struct {
Text string `protobuf:"bytes,3,opt,name=Text,proto3,oneof"`
}
Click to show internal directories.
Click to hide internal directories.