Documentation ¶
Index ¶
- Variables
- func RegisterCometServer(s grpc.ServiceRegistrar, srv CometServer)
- type AuthMsg
- func (*AuthMsg) Descriptor() ([]byte, []int)deprecated
- func (x *AuthMsg) GetAppId() string
- func (x *AuthMsg) GetExt() []byte
- func (x *AuthMsg) GetToken() string
- func (*AuthMsg) ProtoMessage()
- func (x *AuthMsg) ProtoReflect() protoreflect.Message
- func (x *AuthMsg) Reset()
- func (x *AuthMsg) String() string
- type BroadcastGroupReply
- type BroadcastGroupReq
- func (*BroadcastGroupReq) Descriptor() ([]byte, []int)deprecated
- func (x *BroadcastGroupReq) GetGroupID() string
- func (x *BroadcastGroupReq) GetProto() *protocol.Proto
- func (*BroadcastGroupReq) ProtoMessage()
- func (x *BroadcastGroupReq) ProtoReflect() protoreflect.Message
- func (x *BroadcastGroupReq) Reset()
- func (x *BroadcastGroupReq) String() string
- type BroadcastReply
- type BroadcastReq
- func (*BroadcastReq) Descriptor() ([]byte, []int)deprecated
- func (x *BroadcastReq) GetProto() *protocol.Proto
- func (x *BroadcastReq) GetProtoOp() int32
- func (*BroadcastReq) ProtoMessage()
- func (x *BroadcastReq) ProtoReflect() protoreflect.Message
- func (x *BroadcastReq) Reset()
- func (x *BroadcastReq) String() string
- type CometClient
- type CometServer
- type DelGroupsReply
- type DelGroupsReq
- type Empty
- type JoinGroupsReply
- type JoinGroupsReq
- func (*JoinGroupsReq) Descriptor() ([]byte, []int)deprecated
- func (x *JoinGroupsReq) GetGid() []string
- func (x *JoinGroupsReq) GetKeys() []string
- func (*JoinGroupsReq) ProtoMessage()
- func (x *JoinGroupsReq) ProtoReflect() protoreflect.Message
- func (x *JoinGroupsReq) Reset()
- func (x *JoinGroupsReq) String() string
- type LeaveGroupsReply
- type LeaveGroupsReq
- func (*LeaveGroupsReq) Descriptor() ([]byte, []int)deprecated
- func (x *LeaveGroupsReq) GetGid() []string
- func (x *LeaveGroupsReq) GetKeys() []string
- func (*LeaveGroupsReq) ProtoMessage()
- func (x *LeaveGroupsReq) ProtoReflect() protoreflect.Message
- func (x *LeaveGroupsReq) Reset()
- func (x *LeaveGroupsReq) String() string
- type PushMsgReply
- type PushMsgReq
- func (*PushMsgReq) Descriptor() ([]byte, []int)deprecated
- func (x *PushMsgReq) GetKeys() []string
- func (x *PushMsgReq) GetProto() *protocol.Proto
- func (x *PushMsgReq) GetProtoOp() int32
- func (*PushMsgReq) ProtoMessage()
- func (x *PushMsgReq) ProtoReflect() protoreflect.Message
- func (x *PushMsgReq) Reset()
- func (x *PushMsgReq) String() string
- type SyncMsg
- type UnimplementedCometServer
- 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
Constants ¶
This section is empty.
Variables ¶
var Comet_ServiceDesc = grpc.ServiceDesc{ ServiceName: "im.comet.Comet", HandlerType: (*CometServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PushMsg", Handler: _Comet_PushMsg_Handler, }, { MethodName: "Broadcast", Handler: _Comet_Broadcast_Handler, }, { MethodName: "BroadcastGroup", Handler: _Comet_BroadcastGroup_Handler, }, { MethodName: "JoinGroups", Handler: _Comet_JoinGroups_Handler, }, { MethodName: "LeaveGroups", Handler: _Comet_LeaveGroups_Handler, }, { MethodName: "DelGroups", Handler: _Comet_DelGroups_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "comet/comet.proto", }
Comet_ServiceDesc is the grpc.ServiceDesc for Comet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_comet_comet_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCometServer ¶
func RegisterCometServer(s grpc.ServiceRegistrar, srv CometServer)
Types ¶
type AuthMsg ¶
type AuthMsg struct { AppId string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` Ext []byte `protobuf:"bytes,3,opt,name=ext,proto3" json:"ext,omitempty"` // 其它业务方可能需要的信息 // contains filtered or unexported fields }
Proto 中 Op 为 OpAuth 时, body 必须可以反序列化为 AuthMsg
func (*AuthMsg) Descriptor
deprecated
func (*AuthMsg) ProtoMessage ¶
func (*AuthMsg) ProtoMessage()
func (*AuthMsg) ProtoReflect ¶
func (x *AuthMsg) ProtoReflect() protoreflect.Message
type BroadcastGroupReply ¶
type BroadcastGroupReply struct {
// contains filtered or unexported fields
}
func (*BroadcastGroupReply) Descriptor
deprecated
func (*BroadcastGroupReply) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastGroupReply.ProtoReflect.Descriptor instead.
func (*BroadcastGroupReply) ProtoMessage ¶
func (*BroadcastGroupReply) ProtoMessage()
func (*BroadcastGroupReply) ProtoReflect ¶
func (x *BroadcastGroupReply) ProtoReflect() protoreflect.Message
func (*BroadcastGroupReply) Reset ¶
func (x *BroadcastGroupReply) Reset()
func (*BroadcastGroupReply) String ¶
func (x *BroadcastGroupReply) String() string
type BroadcastGroupReq ¶
type BroadcastGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID,omitempty"` Proto *protocol.Proto `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` // contains filtered or unexported fields }
func (*BroadcastGroupReq) Descriptor
deprecated
func (*BroadcastGroupReq) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastGroupReq.ProtoReflect.Descriptor instead.
func (*BroadcastGroupReq) GetGroupID ¶
func (x *BroadcastGroupReq) GetGroupID() string
func (*BroadcastGroupReq) GetProto ¶
func (x *BroadcastGroupReq) GetProto() *protocol.Proto
func (*BroadcastGroupReq) ProtoMessage ¶
func (*BroadcastGroupReq) ProtoMessage()
func (*BroadcastGroupReq) ProtoReflect ¶
func (x *BroadcastGroupReq) ProtoReflect() protoreflect.Message
func (*BroadcastGroupReq) Reset ¶
func (x *BroadcastGroupReq) Reset()
func (*BroadcastGroupReq) String ¶
func (x *BroadcastGroupReq) String() string
type BroadcastReply ¶
type BroadcastReply struct {
// contains filtered or unexported fields
}
func (*BroadcastReply) Descriptor
deprecated
func (*BroadcastReply) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastReply.ProtoReflect.Descriptor instead.
func (*BroadcastReply) ProtoMessage ¶
func (*BroadcastReply) ProtoMessage()
func (*BroadcastReply) ProtoReflect ¶
func (x *BroadcastReply) ProtoReflect() protoreflect.Message
func (*BroadcastReply) Reset ¶
func (x *BroadcastReply) Reset()
func (*BroadcastReply) String ¶
func (x *BroadcastReply) String() string
type BroadcastReq ¶
type BroadcastReq struct { ProtoOp int32 `protobuf:"varint,1,opt,name=protoOp,proto3" json:"protoOp,omitempty"` Proto *protocol.Proto `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` // contains filtered or unexported fields }
func (*BroadcastReq) Descriptor
deprecated
func (*BroadcastReq) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastReq.ProtoReflect.Descriptor instead.
func (*BroadcastReq) GetProto ¶
func (x *BroadcastReq) GetProto() *protocol.Proto
func (*BroadcastReq) GetProtoOp ¶
func (x *BroadcastReq) GetProtoOp() int32
func (*BroadcastReq) ProtoMessage ¶
func (*BroadcastReq) ProtoMessage()
func (*BroadcastReq) ProtoReflect ¶
func (x *BroadcastReq) ProtoReflect() protoreflect.Message
func (*BroadcastReq) Reset ¶
func (x *BroadcastReq) Reset()
func (*BroadcastReq) String ¶
func (x *BroadcastReq) String() string
type CometClient ¶
type CometClient interface { PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) Broadcast(ctx context.Context, in *BroadcastReq, opts ...grpc.CallOption) (*BroadcastReply, error) BroadcastGroup(ctx context.Context, in *BroadcastGroupReq, opts ...grpc.CallOption) (*BroadcastGroupReply, error) JoinGroups(ctx context.Context, in *JoinGroupsReq, opts ...grpc.CallOption) (*JoinGroupsReply, error) LeaveGroups(ctx context.Context, in *LeaveGroupsReq, opts ...grpc.CallOption) (*LeaveGroupsReply, error) DelGroups(ctx context.Context, in *DelGroupsReq, opts ...grpc.CallOption) (*DelGroupsReply, error) }
CometClient is the client API for Comet service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCometClient ¶
func NewCometClient(cc grpc.ClientConnInterface) CometClient
type CometServer ¶
type CometServer interface { PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error) Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error) BroadcastGroup(context.Context, *BroadcastGroupReq) (*BroadcastGroupReply, error) JoinGroups(context.Context, *JoinGroupsReq) (*JoinGroupsReply, error) LeaveGroups(context.Context, *LeaveGroupsReq) (*LeaveGroupsReply, error) DelGroups(context.Context, *DelGroupsReq) (*DelGroupsReply, error) // contains filtered or unexported methods }
CometServer is the server API for Comet service. All implementations must embed UnimplementedCometServer for forward compatibility
type DelGroupsReply ¶
type DelGroupsReply struct {
// contains filtered or unexported fields
}
func (*DelGroupsReply) Descriptor
deprecated
func (*DelGroupsReply) Descriptor() ([]byte, []int)
Deprecated: Use DelGroupsReply.ProtoReflect.Descriptor instead.
func (*DelGroupsReply) ProtoMessage ¶
func (*DelGroupsReply) ProtoMessage()
func (*DelGroupsReply) ProtoReflect ¶
func (x *DelGroupsReply) ProtoReflect() protoreflect.Message
func (*DelGroupsReply) Reset ¶
func (x *DelGroupsReply) Reset()
func (*DelGroupsReply) String ¶
func (x *DelGroupsReply) String() string
type DelGroupsReq ¶
type DelGroupsReq struct { Gid []string `protobuf:"bytes,1,rep,name=gid,proto3" json:"gid,omitempty"` // contains filtered or unexported fields }
func (*DelGroupsReq) Descriptor
deprecated
func (*DelGroupsReq) Descriptor() ([]byte, []int)
Deprecated: Use DelGroupsReq.ProtoReflect.Descriptor instead.
func (*DelGroupsReq) GetGid ¶
func (x *DelGroupsReq) GetGid() []string
func (*DelGroupsReq) ProtoMessage ¶
func (*DelGroupsReq) ProtoMessage()
func (*DelGroupsReq) ProtoReflect ¶
func (x *DelGroupsReq) ProtoReflect() protoreflect.Message
func (*DelGroupsReq) Reset ¶
func (x *DelGroupsReq) Reset()
func (*DelGroupsReq) String ¶
func (x *DelGroupsReq) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type JoinGroupsReply ¶
type JoinGroupsReply struct {
// contains filtered or unexported fields
}
func (*JoinGroupsReply) Descriptor
deprecated
func (*JoinGroupsReply) Descriptor() ([]byte, []int)
Deprecated: Use JoinGroupsReply.ProtoReflect.Descriptor instead.
func (*JoinGroupsReply) ProtoMessage ¶
func (*JoinGroupsReply) ProtoMessage()
func (*JoinGroupsReply) ProtoReflect ¶
func (x *JoinGroupsReply) ProtoReflect() protoreflect.Message
func (*JoinGroupsReply) Reset ¶
func (x *JoinGroupsReply) Reset()
func (*JoinGroupsReply) String ¶
func (x *JoinGroupsReply) String() string
type JoinGroupsReq ¶
type JoinGroupsReq struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` Gid []string `protobuf:"bytes,2,rep,name=gid,proto3" json:"gid,omitempty"` // contains filtered or unexported fields }
func (*JoinGroupsReq) Descriptor
deprecated
func (*JoinGroupsReq) Descriptor() ([]byte, []int)
Deprecated: Use JoinGroupsReq.ProtoReflect.Descriptor instead.
func (*JoinGroupsReq) GetGid ¶
func (x *JoinGroupsReq) GetGid() []string
func (*JoinGroupsReq) GetKeys ¶
func (x *JoinGroupsReq) GetKeys() []string
func (*JoinGroupsReq) ProtoMessage ¶
func (*JoinGroupsReq) ProtoMessage()
func (*JoinGroupsReq) ProtoReflect ¶
func (x *JoinGroupsReq) ProtoReflect() protoreflect.Message
func (*JoinGroupsReq) Reset ¶
func (x *JoinGroupsReq) Reset()
func (*JoinGroupsReq) String ¶
func (x *JoinGroupsReq) String() string
type LeaveGroupsReply ¶
type LeaveGroupsReply struct {
// contains filtered or unexported fields
}
func (*LeaveGroupsReply) Descriptor
deprecated
func (*LeaveGroupsReply) Descriptor() ([]byte, []int)
Deprecated: Use LeaveGroupsReply.ProtoReflect.Descriptor instead.
func (*LeaveGroupsReply) ProtoMessage ¶
func (*LeaveGroupsReply) ProtoMessage()
func (*LeaveGroupsReply) ProtoReflect ¶
func (x *LeaveGroupsReply) ProtoReflect() protoreflect.Message
func (*LeaveGroupsReply) Reset ¶
func (x *LeaveGroupsReply) Reset()
func (*LeaveGroupsReply) String ¶
func (x *LeaveGroupsReply) String() string
type LeaveGroupsReq ¶
type LeaveGroupsReq struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` Gid []string `protobuf:"bytes,2,rep,name=gid,proto3" json:"gid,omitempty"` // contains filtered or unexported fields }
func (*LeaveGroupsReq) Descriptor
deprecated
func (*LeaveGroupsReq) Descriptor() ([]byte, []int)
Deprecated: Use LeaveGroupsReq.ProtoReflect.Descriptor instead.
func (*LeaveGroupsReq) GetGid ¶
func (x *LeaveGroupsReq) GetGid() []string
func (*LeaveGroupsReq) GetKeys ¶
func (x *LeaveGroupsReq) GetKeys() []string
func (*LeaveGroupsReq) ProtoMessage ¶
func (*LeaveGroupsReq) ProtoMessage()
func (*LeaveGroupsReq) ProtoReflect ¶
func (x *LeaveGroupsReq) ProtoReflect() protoreflect.Message
func (*LeaveGroupsReq) Reset ¶
func (x *LeaveGroupsReq) Reset()
func (*LeaveGroupsReq) String ¶
func (x *LeaveGroupsReq) String() string
type PushMsgReply ¶
type PushMsgReply struct { Index map[string]int32 `` /* 152-byte string literal not displayed */ // contains filtered or unexported fields }
func (*PushMsgReply) Descriptor
deprecated
func (*PushMsgReply) Descriptor() ([]byte, []int)
Deprecated: Use PushMsgReply.ProtoReflect.Descriptor instead.
func (*PushMsgReply) GetIndex ¶
func (x *PushMsgReply) GetIndex() map[string]int32
func (*PushMsgReply) ProtoMessage ¶
func (*PushMsgReply) ProtoMessage()
func (*PushMsgReply) ProtoReflect ¶
func (x *PushMsgReply) ProtoReflect() protoreflect.Message
func (*PushMsgReply) Reset ¶
func (x *PushMsgReply) Reset()
func (*PushMsgReply) String ¶
func (x *PushMsgReply) String() string
type PushMsgReq ¶
type PushMsgReq struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` ProtoOp int32 `protobuf:"varint,2,opt,name=protoOp,proto3" json:"protoOp,omitempty"` Proto *protocol.Proto `protobuf:"bytes,3,opt,name=proto,proto3" json:"proto,omitempty"` // contains filtered or unexported fields }
func (*PushMsgReq) Descriptor
deprecated
func (*PushMsgReq) Descriptor() ([]byte, []int)
Deprecated: Use PushMsgReq.ProtoReflect.Descriptor instead.
func (*PushMsgReq) GetKeys ¶
func (x *PushMsgReq) GetKeys() []string
func (*PushMsgReq) GetProto ¶
func (x *PushMsgReq) GetProto() *protocol.Proto
func (*PushMsgReq) GetProtoOp ¶
func (x *PushMsgReq) GetProtoOp() int32
func (*PushMsgReq) ProtoMessage ¶
func (*PushMsgReq) ProtoMessage()
func (*PushMsgReq) ProtoReflect ¶
func (x *PushMsgReq) ProtoReflect() protoreflect.Message
func (*PushMsgReq) Reset ¶
func (x *PushMsgReq) Reset()
func (*PushMsgReq) String ¶
func (x *PushMsgReq) String() string
type SyncMsg ¶
type SyncMsg struct { LogId int64 `protobuf:"varint,1,opt,name=logId,proto3" json:"logId,omitempty"` // contains filtered or unexported fields }
Proto 中 Op 为 SyncMsgReply 时, body 必须可以反序列化为 SyncMsg
func (*SyncMsg) Descriptor
deprecated
func (*SyncMsg) ProtoMessage ¶
func (*SyncMsg) ProtoMessage()
func (*SyncMsg) ProtoReflect ¶
func (x *SyncMsg) ProtoReflect() protoreflect.Message
type UnimplementedCometServer ¶
type UnimplementedCometServer struct { }
UnimplementedCometServer must be embedded to have forward compatible implementations.
func (UnimplementedCometServer) Broadcast ¶
func (UnimplementedCometServer) Broadcast(context.Context, *BroadcastReq) (*BroadcastReply, error)
func (UnimplementedCometServer) BroadcastGroup ¶
func (UnimplementedCometServer) BroadcastGroup(context.Context, *BroadcastGroupReq) (*BroadcastGroupReply, error)
func (UnimplementedCometServer) DelGroups ¶
func (UnimplementedCometServer) DelGroups(context.Context, *DelGroupsReq) (*DelGroupsReply, error)
func (UnimplementedCometServer) JoinGroups ¶
func (UnimplementedCometServer) JoinGroups(context.Context, *JoinGroupsReq) (*JoinGroupsReply, error)
func (UnimplementedCometServer) LeaveGroups ¶
func (UnimplementedCometServer) LeaveGroups(context.Context, *LeaveGroupsReq) (*LeaveGroupsReply, error)
func (UnimplementedCometServer) PushMsg ¶
func (UnimplementedCometServer) PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error)
type UnsafeCometServer ¶
type UnsafeCometServer interface {
// contains filtered or unexported methods
}
UnsafeCometServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CometServer will result in compilation errors.