readiness

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUnrecoverableError

func NewUnrecoverableError(err error) error

NewUnrecoverableError creates an Error object that is not recoverable

func ReadSmallFile

func ReadSmallFile(filename string, tries int) (string, error)

ReadSmallFile polls attempting to read a small file and returns its entire contents

func Repeat

func Repeat(attempts int, interval time.Duration, f func() error) error

Repeat repeatedly calls func until it returns without a recoverable error or attempts are exhausted. attempts = -1 to try forever. interval is the delay between attempts.

Types

type UnrecoverableError

type UnrecoverableError struct {
	// contains filtered or unexported fields
}

func (*UnrecoverableError) Error

func (e *UnrecoverableError) Error() string

func (*UnrecoverableError) Unwrap

func (e *UnrecoverableError) Unwrap() error

Jump to

Keyboard shortcuts

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