Documentation ¶
Index ¶
- func ParseTemplates(_path string) *template.Template
- func SetHeaders(w http.ResponseWriter)
- type ApiHandler
- type Client
- func (c *Client) Close() error
- func (c *Client) GetSend() chan *Message
- func (c *Client) IsClosed(ch <-chan *Message) bool
- func (c *Client) Listen()
- func (c *Client) NewMessage() *Message
- func (c *Client) Send(message *Message)
- func (c *Client) SendBytes(payload []byte)
- func (c *Client) SendString(payload string)
- type Command
- type Message
- type RateLimit
- type Server
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTemplates ¶
func SetHeaders ¶
func SetHeaders(w http.ResponseWriter)
Types ¶
type ApiHandler ¶
type ApiHandler struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct { Server *Server // The websocket connection. Conn *websocket.Conn // contains filtered or unexported fields }
Client is a middleman between the websocket connection and the node.
func (*Client) NewMessage ¶
func (*Client) SendString ¶
type Message ¶
func NewMessage ¶
type RateLimit ¶
type RateLimit struct { Limit rate.Limit Burst int Interval time.Duration Mutex *sync.RWMutex Visitors map[string]*Visitor }
Click to show internal directories.
Click to hide internal directories.