Documentation ¶
Overview ¶
Package poll defines polling mechanisms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAborted = errors.New("aborted")
Functions ¶
This section is empty.
Types ¶
type Poller ¶
type Poller interface { // Polls until "check" function returns "done=true". // If "check" returns a non-empty error, it logs and // continues the polling until context is canceled. // It returns the duration that it took to complete the check. Poll( ctx context.Context, check func() (done bool, err error), ) (time.Duration, error) }
Click to show internal directories.
Click to hide internal directories.