Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 6.4% on proxy.golang.org
Top 2.5% dependent packages on proxy.golang.org
Top 2.1% dependent repos on proxy.golang.org
Top 9.0% forks on proxy.golang.org

proxy.golang.org : github.com/puppetlabs/leg/scheduler

Package scheduler provides a managed API to Goroutines using Lifecycles. The most basic type of management is using the Schedulable interface with a Scheduler: Schedulers terminate when all of their children exit. You can choose from three canned error behaviors for most lifecycles: ErrorBehaviorDrop, ErrorBehaviorCollect, and ErrorBehaviorTerminate. ErrorBehaviorDrop ignores errors, allowing the lifecycle to continue executing normally. ErrorBehaviorCollect stores all errors returned (potentially allowing for unbounded memory growth, so use with discretion) and provides them when the lifecycle completes. ErrorBehaviorTerminate causes the lifecycle to close as soon as it receives an error. You may implement your own error behaviors by conforming to the ErrorBehavior interface. If you have a few lifecycles that are parameterized differently and you want to manage them together, the Parent lifecycle aggregates them and runs them in parallel. This package also provides a more sophisticated lifecycle, Segment. A Segment provides a worker pool and a mechanism for dispatching work. Dispatchers implement the Descriptor interface and work items implement the Process interface. The example above could equivalently be written as follows: Descriptors are particularly useful when asynchronously waiting on events from external APIs for processing.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/puppetlabs/leg/scheduler
Keywords: relay
License: Apache-2.0
Latest release: almost 3 years ago
First release: over 3 years ago
Namespace: github.com/puppetlabs/leg
Dependent packages: 5
Dependent repositories: 6
Stars: 6 on GitHub
Forks: 4 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago

    Loading...
    Readme
    Loading...