Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cirello-io/oversight
- Owner: cirello-io
- License: apache-2.0
- Created: 2018-11-09T14:46:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-07T02:56:46.000Z (4 months ago)
- Last Synced: 2024-09-30T03:42:10.438Z (about 1 month ago)
- Topics: erlang, go, golang, oversight, supervisor
- Language: Go
- Homepage: https://cirello.io/oversight
- Size: 173 KB
- Stars: 29
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - cirello-io/oversight - Erlang-like supervisor trees (Go)
- awesome-go-extra - oversight - like supervisor trees|28|5|0|2018-11-09T14:46:48Z|2022-01-17T06:16:42Z| (Goroutines / Advanced Console UIs)
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)
}
```