pool

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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