pool

package
v0.0.0-...-399f02e Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewObject

type NewObject func() (ObjectItem, error)

type ObjectItem

type ObjectItem interface {
	Close() error
}

type Pool

type Pool interface {
	Acquire() (ObjectItem, error) // get object
	Release(ObjectItem) error     // release object
	Shutdown() error              // close
}

func NewNormalizePool

func NewNormalizePool(minOpen, maxOpen int, maxLifetime, timeout time.Duration, factory NewObject) (Pool, error)

Jump to

Keyboard shortcuts

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