wspool

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

README

wsPool

Like ConnPool but for websockets

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debugf(format string, a ...interface{})
	Infof(format string, a ...interface{})
	Warnf(format string, a ...interface{})
	Errorf(format string, a ...interface{})
}

type NewConnectionFunc

type NewConnectionFunc func(context.Context) (*websocket.Conn, error)

type Pool

type Pool struct {
	NewConnection NewConnectionFunc
	TTL           time.Duration
	Delay         time.Duration
	Logger        Logger
	// contains filtered or unexported fields
}

func (*Pool) Do

func (p *Pool) Do(ctx context.Context, work Work) error

type Work

type Work func(*websocket.Conn) error

Jump to

Keyboard shortcuts

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