Documentation ¶
Overview ¶
Package throttle includes throttlers for composing in various contexts, such as inside Mounts for costly operations, and within the DAG store itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Throttler ¶
type Throttler interface { // Do performs the supplied action under the guard of the throttler. // // The supplied context is obeyed when parking to claim a throttler spot, and is // passed to the action. Errors from the action are propagated to the caller, // as are context deadline errors. // // Do blocks until the action has executed. Do(context.Context, func(ctx context.Context) error) error }
Throttler is a component to perform throttling of concurrent requests.
Click to show internal directories.
Click to hide internal directories.