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 ConfigureRAWClientHandler(c *ReadThenWriteClient)
- func ConfigureRWWClientHandler(c *ReadWithWriteClient)
- func CreateNTQQWebSocket() error
- func CreateWSInstance(port int)
- func EnableHttpService(port int)
- func GetOnlineClients(ctx *gin.Context)
- func GetWebSocketPort(ctx *gin.Context)
- func Init()
- func TryPostHttp(postUrl string, secret string) error
- func TryReverseWebsocket(wsUrl string, accessToken string) error
- func TryTouchEnhanceHook(msgData global.MsgData, handler *Handler) (global.MsgData, bool, error)
- type Cache
- type Client
- type EchoMap
- type Handler
- type ReadThenWriteClient
- type ReadWithWriteClient
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 ConfigureRAWClientHandler ¶ added in v0.2.5
func ConfigureRAWClientHandler(c *ReadThenWriteClient)
ConfigureRAWClientHandler configure and link handler to connection
func ConfigureRWWClientHandler ¶ added in v0.2.5
func ConfigureRWWClientHandler(c *ReadWithWriteClient)
ConfigureRWWClientHandler configure and link handler to connection
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 TryPostHttp ¶ added in v0.2.5
func TryReverseWebsocket ¶ added in v0.2.5
TryReverseWebsocket 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
type ReadThenWriteClient ¶ added in v0.2.5
type ReadThenWriteClient struct {
// contains filtered or unexported fields
}
ReadThenWriteClient read loop and write loop
func NewReadThenWriteClient ¶ added in v0.2.5
func NewReadThenWriteClient(conn *websocket.Conn, handler *Handler) *ReadThenWriteClient
type ReadWithWriteClient ¶ added in v0.2.5
type ReadWithWriteClient struct {
// contains filtered or unexported fields
}
ReadWithWriteClient read loop with write loop
func NewReadWithWriteClient ¶ added in v0.2.5
func NewReadWithWriteClient(url string, secret string, handler *Handler) *ReadWithWriteClient
Click to show internal directories.
Click to hide internal directories.