wait

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// found by trial and error, no hard math behind, can change anytime
	DefaultPollInterval = 2 * time.Second
	DefaultPollTimeout  = 2 * time.Minute
)

Variables

This section is empty.

Functions

func AreDaemonSetPodsReady added in v0.10.0

func AreDaemonSetPodsReady(newStatus *appsv1.DaemonSetStatus) bool

func SetBaseValues added in v0.15.0

func SetBaseValues(interval, timeout time.Duration)

Types

type ObjectKey added in v0.10.0

type ObjectKey struct {
	Namespace string
	Name      string
}

func ObjectKeyFromObject added in v0.10.0

func ObjectKeyFromObject(obj metav1.Object) ObjectKey

func (ObjectKey) AsKey added in v0.10.0

func (ok ObjectKey) AsKey() types.NamespacedName

func (ObjectKey) String added in v0.10.0

func (ok ObjectKey) String() string

type Waiter added in v0.11.0

type Waiter struct {
	Cli          client.Client
	Log          logr.Logger
	PollTimeout  time.Duration
	PollInterval time.Duration
}

func With added in v0.11.0

func With(cli client.Client, log logr.Logger) *Waiter

func (Waiter) ForCRDCreated added in v0.16.0

func (wt Waiter) ForCRDCreated(ctx context.Context, name string) (*apiextensionv1.CustomResourceDefinition, error)

func (Waiter) ForCRDDeleted added in v0.16.0

func (wt Waiter) ForCRDDeleted(ctx context.Context, name string) error

func (Waiter) ForDaemonSetDeleted added in v0.11.0

func (wt Waiter) ForDaemonSetDeleted(ctx context.Context, namespace, name string) error

func (Waiter) ForDaemonSetReady added in v0.11.0

func (wt Waiter) ForDaemonSetReady(ctx context.Context, ds *appsv1.DaemonSet) (*appsv1.DaemonSet, error)

func (Waiter) ForDaemonSetReadyByKey added in v0.11.0

func (wt Waiter) ForDaemonSetReadyByKey(ctx context.Context, key ObjectKey) (*appsv1.DaemonSet, error)

func (Waiter) ForDeploymentComplete added in v0.11.0

func (wt Waiter) ForDeploymentComplete(ctx context.Context, dp *appsv1.Deployment) (*appsv1.Deployment, error)

func (Waiter) ForDeploymentCompleteByKey added in v0.11.0

func (wt Waiter) ForDeploymentCompleteByKey(ctx context.Context, key ObjectKey, replicas int32) (*appsv1.Deployment, error)

func (Waiter) ForDeploymentDeleted added in v0.11.0

func (wt Waiter) ForDeploymentDeleted(ctx context.Context, namespace, name string) error

func (Waiter) ForNamespaceDeleted added in v0.11.0

func (wt Waiter) ForNamespaceDeleted(ctx context.Context, namespace string) error

func (*Waiter) Interval added in v0.11.0

func (wt *Waiter) Interval(iv time.Duration) *Waiter

func (*Waiter) String added in v0.15.0

func (wt *Waiter) String() string

func (*Waiter) Timeout added in v0.11.0

func (wt *Waiter) Timeout(tt time.Duration) *Waiter

Jump to

Keyboard shortcuts

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