Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
contract.PoolOperator
}
func NewClient ¶
func NewClient(opts ClientOptions) Client
type ClientOption ¶ added in v0.1.6
type ClientOption func(*ClientOptions)
func WithConcurrency ¶
func WithConcurrency(x int) ClientOption
type ClientOptions ¶ added in v0.1.6
type ClientOptions struct {
Concurrency int
}
func ApplyClientOptions ¶ added in v0.1.6
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶ added in v0.1.11
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) Acquire ¶ added in v0.1.11
func (d *DefaultTool) Acquire(ctx context.Context) error
Acquire reserves a worker slot in the pool.
func (*DefaultTool) ActiveWorkers ¶ added in v0.1.11
func (d *DefaultTool) ActiveWorkers(ctx context.Context) (int, error)
ActiveWorkers returns the number of currently active workers.
func (*DefaultTool) Release ¶ added in v0.1.11
func (d *DefaultTool) Release(ctx context.Context) error
Release frees a worker slot in the pool.
Click to show internal directories.
Click to hide internal directories.