safe

package
v2.8.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(f func())

func DoWithError

func DoWithError(f func() error) (err error)

func Try

func Try(ctx context.Context, maxSleep uint, fn func() error) <-chan error

WithCancel try to do fn until context will cancel or fn return nil and will sleep in (logarithmic) duration of unit (millisecond, second,etc) and not more than unit * maxSleep. The return channel stream's fn error in each iteration and can be use for blocking or/and if needed

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL