Versions in this module Expand all Collapse all v1 v1.0.2 Apr 25, 2024 v1.0.1 Apr 24, 2024 Changes in this version + type Factory func(context.Context) (T, error) + type Option func(*pool[T]) + func WithAge[T any](maxAge int64) Option[T] + func WithEvict[T any](cb func(T)) Option[T] + func WithSize[T any](maxSize int) Option[T] + type Pool struct + func New[T any](factory Factory[T], options ...Option[T]) *Pool[T] + func (p Pool) Get() (T, error) + func (p Pool) GetContext(ctx context.Context) (T, error) + func (p Pool) Put(item T)