Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *Config // contains filtered or unexported fields }
func (*Client) Subscribe ¶
func (c *Client) Subscribe(payload gqlwsmessage.SubscribePayload, handlers Handlers) func()
returns unsubscribe function
type Config ¶
type Config struct { URL string ConnectionAckTimeout time.Duration GraceClosePeriod time.Duration // maximum retry attempts before a connection is established ReconnectAttempts uint32 // OnConnecting called on connection init // returns the payload to send in the init request OnConnecting func() interface{} OnPing func(*gqlwsmessage.Message) interface{} OnPong, OnConnected func(*gqlwsmessage.Message) }
Click to show internal directories.
Click to hide internal directories.