Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UserCache is the list of users currently with ws connections to this instance UserCache = map[dbt.UUID]*User{} )
Functions ¶
func BroadcastMessage ¶
func BroadcastMessage(message map[string]interface{})
BroadcastMessage sends message to all users
func BroadcastMessageRaw ¶
func OnlineUserCount ¶
func OnlineUserCount() int64
OnlineUserCount is the total number of active users
Types ¶
type User ¶
func (*User) Disconnect ¶
func (u *User) Disconnect()
func (*User) IsConnected ¶
func (*User) SendWsMessage ¶
func (*User) SendWsMessageRaw ¶
Click to show internal directories.
Click to hide internal directories.