Documentation
¶
Index ¶
- Constants
- type Option
- type WebSocket
- func (ws *WebSocket) Close() error
- func (ws *WebSocket) Connect(url string) (conn.Connection, error)
- func (ws *WebSocket) LiveNotifications(liveQueryID string) (chan model.Notification, error)
- func (ws *WebSocket) Logger(logData logger.Logger) *WebSocket
- func (ws *WebSocket) RawLogger(logData logger.Logger) *WebSocket
- func (ws *WebSocket) Send(method string, params []interface{}) (interface{}, error)
- func (ws *WebSocket) SetCompression(compression bool) *WebSocket
- func (ws *WebSocket) SetTimeOut(timeout time.Duration) *WebSocket
- func (ws *WebSocket) Start() error
Constants ¶
View Source
const ( // RequestIDLength size of id sent on WS request RequestIDLength = 16 // CloseMessageCode identifier the message id for a close request CloseMessageCode = 1000 // DefaultTimeout timeout in seconds DefaultTimeout = 30 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebSocket ¶
type WebSocket struct { Conn *nhooyr.Conn Timeout time.Duration Option []Option // contains filtered or unexported fields }
func (*WebSocket) LiveNotifications ¶
func (ws *WebSocket) LiveNotifications(liveQueryID string) (chan model.Notification, error)
func (*WebSocket) SetCompression ¶
Click to show internal directories.
Click to hide internal directories.