Documentation ¶
Index ¶
- Constants
- type Option
- type TypeWaitFn
- type UnknownTypeError
- type Waiter
- func (w *Waiter) WaitForCondition(ctx context.Context, object client.Object, conditionType string, ...) error
- func (w *Waiter) WaitForObject(ctx context.Context, object client.Object, waitReason string, ...) error
- func (w *Waiter) WaitForReadiness(ctx context.Context, object client.Object, opts ...Option) error
- func (w *Waiter) WaitToBeGone(ctx context.Context, object client.Object, ...) error
- type WaiterConfig
- type WithInterval
- type WithTimeout
- type WithTypeWaitFunctions
Constants ¶
View Source
const ( WaiterDefaultTimeout = 60 * time.Second WaiterDefaultInterval = time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
ApplyToWaiterConfig(c *WaiterConfig)
}
type TypeWaitFn ¶
type UnknownTypeError ¶
type UnknownTypeError struct {
GVK schema.GroupVersionKind
}
UnknownTypeError is returned when the given GroupKind is not registered.
func (*UnknownTypeError) Error ¶
func (e *UnknownTypeError) Error() string
type Waiter ¶
type Waiter struct {
// contains filtered or unexported fields
}
Waiter implements functions to block till kube objects are in a certain state.
func (*Waiter) WaitForCondition ¶
func (w *Waiter) WaitForCondition( ctx context.Context, object client.Object, conditionType string, conditionStatus metav1.ConditionStatus, opts ...Option, ) error
Waits for an object to report the given condition with given status. Takes observedGeneration into account when present on the object. observedGeneration may be reported on the condition or under .status.observedGeneration.
func (*Waiter) WaitForObject ¶
func (w *Waiter) WaitForObject( ctx context.Context, object client.Object, waitReason string, checkFn func(obj client.Object) (done bool, err error), opts ...Option, ) error
Wait for an object to match a check function.
type WaiterConfig ¶
type WaiterConfig struct { Timeout time.Duration Interval time.Duration KnownTypes map[schema.GroupVersionKind]TypeWaitFn }
type WithInterval ¶
func (WithInterval) ApplyToWaiterConfig ¶
func (i WithInterval) ApplyToWaiterConfig(c *WaiterConfig)
type WithTimeout ¶
func (WithTimeout) ApplyToWaiterConfig ¶
func (t WithTimeout) ApplyToWaiterConfig(c *WaiterConfig)
type WithTypeWaitFunctions ¶
type WithTypeWaitFunctions map[schema.GroupVersionKind]TypeWaitFn
func (WithTypeWaitFunctions) ApplyToWaiterConfig ¶
func (fn WithTypeWaitFunctions) ApplyToWaiterConfig(c *WaiterConfig)
Click to show internal directories.
Click to hide internal directories.