Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsPool ¶
MetricsPool is a sync.Pool that records the number of gets and puts
func (*MetricsPool) Get ¶
func (p *MetricsPool) Get() interface{}
Get selects an arbitrary item from the Pool, removes it from the Pool, and returns it to the caller. Get may choose to ignore the pool and treat it as empty. Callers should not assume any relation between values passed to Put and the values returned by Get.
If Get would otherwise return nil and p.New is non-nil, Get returns the result of calling p.New.
func (*MetricsPool) Releases ¶
func (p *MetricsPool) Releases() int32
Releases returns the current # of items requested from the pool, but not returned.
This is mainly for detecting leaks
Click to show internal directories.
Click to hide internal directories.