internal

package
v4.0.0-...-d440f53 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCondition

func WithCondition(c condition.Satisfier) awaiterOption

WithCondition sets the condition.Satisfier used by the Awaiter. This is required and determines when Await can conclude.

func WithLogger

func WithLogger(l logger) awaiterOption

WithLogger uses the provided logger. If not provided stdout is used.

func WithNamespace

func WithNamespace(ns string) awaiterOption

WithNamespace configures the namespace used by Informers spawned by the Awaiter.

func WithObservers

func WithObservers(obs ...condition.Observer) awaiterOption

WithObservers attaches optional condition.Observers to the Awaiter. This enables reporting informational messages while waiting for the condition to be met.

Types

type Awaiter

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

Awaiter orchestrates a condition Satisfier and optional Observers.

func NewAwaiter

func NewAwaiter(options ...awaiterOption) (*Awaiter, error)

NewAwaiter creates a new Awaiter with the given options.

func (*Awaiter) Await

func (aw *Awaiter) Await(ctx context.Context) error

Await blocks until the Condition is met or until the context is canceled. The operation's timeout should be applied to the provided Context.

Jump to

Keyboard shortcuts

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