pool

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *defaultTool

Types

type Client

type Client interface {
	Acquire()
	Release()
	ActiveWorkers() int
	WaitAll()
	Shutdown()
}

func NewClient

func NewClient(opts PoolOptions) Client

type PoolOption

type PoolOption func(*PoolOptions)

func WithConcurrency

func WithConcurrency(n int) PoolOption

type PoolOptions

type PoolOptions struct {
	Concurrency int
}

func ApplyPoolOptions

func ApplyPoolOptions(opts *PoolOptions, modifiers ...PoolOption) PoolOptions

Jump to

Keyboard shortcuts

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