pool

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnFactory

type ConnFactory = func(context.Context) (net.Conn, error)

type ConnPool

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

func NewConnPool

func NewConnPool(size uint, ttl, backoff time.Duration,
	connFactory ConnFactory, logger *clog.CondLogger) *ConnPool

func (*ConnPool) Get

func (p *ConnPool) Get(ctx context.Context) (net.Conn, error)

func (*ConnPool) Start

func (p *ConnPool) Start()

func (*ConnPool) Stop

func (p *ConnPool) Stop()

Jump to

Keyboard shortcuts

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