Documentation ¶
Overview ¶
Package boatpb is a generated protocol buffer package.
It is generated from these files:
github.com/molon/gomsg/internal/pb/boatpb/boat.proto
It has these top-level messages:
PushMessagesRequest BoardcastRoomRequest KickoutRequest
Index ¶
- func RegisterBoatServer(s *grpc.Server, srv BoatServer)
- type BoardcastRoomRequest
- func (*BoardcastRoomRequest) Descriptor() ([]byte, []int)
- func (m *BoardcastRoomRequest) GetBody() *google_protobuf.Any
- func (m *BoardcastRoomRequest) GetRoom() string
- func (m *BoardcastRoomRequest) GetSeq() string
- func (*BoardcastRoomRequest) ProtoMessage()
- func (m *BoardcastRoomRequest) Reset()
- func (m *BoardcastRoomRequest) String() string
- type BoatClient
- type BoatServer
- type KickoutRequest
- type PushMessagesRequest
- func (*PushMessagesRequest) Descriptor() ([]byte, []int)
- func (m *PushMessagesRequest) GetAckWait() *google_protobuf2.Duration
- func (m *PushMessagesRequest) GetMsgs() []*msgpb.Message
- func (m *PushMessagesRequest) GetSid() string
- func (*PushMessagesRequest) ProtoMessage()
- func (m *PushMessagesRequest) Reset()
- func (m *PushMessagesRequest) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBoatServer ¶
func RegisterBoatServer(s *grpc.Server, srv BoatServer)
Types ¶
type BoardcastRoomRequest ¶
type BoardcastRoomRequest struct { // 房间名称 Room string `protobuf:"bytes,1,opt,name=room" json:"room,omitempty"` // 消息唯一标识 Seq string `protobuf:"bytes,2,opt,name=seq" json:"seq,omitempty"` // 消息体 Body *google_protobuf.Any `protobuf:"bytes,3,opt,name=body" json:"body,omitempty"` }
根据房间名称广播消息,此种消息不得ack,不得离线,不得通知
func (*BoardcastRoomRequest) Descriptor ¶
func (*BoardcastRoomRequest) Descriptor() ([]byte, []int)
func (*BoardcastRoomRequest) GetBody ¶
func (m *BoardcastRoomRequest) GetBody() *google_protobuf.Any
func (*BoardcastRoomRequest) GetRoom ¶
func (m *BoardcastRoomRequest) GetRoom() string
func (*BoardcastRoomRequest) GetSeq ¶
func (m *BoardcastRoomRequest) GetSeq() string
func (*BoardcastRoomRequest) ProtoMessage ¶
func (*BoardcastRoomRequest) ProtoMessage()
func (*BoardcastRoomRequest) Reset ¶
func (m *BoardcastRoomRequest) Reset()
func (*BoardcastRoomRequest) String ¶
func (m *BoardcastRoomRequest) String() string
type BoatClient ¶
type BoatClient interface { // 向某一个会话id下发消息一堆消息 PushMessages(ctx context.Context, in *PushMessagesRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) // 广播消息 BoardcastRoom(ctx context.Context, in *BoardcastRoomRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) // 踢出会话 Kickout(ctx context.Context, in *KickoutRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) }
func NewBoatClient ¶
func NewBoatClient(cc *grpc.ClientConn) BoatClient
type BoatServer ¶
type BoatServer interface { // 向某一个会话id下发消息一堆消息 PushMessages(context.Context, *PushMessagesRequest) (*google_protobuf1.Empty, error) // 广播消息 BoardcastRoom(context.Context, *BoardcastRoomRequest) (*google_protobuf1.Empty, error) // 踢出会话 Kickout(context.Context, *KickoutRequest) (*google_protobuf1.Empty, error) }
type KickoutRequest ¶
type KickoutRequest struct { // 会话id Sid string `protobuf:"bytes,1,opt,name=sid" json:"sid,omitempty"` // 踢出原因 Code errorpb.Code `protobuf:"varint,2,opt,name=code,enum=errorpb.Code" json:"code,omitempty"` }
func (*KickoutRequest) Descriptor ¶
func (*KickoutRequest) Descriptor() ([]byte, []int)
func (*KickoutRequest) GetCode ¶
func (m *KickoutRequest) GetCode() errorpb.Code
func (*KickoutRequest) GetSid ¶
func (m *KickoutRequest) GetSid() string
func (*KickoutRequest) ProtoMessage ¶
func (*KickoutRequest) ProtoMessage()
func (*KickoutRequest) Reset ¶
func (m *KickoutRequest) Reset()
func (*KickoutRequest) String ¶
func (m *KickoutRequest) String() string
type PushMessagesRequest ¶
type PushMessagesRequest struct { // 会话id Sid string `protobuf:"bytes,1,opt,name=sid" json:"sid,omitempty"` // ack等待时间 AckWait *google_protobuf2.Duration `protobuf:"bytes,2,opt,name=ack_wait,json=ackWait" json:"ack_wait,omitempty"` // 一堆消息 Msgs []*msgpb.Message `protobuf:"bytes,3,rep,name=msgs" json:"msgs,omitempty"` }
下发消息请求
func (*PushMessagesRequest) Descriptor ¶
func (*PushMessagesRequest) Descriptor() ([]byte, []int)
func (*PushMessagesRequest) GetAckWait ¶
func (m *PushMessagesRequest) GetAckWait() *google_protobuf2.Duration
func (*PushMessagesRequest) GetMsgs ¶
func (m *PushMessagesRequest) GetMsgs() []*msgpb.Message
func (*PushMessagesRequest) GetSid ¶
func (m *PushMessagesRequest) GetSid() string
func (*PushMessagesRequest) ProtoMessage ¶
func (*PushMessagesRequest) ProtoMessage()
func (*PushMessagesRequest) Reset ¶
func (m *PushMessagesRequest) Reset()
func (*PushMessagesRequest) String ¶
func (m *PushMessagesRequest) String() string
Click to show internal directories.
Click to hide internal directories.