ws

package
v0.0.0-...-4d5a555 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Time allowed to write a message to the peer.
	WriteWait = 10 * time.Second
)

Variables

This section is empty.

Functions

func IsExpectedWSCloseError

func IsExpectedWSCloseError(err error) bool

Types

type Token

type Token string

func (Token) Set

func (t Token) Set(req *http.Request)

type WebSocketClient

type WebSocketClient interface {
	Loop(stopCh <-chan struct{}, done *sync.WaitGroup)
	PipeConnection(pipeID string, pipe common.Pipe) error
	PipeClose(pipeID string, pipe common.Pipe) error
}

func NewClient

func NewClient(
	t Token,
	endpoint string,
	crChannel *manager.CRChan) (WebSocketClient, error)

Jump to

Keyboard shortcuts

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