pool

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool[I Poolable] struct {
	// contains filtered or unexported fields
}

func RunPool

func RunPool[I Poolable]() *Pool[I]

func (*Pool[I]) Add

func (p *Pool[I]) Add(item I)

func (*Pool[I]) GetAll

func (p *Pool[I]) GetAll() map[string]I

func (*Pool[I]) GetByName

func (p *Pool[I]) GetByName(name string) I

func (*Pool[I]) GetByNames

func (p *Pool[I]) GetByNames(names []string) []I

func (*Pool[I]) Remove

func (p *Pool[I]) Remove(item I)

func (*Pool[I]) Shutdown

func (p *Pool[I]) Shutdown()

type Poolable

type Poolable interface {
	Name() string
	Shutdown()
}

Jump to

Keyboard shortcuts

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