Documentation ¶ Index ¶ type Object type Pool func New[T Object](name string) Pool[T] func (p Pool[T]) Add(obj T) func (p Pool[T]) Clear() func (p Pool[T]) Del(obj T) func (p Pool[T]) Get(key string) (T, bool) func (p Pool[T]) Iter(fn func(k string, v T) bool) func (p Pool[T]) Name() string func (p Pool[T]) Size() int func (p Pool[T]) Slice() []T Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Object ¶ type Object interface { Key() string Name() string } type Pool ¶ type Pool[T Object] struct { // contains filtered or unexported fields } func New ¶ func New[T Object](name string) Pool[T] func (Pool[T]) Add ¶ func (p Pool[T]) Add(obj T) func (Pool[T]) Clear ¶ func (p Pool[T]) Clear() func (Pool[T]) Del ¶ func (p Pool[T]) Del(obj T) func (Pool[T]) Get ¶ func (p Pool[T]) Get(key string) (T, bool) func (Pool[T]) Iter ¶ func (p Pool[T]) Iter(fn func(k string, v T) bool) func (Pool[T]) Name ¶ func (p Pool[T]) Name() string func (Pool[T]) Size ¶ func (p Pool[T]) Size() int func (Pool[T]) Slice ¶ func (p Pool[T]) Slice() []T Source Files ¶ View all Source files pool.gopool_prod.go Click to show internal directories. Click to hide internal directories.