Documentation
¶
Index ¶
- func ClientBroadcastEvent(trigger *Handler, targets []interface{}, uuid string, data string)
- func ClientBroadcastEventCallback(trigger *Handler, target interface{}, uuid string, data string)
- func ClientOnlineStatusChangeEvent(trigger *Handler, online bool)
- func CreateNTQQWebSocket() error
- func CreateWSInstance(port int)
- func EnableHttpService(port int)
- func GetOnlineClients(ctx *gin.Context)
- func GetWebSocketPort(ctx *gin.Context)
- func Init()
- func TryReverseWSInstance(wsUrl string, accessToken string) error
- func TryTouchEnhanceHook(msgData global.MsgData, handler *Handler) (global.MsgData, bool, error)
- type Cache
- type EchoMap
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientBroadcastEvent ¶ added in v0.1.0
func ClientBroadcastEventCallback ¶ added in v0.1.0
func ClientOnlineStatusChangeEvent ¶ added in v0.1.0
func CreateNTQQWebSocket ¶
func CreateNTQQWebSocket() error
func CreateWSInstance ¶
func CreateWSInstance(port int)
CreateWSInstance create new ws instance and wait client connection
func EnableHttpService ¶ added in v0.1.0
func EnableHttpService(port int)
EnableHttpService enable http server
func GetOnlineClients ¶ added in v0.1.0
GetOnlineClients get online clients array
func GetWebSocketPort ¶ added in v0.1.0
GetWebSocketPort get available ws port
func TryReverseWSInstance ¶ added in v0.2.0
TryReverseWSInstance try to establish reverse ws client connection
Types ¶
type EchoMap ¶
type EchoMap struct { Receive chan bool // contains filtered or unexported fields }
EchoMap 利用 echo 完成 NTQQ -> client 消息调度 (发送时标记echo)
func NewEchoMap ¶
func NewEchoMap() *EchoMap
type Handler ¶
func FindHandler ¶
func NewHandler ¶
func (*Handler) AddMessage ¶
func (*Handler) GetMessage ¶
GetMessage from local cache
Click to show internal directories.
Click to hide internal directories.