Documentation
¶
Overview ¶
Package limiter provides configurations for controlling concurrency limit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConcurrencyConfig ¶
type ConcurrencyConfig struct {
// MaxExecutions sets a limit on the number of active executions. A number of goroutines started by execution might be greater than 1.
// A limit is enforced only when it is greater than zero.
MaxExecutions int
// GetMaxExecutions sets a limit on the number of active executions for a scope. A scope can be attached to context
// using [WithScope] function. A number of goroutines started by execution might be greater than 1.
// A limit is enforced only when it is greater than zero.
GetMaxExecutions func(scope string) int
}
ConcurrencyConfig defines how many concurrent executions are allowed globally or per-scope.
Click to show internal directories.
Click to hide internal directories.