websocket

package
v0.0.0-...-e917273 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL    string      `yaml:"url"`
	Header http.Header `yaml:"header"`
	Ops    []*Op       `yaml:"ops"`
}

Config is a websocket config.

func (*Config) Conn

func (c *Config) Conn(ctx context.Context) (*websocket.Conn, *http.Response, error)

Conn returns a websocket connection.

type Op

type Op struct {
	Read  bool   `yaml:"read"`
	Write string `yaml:"write,omitempty"`
}

Op is a operation.

Jump to

Keyboard shortcuts

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