wait

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package wait contains the functions to wait for resource events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Waiter

type Waiter struct {
	// Printer is the object used to output messages in the appropriate format.
	Printer *output.Printer
	// crClient is the controller runtime client.
	CRClient client.Client
}

Waiter is a struct that contains the necessary information to wait for resource events.

func NewWaiterFromFactory

func NewWaiterFromFactory(f *factory.Factory) *Waiter

NewWaiterFromFactory creates a new Waiter object from the given factory.

func (*Waiter) ForAuth

func (w *Waiter) ForAuth(ctx context.Context, remoteClusterID *discoveryv1alpha1.ClusterIdentity) error

ForAuth waits until the authentication has been established with the remote cluster or the timeout expires.

func (*Waiter) ForNetwork

func (w *Waiter) ForNetwork(ctx context.Context, remoteClusterID *discoveryv1alpha1.ClusterIdentity) error

ForNetwork waits until the networking has been established with the remote cluster or the timeout expires.

func (*Waiter) ForNode

func (w *Waiter) ForNode(ctx context.Context, remoteClusterID *discoveryv1alpha1.ClusterIdentity) error

ForNode waits until the node has been added to the cluster or the timeout expires.

func (*Waiter) ForOffloading

func (w *Waiter) ForOffloading(ctx context.Context, namespace string) error

ForOffloading waits until the status on the NamespaceOffloading resource states that the offloading has been successfully established or the timeout expires.

func (*Waiter) ForOutgoingPeering

func (w *Waiter) ForOutgoingPeering(ctx context.Context, remoteClusterID *discoveryv1alpha1.ClusterIdentity) error

ForOutgoingPeering waits until the status on the foreiglcusters resource states that the outgoing peering has been successfully established or the timeout expires.

func (*Waiter) ForOutgoingUnpeering

func (w *Waiter) ForOutgoingUnpeering(ctx context.Context, remoteClusterID *discoveryv1alpha1.ClusterIdentity) error

ForOutgoingUnpeering waits until the status on the foreiglcusters resource states that the outgoing peering has been successfully set to None or the timeout expires.

func (*Waiter) ForUnoffloading

func (w *Waiter) ForUnoffloading(ctx context.Context, namespace string) error

ForUnoffloading waits until the status on the NamespaceOffloading resource states that the offloading has been successfully removed or the timeout expires.

func (*Waiter) ForUnpeering

func (w *Waiter) ForUnpeering(ctx context.Context, remoteClusterID *discoveryv1alpha1.ClusterIdentity) error

ForUnpeering waits until the status on the foreiglcusters resource states that the in/outgoing peering has been successfully set to None or the timeout expires.

Jump to

Keyboard shortcuts

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