Documentation ¶
Index ¶
- Variables
- type Client
- type Metadata
- type Notification
- type OnEventFn
- type OnMessageEventFn
- type Option
- func WithOnConnect(fn OnEventFn) Option
- func WithOnDisconnect(fn OnEventFn) Option
- func WithOnKeepalive(fn OnMessageEventFn) Option
- func WithOnNotification(fn OnMessageEventFn) Option
- func WithOnReconnect(fn OnMessageEventFn) Option
- func WithOnRevocation(fn OnMessageEventFn) Option
- func WithOnWelcome(fn OnMessageEventFn) Option
- type Payload
- type Session
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyInUse = errors.New("client already in use") // WebSocket client is already in use. ErrNotConnected = errors.New("client is not connected") // WebSocket client is not connected ErrConnectionFailed = errors.New("failed to setup connection") // Failed to set up WebSocket connection )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientDefault ¶
type Notification ¶
type Notification struct { Subscription Subscription `json:"subscription"` Event interface{} `json:"event"` }
type OnMessageEventFn ¶
type Option ¶
type Option func(*Client)
func WithOnConnect ¶
func WithOnDisconnect ¶
func WithOnKeepalive ¶
func WithOnKeepalive(fn OnMessageEventFn) Option
func WithOnNotification ¶
func WithOnNotification(fn OnMessageEventFn) Option
func WithOnReconnect ¶
func WithOnReconnect(fn OnMessageEventFn) Option
func WithOnRevocation ¶
func WithOnRevocation(fn OnMessageEventFn) Option
func WithOnWelcome ¶
func WithOnWelcome(fn OnMessageEventFn) Option
Click to show internal directories.
Click to hide internal directories.