pool

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPoolSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func (*Connection) Release

func (c *Connection) Release()

type Pool

type Pool struct {
	Name    string
	Size    uint
	TTL     time.Duration //second
	Timeout time.Duration //second
	// contains filtered or unexported fields
}

func New

func New(name string, size uint, timeout uint, ttl ...int) *Pool

func (*Pool) GetConn

func (p *Pool) GetConn() (*Connection, error)

func (Pool) Idle

func (p Pool) Idle() int

func (Pool) Map

func (p Pool) Map() map[string]interface{}

func (Pool) Print

func (p Pool) Print() string

func (Pool) String

func (p Pool) String() string

func (Pool) Use

func (p Pool) Use() int

Jump to

Keyboard shortcuts

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