pool

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 3 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[T any, K comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T any, K comparable](new func(key K) Runner[T]) *Pool[T, K]

func (*Pool[T, K]) Close

func (p *Pool[T, K]) Close() error

func (*Pool[T, K]) Get

func (p *Pool[T, K]) Get(key K) Runner[T]

func (*Pool[T, K]) Keys

func (p *Pool[T, K]) Keys() []K

func (*Pool[T, K]) LastWrite added in v1.3.0

func (p *Pool[T, K]) LastWrite(key K) time.Time

func (*Pool[T, K]) Remove

func (p *Pool[T, K]) Remove(key K)

type Runner

type Runner[T any] interface {
	Run()
	Push(t T)
	Close() error
}

Jump to

Keyboard shortcuts

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