Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
chat.proto
It has these top-level messages:
Chat
Index ¶
- func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)
- type Chat
- type ChatServiceClient
- type ChatServiceServer
- type ChatService_SubscribeClient
- type ChatService_SubscribeServer
- type Chat_ConsumeLatest
- type Chat_ConsumeRange
- type Chat_Consumer
- type Chat_Id
- type Chat_List
- type Chat_Message
- type Chat_Nil
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)
Types ¶
type Chat ¶
type Chat struct { }
func (*Chat) Descriptor ¶
func (*Chat) ProtoMessage ¶
func (*Chat) ProtoMessage()
type ChatServiceClient ¶
type ChatServiceClient interface { Subscribe(ctx context.Context, in *Chat_Consumer, opts ...grpc.CallOption) (ChatService_SubscribeClient, error) Reg(ctx context.Context, in *Chat_Id, opts ...grpc.CallOption) (*Chat_Nil, error) Query(ctx context.Context, in *Chat_ConsumeRange, opts ...grpc.CallOption) (*Chat_List, error) Latest(ctx context.Context, in *Chat_ConsumeLatest, opts ...grpc.CallOption) (*Chat_List, error) }
func NewChatServiceClient ¶
func NewChatServiceClient(cc *grpc.ClientConn) ChatServiceClient
type ChatServiceServer ¶
type ChatServiceServer interface { Subscribe(*Chat_Consumer, ChatService_SubscribeServer) error Reg(context.Context, *Chat_Id) (*Chat_Nil, error) Query(context.Context, *Chat_ConsumeRange) (*Chat_List, error) Latest(context.Context, *Chat_ConsumeLatest) (*Chat_List, error) }
type ChatService_SubscribeClient ¶
type ChatService_SubscribeClient interface { Recv() (*Chat_Message, error) grpc.ClientStream }
type ChatService_SubscribeServer ¶
type ChatService_SubscribeServer interface { Send(*Chat_Message) error grpc.ServerStream }
type Chat_ConsumeLatest ¶
type Chat_ConsumeLatest struct { Id uint64 `protobuf:"varint,1,opt,name=Id" json:"Id,omitempty"` Length int64 `protobuf:"varint,2,opt,name=Length" json:"Length,omitempty"` }
func (*Chat_ConsumeLatest) Descriptor ¶
func (*Chat_ConsumeLatest) Descriptor() ([]byte, []int)
func (*Chat_ConsumeLatest) ProtoMessage ¶
func (*Chat_ConsumeLatest) ProtoMessage()
func (*Chat_ConsumeLatest) Reset ¶
func (m *Chat_ConsumeLatest) Reset()
func (*Chat_ConsumeLatest) String ¶
func (m *Chat_ConsumeLatest) String() string
type Chat_ConsumeRange ¶
type Chat_ConsumeRange struct { Id uint64 `protobuf:"varint,1,opt,name=Id" json:"Id,omitempty"` From int64 `protobuf:"varint,2,opt,name=From" json:"From,omitempty"` To int64 `protobuf:"varint,3,opt,name=To" json:"To,omitempty"` }
func (*Chat_ConsumeRange) Descriptor ¶
func (*Chat_ConsumeRange) Descriptor() ([]byte, []int)
func (*Chat_ConsumeRange) ProtoMessage ¶
func (*Chat_ConsumeRange) ProtoMessage()
func (*Chat_ConsumeRange) Reset ¶
func (m *Chat_ConsumeRange) Reset()
func (*Chat_ConsumeRange) String ¶
func (m *Chat_ConsumeRange) String() string
type Chat_Consumer ¶
type Chat_Consumer struct { Id uint64 `protobuf:"varint,1,opt,name=Id" json:"Id,omitempty"` From int64 `protobuf:"varint,2,opt,name=From" json:"From,omitempty"` }
func (*Chat_Consumer) Descriptor ¶
func (*Chat_Consumer) Descriptor() ([]byte, []int)
func (*Chat_Consumer) ProtoMessage ¶
func (*Chat_Consumer) ProtoMessage()
func (*Chat_Consumer) Reset ¶
func (m *Chat_Consumer) Reset()
func (*Chat_Consumer) String ¶
func (m *Chat_Consumer) String() string
type Chat_Id ¶
type Chat_Id struct {
Id uint64 `protobuf:"varint,1,opt,name=Id" json:"Id,omitempty"`
}
func (*Chat_Id) Descriptor ¶
func (*Chat_Id) ProtoMessage ¶
func (*Chat_Id) ProtoMessage()
type Chat_List ¶
type Chat_List struct {
Messages []*Chat_Message `protobuf:"bytes,1,rep,name=Messages" json:"Messages,omitempty"`
}
func (*Chat_List) Descriptor ¶
func (*Chat_List) GetMessages ¶
func (m *Chat_List) GetMessages() []*Chat_Message
func (*Chat_List) ProtoMessage ¶
func (*Chat_List) ProtoMessage()
type Chat_Message ¶
type Chat_Message struct { Id uint64 `protobuf:"varint,1,opt,name=Id" json:"Id,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=Body,proto3" json:"Body,omitempty"` Offset int64 `protobuf:"varint,3,opt,name=Offset" json:"Offset,omitempty"` }
func (*Chat_Message) Descriptor ¶
func (*Chat_Message) Descriptor() ([]byte, []int)
func (*Chat_Message) ProtoMessage ¶
func (*Chat_Message) ProtoMessage()
func (*Chat_Message) Reset ¶
func (m *Chat_Message) Reset()
func (*Chat_Message) String ¶
func (m *Chat_Message) String() string
Click to show internal directories.
Click to hide internal directories.