Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handle ¶
type Handle interface { // Get attempts to acquire a Resource. It will return nil and false if // the handle is already Done or if the context is canceled before the // resource is acquired. It should not be called concurrently with Done. Get(context.Context) (Resource, bool) // Done signals that no more resources should be acquired with Get, and // it waits for existing resources to be done. It should not be called // concurrently with Get. Done() }
Handle is the interface describing acquired handles from a scheduler.
type Options ¶
type Options struct { MaximumConcurrent int // number of maximum concurrent resources MaximumConcurrentHandles int // number of maximum concurrent handles }
Options controls the parameters of the Scheduler.
type Resource ¶
type Resource interface { // Done signals that the resource is no longer in use and must be called // exactly once. Done() }
Resource is the interface describing acquired resources from a scheduler.
Click to show internal directories.
Click to hide internal directories.