Ecosyste.ms: Packages

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

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/reiver/go-toil

Package toil provides simple functionality for managing toilers (i.e., workers). To use, create one or more types that implement the toil.Toiler interface. For example: Then create a toil.Group. For example: Then register one of more toilers (i.e., types that implement the toil.Toiler interface) with the toiler group. For example: Then, you can call the Toil method of the toiler group in place like main(). For example: A toiler's Toil method can finish in one of two ways. Either it will return gracefully, or it will panic(). The toiler group is OK with either. But also, the toiler group provides the toiler with a convenient way of being notified of each case. If a toiler also has a Terminated() method, then the toiler group will call the toiler's Terminated() method when the toiler's Toil() method has returned gracefully. For example: If a toiler also has a PanickedNotice() method, then the toiler group will call the toiler's PanickedNotice() method when the toiler's Toil() method has panic()ed. For example: And of course, a toiler can take advantage of both of these notifications and have both a PanickedNotice() and Terminated() method. For example:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/reiver/go-toil
License: MIT
Latest release: over 7 years ago
First release: over 7 years ago
Namespace: github.com/reiver
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 11 days ago

    Loading...
    Readme
    Loading...