Documentation
¶
Index ¶
- Constants
- func WithClock[PT Item[T], T any](clock clockwork.Clock) option[PT, T]
- func WithCloseItemTimeout[PT Item[T], T any](t time.Duration) option[PT, T]
- func WithCreateItemFunc[PT Item[T], T any](f func(ctx context.Context) (PT, error)) option[PT, T]
- func WithCreateItemTimeout[PT Item[T], T any](t time.Duration) option[PT, T]
- func WithIdleThreshold[PT Item[T], T any](idleThreshold time.Duration) option[PT, T]
- func WithLimit[PT Item[T], T any](size int) option[PT, T]
- func WithSyncCloseItem[PT Item[T], T any]() option[PT, T]
- func WithTrace[PT Item[T], T any](t *Trace) option[PT, T]
- type Config
- type Item
- type Pool
- type Stats
- type Trace
Constants ¶
View Source
const (
DefaultLimit = 50
)
Variables ¶
This section is empty.
Functions ¶
func WithCloseItemTimeout ¶ added in v3.59.0
func WithCreateItemFunc ¶ added in v3.79.1
func WithCreateItemTimeout ¶ added in v3.59.0
func WithIdleThreshold ¶ added in v3.79.1
func WithSyncCloseItem ¶ added in v3.80.0
Types ¶
type Trace ¶ added in v3.58.0
type Trace struct {
OnNew func(ctx *context.Context, call stack.Caller) func(limit int)
OnClose func(ctx *context.Context, call stack.Caller) func(err error)
OnTry func(ctx *context.Context, call stack.Caller) func(err error)
OnWith func(ctx *context.Context, call stack.Caller) func(attempts int, err error)
OnPut func(ctx *context.Context, call stack.Caller, item any) func(err error)
OnGet func(ctx *context.Context, call stack.Caller) func(item any, attempts int, err error)
OnChange func(Stats)
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.