Ecosyste.ms: Packages

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

Top 1.3% on proxy.golang.org
Top 0.7% dependent packages on proxy.golang.org
Top 0.6% dependent repos on proxy.golang.org
Top 3.1% forks on proxy.golang.org
Top 0.2% docker downloads on proxy.golang.org

proxy.golang.org : github.com/thejerf/suture/v4

Package suture provides Erlang-like supervisor trees. This implements Erlang-esque supervisor trees, as adapted for Go. This is an industrial-strength, tested library deployed into hostile environments, not just a proof of concept or a toy. Supervisor Tree -> SuTree -> suture -> holds your code together when it's trying to fall apart. Why use Suture? Suture has 100% test coverage, and is golint clean. This doesn't prove it free of bugs, but it shows I care. A blog post describing the design decisions is available at http://www.jerf.org/iri/post/2930 . To idiomatically use Suture, create a Supervisor which is your top level "application" supervisor. This will often occur in your program's "main" function. Create "Service"s, which implement the Service interface. .Add() them to your Supervisor. Supervisors are also services, so you can create a tree structure here, depending on the exact combination of restarts you want to create. As a special case, when adding Supervisors to Supervisors, the "sub" supervisor will have the "super" supervisor's Log function copied. This allows you to set one log function on the "top" supervisor, and have it propagate down to all the sub-supervisors. This also allows libraries or modules to provide Supervisors without having to commit their users to a particular logging method. Finally, as what is probably the last line of your main() function, call .Serve() on your top level supervisor. This will start all the services you've defined. See the Example for an example, using a simple service that serves out incrementing integers.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/thejerf/suture/v4
License: MIT
Latest release: over 2 years ago
First release: over 3 years ago
Namespace: github.com/thejerf/suture
Dependent packages: 44
Dependent repositories: 106
Stars: 1,179 on GitHub
Forks: 64 on GitHub
Docker dependents: 32
Docker downloads: 277,958,814
See more repository details: repos.ecosyste.ms
Last synced: about 23 hours ago

    Loading...
    Readme
    Loading...