Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Hub = HubType{ // contains filtered or unexported fields }
Hub is a websocket hub
To send message do Hub.broadcast <- []byte("MESSAGE")
View Source
var Upgrader = websocket.Upgrader{}
Upgrader is used to upgrade requests to websocket requests
Functions ¶
func GetNotifications ¶
func GetNotifications() *[]Notification
GetNotifications will return all notifications currently saved in the database - returns nil on error
func NewNotification ¶
NewNotification will push a websocket message to all
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a websocket client
type HubType ¶
type HubType struct {
// contains filtered or unexported fields
}
HubType is the type for a websocket hub
type Notification ¶
type Notification = config.Notification
Notification is a link to the underlying type of config.Notification
Click to show internal directories.
Click to hide internal directories.