Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub is a hub of websocket connections. Those connections are connected to each other via this hub.
func NewHub ¶
NewHub returns a new hub which is accepting notifications and connections. The hub stops accepting new requests when "ctx" is canceled.
func (*Hub) AcceptConnection ¶
AcceptConnection receives a websocket connection and register it as a subscriber of broadcast notifications.
Click to show internal directories.
Click to hide internal directories.