pooled

package
Version: v0.0.0-...-1fdf4e0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	io.ReadWriter

	Log() *zap.SugaredLogger
	ReadWriter() *bufio.ReadWriter
	SetReadDeadline(t time.Time) error
	SetWriteDeadline(t time.Time) error
	EmptyReadBuffer(timeout time.Duration) ([]byte, error)
	ReadUntil(delim byte, timeout time.Duration) ([]byte, error)
	// contains filtered or unexported methods
}

Conn .

func Wrap

func Wrap(c net.Conn) Conn

Wrap .

type Map

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

Map .

func NewMap

func NewMap(ttl, delay time.Duration, newConn NewConnection) *Map

NewMap .

func (*Map) Do

func (m *Map) Do(key interface{}, work Work) error

Do .

type NewConnection

type NewConnection func(key interface{}) (Conn, error)

NewConnection .

type Work

type Work func(Conn) error

Work .

Source Files

Jump to

Keyboard shortcuts

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