waiter

package
v0.171.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateFailedError

type UpdateFailedError struct {
	Status      string
	UpdateError string
}

func (*UpdateFailedError) Error

func (u *UpdateFailedError) Error() string

type UpdateWaiter

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

func NewUpdateWaiter

func NewUpdateWaiter(client awsapi.EKS, optFns ...func(options *UpdateWaiterOptions)) *UpdateWaiter

NewUpdateWaiter constructs an UpdateWaiter. It provides an interface similar to the waiter types in the AWS SDK.

func (*UpdateWaiter) Wait

func (w *UpdateWaiter) Wait(ctx context.Context, params *eks.DescribeUpdateInput, maxWaitDur time.Duration, optFns ...func(waiter *UpdateWaiterOptions)) error

Wait calls the waiter function for UpdateWaiter waiter. The maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is required and must be greater than zero.

func (*UpdateWaiter) WaitForOutput

func (w *UpdateWaiter) WaitForOutput(ctx context.Context, params *eks.DescribeUpdateInput, maxWaitDur time.Duration, optFns ...func(options *UpdateWaiterOptions)) (*eks.DescribeUpdateOutput, error)

WaitForOutput calls the waiter function for UpdateWaiter waiter and returns the output of the successful operation. The maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is required and must be greater than zero.

type UpdateWaiterOptions

type UpdateWaiterOptions struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behaviour.
	APIOptions []func(*middleware.Stack) error

	// MinDelay is the minimum amount of time to delay between retries. If unset,
	// NodegroupDeletedWaiter will use default minimum delay of 30 seconds. Note that
	// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
	MinDelay time.Duration

	// MaxDelay is the maximum amount of time to delay between retries. If unset or set
	// to zero, NodegroupDeletedWaiter will use default max delay of 120 seconds. Note
	// that MaxDelay must resolve to value greater than or equal to the MinDelay.
	MaxDelay time.Duration

	// RetryAttemptLogMessage is the message to log before attempting the next request.
	RetryAttemptLogMessage string

	// Retryable is function that can be used to override the service defined
	// waiter-behavior based on operation output, or returned error. This function is
	// used by the waiter to decide if a state is retryable or a terminal state. By
	// default service-modeled logic will populate this option. This option can thus be
	// used to define a custom waiter state with fall-back to service-modeled waiter
	// state mutators.The function returns an error in case of a failure state. In case
	// of retry state, this function returns a bool value of true and nil error, while
	// in case of success it returns a bool value of false and nil error.
	Retryable func(context.Context, *eks.DescribeUpdateInput, *eks.DescribeUpdateOutput, error) (bool, error)
}

Jump to

Keyboard shortcuts

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