libwait

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForMigrationToDisappearWithTimeout

func WaitForMigrationToDisappearWithTimeout(migration *v1.VirtualMachineInstanceMigration, seconds int)

WaitForMigrationToDisappearWithTimeout blocks for the passed seconds until the specified VirtualMachineInstanceMigration disappears

func WaitForSuccessfulVMIStart

func WaitForSuccessfulVMIStart(vmi *v1.VirtualMachineInstance) *v1.VirtualMachineInstance

WaitForSuccessfulVMIStart blocks until the specified VirtualMachineInstance reaches the Running state

func WaitForSuccessfulVMIStartIgnoreWarnings

func WaitForSuccessfulVMIStartIgnoreWarnings(vmi *v1.VirtualMachineInstance) *v1.VirtualMachineInstance

WaitForSuccessfulVMIStartIgnoreWarnings blocks until the specified VirtualMachineInstance reaches the Running state ignoring the warnings

func WaitForSuccessfulVMIStartWithTimeout

func WaitForSuccessfulVMIStartWithTimeout(vmi *v1.VirtualMachineInstance, seconds int) *v1.VirtualMachineInstance

WaitForSuccessfulVMIStartWithTimeout blocks for the passed seconds until the specified VirtualMachineInstance reaches the Running state

func WaitForSuccessfulVMIStartWithTimeoutIgnoreSelectedWarnings added in v1.0.0

func WaitForSuccessfulVMIStartWithTimeoutIgnoreSelectedWarnings(vmi *v1.VirtualMachineInstance, seconds int, warningsIgnoreList []string) *v1.VirtualMachineInstance

WaitForSuccessfulVMIStartWithTimeoutIgnoreSelectedWarnings blocks for the passed seconds until the specified VirtualMachineInstance reaches the Running state, ignoring the warning list passed

func WaitForSuccessfulVMIStartWithTimeoutIgnoreWarnings

func WaitForSuccessfulVMIStartWithTimeoutIgnoreWarnings(vmi *v1.VirtualMachineInstance, seconds int) *v1.VirtualMachineInstance

WaitForSuccessfulVMIStartWithTimeoutIgnoreWarnings blocks for the passed seconds until the specified VirtualMachineInstance reaches the Running state, ignoring all the warnings

func WaitForVMIPhase added in v1.0.0

WaitForVMIPhase blocks until the specified VirtualMachineInstance reaches any of the phases. By default, the waiting will fail if a warning is captured and a default timeout will be used. These properties can be customized using With* options. If no context is provided, a new one will be created.

func WaitForVMIScheduling

func WaitForVMIScheduling(vmi *v1.VirtualMachineInstance, seconds int, wp watcher.WarningsPolicy) *v1.VirtualMachineInstance

WaitForVMIScheduling blocks until the specified VirtualMachineInstance scheduled and return the target node name.

func WaitForVMIStartOrFailed

func WaitForVMIStartOrFailed(vmi *v1.VirtualMachineInstance, seconds int, wp watcher.WarningsPolicy) *v1.VirtualMachineInstance

WaitForVMIStartOrFailed blocks until the specified VirtualMachineInstance reaches either Failed or Running states

func WaitForVirtualMachineToDisappearWithTimeout

func WaitForVirtualMachineToDisappearWithTimeout(vmi *v1.VirtualMachineInstance, seconds int)

WaitForVirtualMachineToDisappearWithTimeout blocks for the passed seconds until the specified VirtualMachineInstance disappears

func WaitUntilVMIReady

WaitUntilVMIReady blocks until the specified VirtualMachineInstance reaches the Running state and the login succeed

func WaitUntilVMIReadyIgnoreSelectedWarnings

func WaitUntilVMIReadyIgnoreSelectedWarnings(vmi *v1.VirtualMachineInstance, loginTo console.LoginToFunction, warningsIgnoreList []string) *v1.VirtualMachineInstance

WaitUntilVMIReadyIgnoreSelectedWarnings blocks until the specified VirtualMachineInstance reaches the Running state and the login succeed, ignoring the warning list passed

Types

type Option added in v1.0.0

type Option func(waiting *Waiting)

Option represents an action that enables an option.

func WithContext added in v1.0.0

func WithContext(ctx context.Context) Option

WithContext adds a specific context to the waiting struct

func WithFailOnWarnings added in v1.0.0

func WithFailOnWarnings(failOnWarnings bool) Option

WithFailOnWarnings sets if the waiting should fail on warning or not

func WithTimeout added in v1.0.0

func WithTimeout(seconds int) Option

WithTimeout adds a specific timeout to the waiting struct

func WithWaitForFail added in v1.0.0

func WithWaitForFail(waitForFail bool) Option

WithWaitForFail adds the specific waitForFail to the waiting struct

func WithWarningsIgnoreList added in v1.0.0

func WithWarningsIgnoreList(warningIgnoreList []string) Option

WithWarningsIgnoreList sets the warnings that will be ignored during the waiting for phase This option will be ignored if a warning policy has been set before and the failOnWarnings is false If no warning policy has been set before, a new one will be set implicitly with fail on warnings enabled and the ignore list added

func WithWarningsPolicy added in v1.0.0

func WithWarningsPolicy(wp *watcher.WarningsPolicy) Option

WithWarningsPolicy adds a specific warningPolicy to the waiting struct

type Waiting added in v1.0.0

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

Waiting represents the waiting struct.

Jump to

Keyboard shortcuts

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