Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastMessage ¶
type BroadcastMessage struct { Event string `json:"event"` Data interface{} `json:"data"` }
type Broadcaster ¶
type Broadcaster interface {
Broadcast(message *BroadcastMessage)
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddSubscriptions ¶
func (*Client) ClearSubscriptions ¶
func (client *Client) ClearSubscriptions()
func (*Client) GetSubscriptions ¶
func (*Client) HasSubscription ¶
func (*Client) RemoveSubscriptions ¶
type Server ¶
type Server struct { Receive chan *Message // contains filtered or unexported fields }
func (*Server) Broadcast ¶
func (server *Server) Broadcast(message *BroadcastMessage)
func (*Server) DefaultHTTPHandler ¶
func (server *Server) DefaultHTTPHandler() func(http.ResponseWriter, *http.Request)
func (*Server) DisconnectAll ¶
func (server *Server) DisconnectAll()
Click to show internal directories.
Click to hide internal directories.