pool

package
v0.0.0-...-6222cb7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlumeClientPool

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

func (*FlumeClientPool) ActivePoolSize

func (self *FlumeClientPool) ActivePoolSize() int

func (*FlumeClientPool) CorePoolSize

func (self *FlumeClientPool) CorePoolSize() int

func (*FlumeClientPool) Destroy

func (self *FlumeClientPool) Destroy()

func (*FlumeClientPool) Get

func (self *FlumeClientPool) Get(timeout time.Duration) (*client.FlumeClient, error)

func (*FlumeClientPool) GetHostPort

func (self *FlumeClientPool) GetHostPort() config.HostPort

func (*FlumeClientPool) MonitorPool

func (self *FlumeClientPool) MonitorPool() (int, int, int)

func (*FlumeClientPool) PoolSize

func (self *FlumeClientPool) PoolSize() int

func (*FlumeClientPool) Release

func (self *FlumeClientPool) Release(fclient *client.FlumeClient) error

return current connection

func (*FlumeClientPool) ReleaseBroken

func (self *FlumeClientPool) ReleaseBroken(fclient *client.FlumeClient) error

unleash bad resources

type FlumePoolLink struct {
	FlumePool *FlumeClientPool

	BusinessLink *list.List

	Mutex sync.RWMutex // Ensures that the list can be operated safely in concurrent situations
}

flumeclient pool Link

func NewFlumePoolLink(hp config.HostPort) (*FlumePoolLink, error)

func (*FlumePoolLink) AttachBusiness

func (self *FlumePoolLink) AttachBusiness(business string)

func (*FlumePoolLink) DetachBusiness

func (self *FlumePoolLink) DetachBusiness(business string)

func (*FlumePoolLink) IsAttached

func (self *FlumePoolLink) IsAttached(business string) bool

type IdleClient

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

Jump to

Keyboard shortcuts

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