Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 644 Bytes

readme.md

File metadata and controls

25 lines (18 loc) · 644 Bytes

runner

go.dev reference

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:

ctx, cancel := context.WithCancel(context.Background())

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

license

MIT