pool

package
v0.0.0-...-9db4afe Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1.240917_rc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

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

func NewCtx

func NewCtx(conn interface{}) *Ctx

type Factory

type Factory func() (interface{}, error)

Factory factory

type Pool

type Pool struct {
	*log.Log
	// contains filtered or unexported fields
}

Pool pool

func NewPool

func NewPool(maxIdle, maxOpen, timeout int, factory Factory) *Pool

NewPool new pool

func (*Pool) Close

func (p *Pool) Close() error

func (*Pool) Get

func (p *Pool) Get() (interface{}, error)

Get 从Pool中取出一个连接

func (*Pool) LogLevel

func (p *Pool) LogLevel(lv uint8)

LogLevel LogLevel

func (*Pool) Put

func (p *Pool) Put(conn interface{}) error

将连接放入Pool中

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳