Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTooManyActiveFlows = errors.New("too many active flows")
)
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter interface {
// Acquire tries to acquire a free slot for a flow, if the value of flows is already above
// the maximum it returns ErrTooManyActiveFlows.
Acquire(flowType string) error
// Release releases a slot for a flow.
Release()
// SetLimit allows to hot swap the limit value of the limiter.
SetLimit(uint64)
}
func NewLimiter ¶
Click to show internal directories.
Click to hide internal directories.