websocket_client

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(uri string, options Options) *Client

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) On

func (client *Client) On(message string, f interface{}) (err error)

func (*Client) Send

func (client *Client) Send(event string, data ...interface{}) (string, error)

type ID

type ID struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type Options

type Options struct {
	Headers   http.Header
	Reconnect bool
}

type Payload

type Payload struct {
	Event string      `json:"event,omitempty"`
	Data  interface{} `json:"data,omitempty"`
	Ack   string      `json:"ack,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL