Documentation ¶
Index ¶
- type Admin
- func (a *Admin) AddCheckFunc(funcName string, f func(interface{}) (string, bool))
- func (a *Admin) CheckWs(funcName string, option interface{}) (string, bool)
- func (a *Admin) HandlerMes(msg biz.IMessage) bool
- func (a *Admin) HandlerWS(funcName string, options *websocket.AcceptOptions) func(c *gin.Context)
- func (a *Admin) Register(key string) biz.IClient
- func (a *Admin) RegisteredMsgHandler(t int32, handlerFunc biz.TypeHandlerFunc) bool
- func (a *Admin) SendMsg(funcName string) func(c *gin.Context)
- func (a *Admin) UnRegister(key string)
- type Client
- type Handle
- type Manage
- type Message
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct { biz.IManage biz.ITopic biz.IHandle Logger *zap.Logger // contains filtered or unexported fields }
Admin 最终用户拿到的实体对象
func (*Admin) AddCheckFunc ¶
AddCheckFunc 添加校验方法
func (*Admin) HandlerMes ¶
HandlerMes 处理message 分发客户端流程
func (*Admin) RegisteredMsgHandler ¶
func (a *Admin) RegisteredMsgHandler(t int32, handlerFunc biz.TypeHandlerFunc) bool
RegisteredMsgHandler 注册处理消息
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Handle ¶
func (*Handle) GetHandler ¶
func (h *Handle) GetHandler(i int32) (biz.TypeHandlerFunc, bool)
GetHandler 获取注册函数
type Manage ¶
type Manage struct {
// contains filtered or unexported fields
}
Manage 管理所有客户端
func (*Manage) FindClient ¶
FindClient 查找客户端
func (*Manage) FindClients ¶
FindClients 批量查找客户端用户
type Message ¶
type Topic ¶
func (*Topic) GetTopicList ¶
GetTopicList 获取订阅topic的用户
Click to show internal directories.
Click to hide internal directories.