kubernetes/staging/src/k8s.io/apimachinery/pkg/util/wait/error.go

var ErrWaitTimeout

// Interrupted returns true if the error indicates a Poll, ExponentialBackoff, or
// Until loop exited for any reason besides the condition returning true or an
// error. A loop is considered interrupted if the calling context is cancelled,
// the context reaches its deadline, or a backoff reaches its maximum allowed
// steps.
//
// Callers should use this method instead of comparing the error value directly to
// ErrWaitTimeout, as methods that cancel a context may not return that error.
//
// Instead of:
//
//	err := wait.Poll(...)
//	if err == wait.ErrWaitTimeout {
//	    log.Infof("Wait for operation exceeded")
//	} else ...
//
// Use:
//
//	err := wait.Poll(...)
//	if wait.Interrupted(err) {
//	    log.Infof("Wait for operation exceeded")
//	} else ...
func Interrupted(err error) bool {}

type errInterrupted

// ErrorInterrupted returns an error that indicates the wait was ended
// early for a given reason. If no cause is provided a generic error
// will be used but callers are encouraged to provide a real cause for
// clarity in debugging.
func ErrorInterrupted(cause error) error {}

var errWaitTimeout

func (e errInterrupted) Unwrap() error        {}

func (e errInterrupted) Is(target error) bool {}

func (e errInterrupted) Error() string {}