Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeWs ¶
func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request, c *Controller)
serveWs handles websocket requests from the peer.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(rdb *redis.Client) *Controller
func (*Controller) HandleIncomingCommand ¶
func (c *Controller) HandleIncomingCommand(command Command, client *Client)
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to the clients.
type MessageListReply ¶
Click to show internal directories.
Click to hide internal directories.