Versions in this module Expand all Collapse all v1 v1.0.1 Nov 5, 2018 v1.0.0 Feb 8, 2018 Changes in this version + var ErrClientNotEmpty = errors.New("client command buffer not empty, send commands or reset client") + var ErrMalformedResponse = errors.New("malformed response returned from server") + func DecodeBroadcast(body []byte) (bool, error) + func DecodeChannels(body []byte) ([]string, error) + func DecodeDisconnect(body []byte) (bool, error) + func DecodePresence(body []byte) (map[string]ClientInfo, error) + func DecodePublish(body []byte) (bool, error) + func DecodeUnsubscribe(body []byte) (bool, error) + func GenerateAPISign(secret string, data []byte) string + func GenerateChannelSign(secret, client, channel, channelData string) string + func GenerateClientToken(secret, user, timestamp, info string) string + type Client struct + Endpoint string + Secret string + Timeout time.Duration + func NewClient(addr, secret string, timeout time.Duration) *Client + func NewInsecureAPIClient(addr string, timeout time.Duration) *Client + func (c *Client) AddBroadcast(channels []string, data []byte) error + func (c *Client) AddBroadcastClient(channels []string, data []byte, client string) error + func (c *Client) AddChannels() error + func (c *Client) AddDisconnect(user string) error + func (c *Client) AddHistory(channel string) error + func (c *Client) AddPresence(channel string) error + func (c *Client) AddPublish(channel string, data []byte) error + func (c *Client) AddPublishClient(channel string, data []byte, client string) error + func (c *Client) AddStats() error + func (c *Client) AddUnsubscribe(channel string, user string) error + func (c *Client) Broadcast(channels []string, data []byte) (bool, error) + func (c *Client) BroadcastClient(channels []string, data []byte, client string) (bool, error) + func (c *Client) Channels() ([]string, error) + func (c *Client) Disconnect(user string) (bool, error) + func (c *Client) History(channel string) ([]Message, error) + func (c *Client) Presence(channel string) (map[string]ClientInfo, error) + func (c *Client) Publish(channel string, data []byte) (bool, error) + func (c *Client) PublishClient(channel string, data []byte, client string) (bool, error) + func (c *Client) Reset() + func (c *Client) Send() (Result, error) + func (c *Client) Stats() (Stats, error) + func (c *Client) Unsubscribe(channel, user string) (bool, error) + type ClientInfo struct + ChannelInfo *json.RawMessage + Client string + DefaultInfo *json.RawMessage + User string + type Command struct + Method string + Params map[string]interface{} + UID string + type Message struct + Channel string + Client string + Data *json.RawMessage + Info *ClientInfo + Timestamp string + UID string + func DecodeHistory(body []byte) ([]Message, error) + type NodeInfo struct + Metrics map[string]int64 + Name string + Started int64 + UID string + type Response struct + Body json.RawMessage + Error string + Method string + type Result []Response + type Stats struct + MetricsInterval int64 + Nodes []NodeInfo + func DecodeStats(body []byte) (Stats, error) Other modules containing this package gopkg.in/centrifugal/gocent.v2