worker

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 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 struct {
	// contains filtered or unexported fields
}

Pool is a lightweight concurrency limiter around a semaphore.

func NewPool

func NewPool(cfg config.WorkerConfig) *Pool

NewPool creates a new pool from configuration.

func (*Pool) Acquire

func (p *Pool) Acquire(ctx context.Context) error

Acquire obtains capacity failing fast when context is done.

func (*Pool) Release

func (p *Pool) Release()

Release frees a previously acquired slot.

Jump to

Keyboard shortcuts

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