Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cirello-io/oversight

Erlang-like supervisor trees
https://github.com/cirello-io/oversight

erlang go golang oversight supervisor

Last synced: 27 days ago
JSON representation

Erlang-like supervisor trees

Awesome Lists containing this project

README

        

# cirello.io/oversight

[![Go Reference](https://pkg.go.dev/badge/cirello.io/oversight.svg)](https://pkg.go.dev/cirello.io/oversight)

Package oversight makes a complete implementation of the Erlang supervision
trees.

Refer to: http://erlang.org/doc/design_principles/sup_princ.html

go get [-u -f] cirello.io/oversight

https://godoc.org/cirello.io/oversight

## Quickstart
```
supervise := oversight.New(
oversight.Processes(func(ctx context.Context) error {
select {
case <-ctx.Done():
return nil
case <-time.After(time.Second):
log.Println(1)
}
return nil
}),
)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()
if err := supervise.Start(ctx); err != nil {
log.Fatal(err)
}
```