Versions in this module Expand all Collapse all v0 v0.0.3 Aug 18, 2022 v0.0.2 Jun 9, 2022 v0.0.1 Mar 23, 2022 Changes in this version + const MaxBodySize + var Comet_ServiceDesc = grpc.ServiceDesc + var ErrProtoHeaderLen = errors.New("default server codec header length error") + var ErrProtoPackLen = errors.New("default server codec pack length error") + var File_comet_proto protoreflect.FileDescriptor + var Op_name = map[int32]string + var Op_value = map[string]int32 + var ProtoFinish = &Proto + var ProtoReady = &Proto + func RegisterCometServer(s grpc.ServiceRegistrar, srv CometServer) + type AuthMsg struct + AppId string + Ext []byte + Token string + func (*AuthMsg) Descriptor() ([]byte, []int) + func (*AuthMsg) ProtoMessage() + func (x *AuthMsg) GetAppId() string + func (x *AuthMsg) GetExt() []byte + func (x *AuthMsg) GetToken() string + func (x *AuthMsg) ProtoReflect() protoreflect.Message + func (x *AuthMsg) Reset() + func (x *AuthMsg) String() string + type BroadcastGroupReply struct + func (*BroadcastGroupReply) Descriptor() ([]byte, []int) + func (*BroadcastGroupReply) ProtoMessage() + func (x *BroadcastGroupReply) ProtoReflect() protoreflect.Message + func (x *BroadcastGroupReply) Reset() + func (x *BroadcastGroupReply) String() string + type BroadcastGroupReq struct + GroupID string + Proto *Proto + func (*BroadcastGroupReq) Descriptor() ([]byte, []int) + func (*BroadcastGroupReq) ProtoMessage() + func (x *BroadcastGroupReq) GetGroupID() string + func (x *BroadcastGroupReq) GetProto() *Proto + func (x *BroadcastGroupReq) ProtoReflect() protoreflect.Message + func (x *BroadcastGroupReq) Reset() + func (x *BroadcastGroupReq) String() string + type BroadcastReply struct + func (*BroadcastReply) Descriptor() ([]byte, []int) + func (*BroadcastReply) ProtoMessage() + func (x *BroadcastReply) ProtoReflect() protoreflect.Message + func (x *BroadcastReply) Reset() + func (x *BroadcastReply) String() string + type BroadcastReq struct + Proto *Proto + ProtoOp int32 + func (*BroadcastReq) Descriptor() ([]byte, []int) + func (*BroadcastReq) ProtoMessage() + func (x *BroadcastReq) GetProto() *Proto + func (x *BroadcastReq) GetProtoOp() int32 + func (x *BroadcastReq) ProtoReflect() protoreflect.Message + func (x *BroadcastReq) Reset() + func (x *BroadcastReq) String() string + type CometClient interface + Broadcast func(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error) + BroadcastGroup func(ctx context.Context, in *BroadcastGroupReq, opts ...grpc.CallOption) (*BroadcastGroupReply, error) + DelGroups func(ctx context.Context, in *DelGroupsReq, opts ...grpc.CallOption) (*DelGroupsReply, error) + JoinGroups func(ctx context.Context, in *JoinGroupsReq, opts ...grpc.CallOption) (*JoinGroupsReply, error) + LeaveGroups func(ctx context.Context, in *LeaveGroupsReq, opts ...grpc.CallOption) (*LeaveGroupsReply, error) + PushMsg func(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) + func NewCometClient(cc grpc.ClientConnInterface) CometClient + type CometServer interface + Broadcast func(context.Context, *BroadcastReq) (*BroadcastReply, error) + BroadcastGroup func(context.Context, *BroadcastGroupReq) (*BroadcastGroupReply, error) + DelGroups func(context.Context, *DelGroupsReq) (*DelGroupsReply, error) + JoinGroups func(context.Context, *JoinGroupsReq) (*JoinGroupsReply, error) + LeaveGroups func(context.Context, *LeaveGroupsReq) (*LeaveGroupsReply, error) + PushMsg func(context.Context, *PushMsgReq) (*PushMsgReply, error) + type DelGroupsReply struct + func (*DelGroupsReply) Descriptor() ([]byte, []int) + func (*DelGroupsReply) ProtoMessage() + func (x *DelGroupsReply) ProtoReflect() protoreflect.Message + func (x *DelGroupsReply) Reset() + func (x *DelGroupsReply) String() string + type DelGroupsReq struct + Gid []string + func (*DelGroupsReq) Descriptor() ([]byte, []int) + func (*DelGroupsReq) ProtoMessage() + func (x *DelGroupsReq) GetGid() []string + func (x *DelGroupsReq) ProtoReflect() protoreflect.Message + func (x *DelGroupsReq) Reset() + func (x *DelGroupsReq) String() string + type Empty struct + func (*Empty) Descriptor() ([]byte, []int) + func (*Empty) ProtoMessage() + func (x *Empty) ProtoReflect() protoreflect.Message + func (x *Empty) Reset() + func (x *Empty) String() string + type JoinGroupsReply struct + func (*JoinGroupsReply) Descriptor() ([]byte, []int) + func (*JoinGroupsReply) ProtoMessage() + func (x *JoinGroupsReply) ProtoReflect() protoreflect.Message + func (x *JoinGroupsReply) Reset() + func (x *JoinGroupsReply) String() string + type JoinGroupsReq struct + Gid []string + Keys []string + func (*JoinGroupsReq) Descriptor() ([]byte, []int) + func (*JoinGroupsReq) ProtoMessage() + func (x *JoinGroupsReq) GetGid() []string + func (x *JoinGroupsReq) GetKeys() []string + func (x *JoinGroupsReq) ProtoReflect() protoreflect.Message + func (x *JoinGroupsReq) Reset() + func (x *JoinGroupsReq) String() string + type LeaveGroupsReply struct + func (*LeaveGroupsReply) Descriptor() ([]byte, []int) + func (*LeaveGroupsReply) ProtoMessage() + func (x *LeaveGroupsReply) ProtoReflect() protoreflect.Message + func (x *LeaveGroupsReply) Reset() + func (x *LeaveGroupsReply) String() string + type LeaveGroupsReq struct + Gid []string + Keys []string + func (*LeaveGroupsReq) Descriptor() ([]byte, []int) + func (*LeaveGroupsReq) ProtoMessage() + func (x *LeaveGroupsReq) GetGid() []string + func (x *LeaveGroupsReq) GetKeys() []string + func (x *LeaveGroupsReq) ProtoReflect() protoreflect.Message + func (x *LeaveGroupsReq) Reset() + func (x *LeaveGroupsReq) String() string + type Op int32 + const Op_Auth + const Op_AuthReply + const Op_Disconnect + const Op_DisconnectReply + const Op_Heartbeat + const Op_HeartbeatReply + const Op_ProtoFinish + const Op_ProtoReady + const Op_Raw + const Op_RePush + const Op_ReceiveMsg + const Op_ReceiveMsgReply + const Op_SendMsg + const Op_SendMsgReply + const Op_SyncMsgReply + const Op_SyncMsgReq + const Op_Undefined + func (Op) Descriptor() protoreflect.EnumDescriptor + func (Op) EnumDescriptor() ([]byte, []int) + func (Op) Type() protoreflect.EnumType + func (x Op) Enum() *Op + func (x Op) Number() protoreflect.EnumNumber + func (x Op) String() string + type Proto struct + Ack int32 + Body []byte + Op int32 + Seq int32 + Ver int32 + func (*Proto) Descriptor() ([]byte, []int) + func (*Proto) ProtoMessage() + func (p *Proto) ReadTCP(rr *bufio.Reader) (err error) + func (p *Proto) ReadWebsocket(ws *websocket.Conn) (err error) + func (p *Proto) ReadWebsocket2(ws *gws.Conn) (err error) + func (p *Proto) WriteTCP(wr *bufio.Writer) (err error) + func (p *Proto) WriteTCPHeart(wr *bufio.Writer, online int32) (err error) + func (p *Proto) WriteTo(b *bytes.Writer) + func (p *Proto) WriteWebsocket(ws *websocket.Conn) (err error) + func (p *Proto) WriteWebsocket2(ws *gws.Conn) (err error) + func (p *Proto) WriteWebsocketHeart(wr *websocket.Conn, online int32) (err error) + func (x *Proto) GetAck() int32 + func (x *Proto) GetBody() []byte + func (x *Proto) GetOp() int32 + func (x *Proto) GetSeq() int32 + func (x *Proto) GetVer() int32 + func (x *Proto) ProtoReflect() protoreflect.Message + func (x *Proto) Reset() + func (x *Proto) String() string + type PushMsgReply struct + Index map[string]int32 + func (*PushMsgReply) Descriptor() ([]byte, []int) + func (*PushMsgReply) ProtoMessage() + func (x *PushMsgReply) GetIndex() map[string]int32 + func (x *PushMsgReply) ProtoReflect() protoreflect.Message + func (x *PushMsgReply) Reset() + func (x *PushMsgReply) String() string + type PushMsgReq struct + Keys []string + Proto *Proto + ProtoOp int32 + func (*PushMsgReq) Descriptor() ([]byte, []int) + func (*PushMsgReq) ProtoMessage() + func (x *PushMsgReq) GetKeys() []string + func (x *PushMsgReq) GetProto() *Proto + func (x *PushMsgReq) GetProtoOp() int32 + func (x *PushMsgReq) ProtoReflect() protoreflect.Message + func (x *PushMsgReq) Reset() + func (x *PushMsgReq) String() string + type SyncMsg struct + LogId int64 + func (*SyncMsg) Descriptor() ([]byte, []int) + func (*SyncMsg) ProtoMessage() + func (x *SyncMsg) GetLogId() int64 + func (x *SyncMsg) ProtoReflect() protoreflect.Message + func (x *SyncMsg) Reset() + func (x *SyncMsg) String() string + type UnimplementedCometServer struct + func (UnimplementedCometServer) Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error) + func (UnimplementedCometServer) BroadcastGroup(context.Context, *BroadcastGroupReq) (*BroadcastGroupReply, error) + func (UnimplementedCometServer) DelGroups(context.Context, *DelGroupsReq) (*DelGroupsReply, error) + func (UnimplementedCometServer) JoinGroups(context.Context, *JoinGroupsReq) (*JoinGroupsReply, error) + func (UnimplementedCometServer) LeaveGroups(context.Context, *LeaveGroupsReq) (*LeaveGroupsReply, error) + func (UnimplementedCometServer) PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error) + type UnsafeCometServer interface