pool

package
v0.0.0-...-71dd0ca Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectObject

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

type ConnectPool

type ConnectPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewConnPool

func NewConnPool() (connectPool *ConnectPool)

func (*ConnectPool) CheckErrorForPutConnect

func (connectPool *ConnectPool) CheckErrorForPutConnect(c *net.TCPConn, target string, err error)

func (*ConnectPool) Get

func (connectPool *ConnectPool) Get(targetAddr string) (c *net.TCPConn, err error)

func (*ConnectPool) Put

func (connectPool *ConnectPool) Put(c *net.TCPConn, forceClose bool)

func (*ConnectPool) ReleaseAllConnect

func (connectPool *ConnectPool) ReleaseAllConnect(target string)

type Pool

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

func NewPool

func NewPool(min, max int, target string) (p *Pool)

func (*Pool) AutoRelease

func (p *Pool) AutoRelease()

func (*Pool) Get

func (p *Pool) Get() (c *net.TCPConn, err error)

Jump to

Keyboard shortcuts

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