pool

package
v0.0.0-...-42b3dd6 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConn

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

func NewDBConn

func NewDBConn() *DBConn

新建数据库连接

func (*DBConn) Close

func (d *DBConn) Close()

关闭数据库连接

type Pool

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

func NewPool

func NewPool(min, max int) *Pool

func (*Pool) Close

func (p *Pool) Close()

关闭池

func (*Pool) Get

func (p *Pool) Get() *DBConn

从池中取出连接

func (*Pool) Put

func (p *Pool) Put(d *DBConn)

将连接返回池中

Jump to

Keyboard shortcuts

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