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

https://github.com/galihrivanto/runner

a simple wrapper for running operation
https://github.com/galihrivanto/runner

exponential-backoff process-wrapper

Last synced: 5 months ago
JSON representation

a simple wrapper for running operation

Awesome Lists containing this project

README

          


runner



[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/galihrivanto/runner)

**Runner** provides simple wrapper for operation which may fails, thus can be retried.
It handle common OS signals which indicate program being interupted, closed etc.

simple usage:
```go
ctx, cancel := context.WithCancel(context.Background())

runner.RunWithRetry(func(mctx context.Context) error {
...
})
.Handle(func(sig os.Signal){
cancel()
})

```

# license
[MIT](https://choosealicense.com/licenses/mit/)