Documentation ¶
Index ¶
Constants ¶
View Source
const ( ME = "Go-Pusher" VERSION = "0.1" PROTOCOL_VERSION = "7" EVENT_CHANNEL_BUFF_SIZE = 1000 // events channel buffer size HEARTBEAT_RATE = 30 // time in second between 2 beats )
View Source
const ErrEvent = "ErrEvent"
ErrEvent error on event
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Events chan *Event Stop chan bool Errors chan error // contains filtered or unexported fields }
Client is a pusher client
func NewCustomClient ¶
NewCustomClient return a custom client
func (*Client) Unsubscribe ¶
Unsubscribe from a channel
type Event ¶
type Event struct { Event string `json:"event"` Data string `json:"data"` Channel string `json:"channel"` }
Event is a pusher event
type EventError ¶
type EventError struct { Event string `json:"event"` Data struct { Message string `json:"message"` Code int `json:"code"` } `json:"data"` }
EventError contains a structured error in its Data field. It implements error.
func (EventError) Error ¶
func (ewe EventError) Error() string
Click to show internal directories.
Click to hide internal directories.