wait

package
v1.16.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRemoteClusterDisconnected is the error returned by wait for sync
	// operations if the remote cluster is disconnected while still waiting.
	ErrRemoteClusterDisconnected = errors.New("remote cluster disconnected")
)

Functions

func ForAll added in v1.16.0

func ForAll(ctx context.Context, waiters []Fn) error

ForAll returns after the all of the provided waiters have been executed.

Types

type Fn added in v1.16.0

type Fn func(ctx context.Context) error

Fn is the type of a function to wait for the initial synchronization of a given resource type from all remote clusters.

type SyncedCommon added in v1.16.0

type SyncedCommon struct {
	// contains filtered or unexported fields
}

SyncedCommon contains common fields and methods used for tracking the synchronization status of a remote cluster.

func NewSyncedCommon added in v1.16.0

func NewSyncedCommon() SyncedCommon

NewSyncedCommon returns a new SyncedCommon instance.

func (*SyncedCommon) Stop added in v1.16.0

func (sc *SyncedCommon) Stop()

func (*SyncedCommon) Wait added in v1.16.0

func (sc *SyncedCommon) Wait(ctx context.Context, chs ...<-chan struct{}) error

Wait returns after all of the given channels have been closed, the remote cluster has been disconnected, or the given context has been cancelled.

Jump to

Keyboard shortcuts

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