Documentation ¶
Index ¶
- func CloseWithErrCapture(logger log.Logger, err *error, closer io.Closer, format string, ...)
- func CloseWithLogOnErr(logger log.Logger, closer io.Closer, format string, a ...interface{})
- func Repeat(interval time.Duration, stopc <-chan struct{}, f func() error) error
- func Retry(interval time.Duration, stopc <-chan struct{}, f func() error) error
- func RetryWithLog(logger log.Logger, interval time.Duration, stopc <-chan struct{}, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseWithErrCapture ¶
func CloseWithErrCapture(logger log.Logger, err *error, closer io.Closer, format string, a ...interface{})
CloseWithErrCapture runs function and on error tries to return error by argument. If error is already there we assume that error has higher priority and we just log the function error.
func CloseWithLogOnErr ¶
CloseWithLogOnErr is making sure we log every error, even those from best effort tiny closers.
func Repeat ¶
Repeat executes f every interval seconds until stopc is closed. It executes f once right after being called.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.