README ¶ wsPool Like ConnPool but for websockets Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Logger type NewConnectionFunc type Pool func (p *Pool) Do(ctx context.Context, work Work) error type Work 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 Source Files ¶ View all Source files log.go pool.go ws.go Click to show internal directories. Click to hide internal directories.