pool

package
v1.0.73 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	Ping() error
	Close() error
}

type Pool

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

func New

func New(min, max int, idle time.Duration, new func() (entry Entry, err error)) *Pool

func (*Pool) Get

func (p *Pool) Get(ctx context.Context) (entry Entry, err error)

func (*Pool) Len

func (p *Pool) Len() int

func (*Pool) Put

func (p *Pool) Put(e Entry) (err error)

Jump to

Keyboard shortcuts

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