semaphore

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 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 {
	contract.Semaphore
}

func NewClient

func NewClient(opts SemaphoreOptions) Client

type SemaphoreOption

type SemaphoreOption func(*SemaphoreOptions)

func WithConcurrency

func WithConcurrency(n int) SemaphoreOption

type SemaphoreOptions

type SemaphoreOptions struct {
	Concurrency int
}

func ApplySemaphoreOptions

func ApplySemaphoreOptions(opts *SemaphoreOptions, modifiers ...SemaphoreOption) SemaphoreOptions

Jump to

Keyboard shortcuts

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