Documentation ¶
Index ¶
- Constants
- type WebSocket
- func (ws *WebSocket) AddListener(event int, channel chan<- json.RawMessage)
- func (ws *WebSocket) CancelSubs()
- func (ws *WebSocket) Close() error
- func (ws *WebSocket) Connect() (bool, error)
- func (ws *WebSocket) EmitEvent(event int, arg interface{})
- func (ws *WebSocket) Host() string
- func (ws *WebSocket) IsReady() bool
- func (ws *WebSocket) ListenerCount(event int) int
- func (ws *WebSocket) Once(event int, channel chan<- json.RawMessage)
- func (ws *WebSocket) Port() int
- func (ws *WebSocket) RegisterSub(channel, roomID string, filters json.RawMessage, subscribeToSelf bool, ...)
- func (ws *WebSocket) RemoveAllListeners(event int)
- func (ws *WebSocket) RemoveListener(event int, c chan<- json.RawMessage)
- func (ws *WebSocket) RequestHistory() map[string]time.Time
- func (ws *WebSocket) Send(query []byte, options types.QueryOptions, ...) error
- func (ws *WebSocket) SslConnection() bool
- func (ws *WebSocket) State() int
- func (ws *WebSocket) UnregisterSub(roomID string)
Constants ¶
View Source
const (
MAX_EMIT_TIMEOUT = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func NewWebSocket ¶
NewWebSocket instanciates a new webSocket connection object
func (*WebSocket) AddListener ¶
func (ws *WebSocket) AddListener(event int, channel chan<- json.RawMessage)
Adds a listener to a Kuzzle global event. When an event is fired, listeners are called in the order of their insertion.
func (*WebSocket) CancelSubs ¶
func (ws *WebSocket) CancelSubs()
func (*WebSocket) ListenerCount ¶
func (*WebSocket) RegisterSub ¶
func (ws *WebSocket) RegisterSub(channel, roomID string, filters json.RawMessage, subscribeToSelf bool, notifChan chan<- types.NotificationResult, onReconnectChannel chan<- interface{})
func (*WebSocket) RemoveAllListeners ¶
Removes all listeners, either from all events and close channels
func (*WebSocket) RemoveListener ¶
func (ws *WebSocket) RemoveListener(event int, c chan<- json.RawMessage)
Removes a listener from an event.
func (*WebSocket) Send ¶
func (ws *WebSocket) Send(query []byte, options types.QueryOptions, responseChannel chan<- *types.KuzzleResponse, requestId string) error
func (*WebSocket) SslConnection ¶
func (*WebSocket) UnregisterSub ¶
Click to show internal directories.
Click to hide internal directories.