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
- Host: GitHub
- URL: https://github.com/galihrivanto/runner
- Owner: galihrivanto
- License: mit
- Created: 2019-09-05T16:43:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T01:09:23.000Z (over 5 years ago)
- Last Synced: 2025-08-15T00:49:50.328Z (10 months ago)
- Topics: exponential-backoff, process-wrapper
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
runner
[](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/)