wait

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInstanceNotFound        = errors.New("instance not found")
	ErrInstanceStatusUndefined = errors.New("instance status undefined")
	ErrInstanceCreationFailed  = errors.New("instance creation failed")
	ErrInstanceIsBeingDeleted  = errors.New("instance is being deleted")
)

Functions

func CreateOrUpdateInstanceByNameWaitHandler

func CreateOrUpdateInstanceByNameWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, displayName string) *wait.AsyncActionHandler[edge.Instance]

CreateOrUpdateInstanceByNameWaitHandler waits for instance creation or update by name to complete.

func CreateOrUpdateInstanceWaitHandler

func CreateOrUpdateInstanceWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, instanceId string) *wait.AsyncActionHandler[edge.Instance]

CreateOrUpdateInstanceWaitHandler waits for instance creation or update by ID to complete.

func DeleteInstanceByNameWaitHandler

func DeleteInstanceByNameWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, displayName string) *wait.AsyncActionHandler[edge.Instance]

DeleteInstanceByNameWaitHandler waits for instance deletion by name.

func DeleteInstanceWaitHandler

func DeleteInstanceWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, instanceId string) *wait.AsyncActionHandler[edge.Instance]

DeleteInstanceWaitHandler waits for instance deletion by ID.

func KubeconfigByInstanceNameWaitHandler

func KubeconfigByInstanceNameWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, displayName string, expirationSeconds *int64) *wait.AsyncActionHandler[edge.Kubeconfig]

KubeconfigByInstanceNameWaitHandler waits the instance to become ready before retrieving the kubeconfig by instance displayName.

func KubeconfigWaitHandler

func KubeconfigWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, instanceId string, expirationSeconds *int64) *wait.AsyncActionHandler[edge.Kubeconfig]

KubeconfigWaitHandler waits the instance to become ready before retrieving the kubeconfig by instance ID.

func TokenByInstanceNameWaitHandler

func TokenByInstanceNameWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, displayName string, expirationSeconds *int64) *wait.AsyncActionHandler[edge.Token]

TokenByInstanceNameWaitHandler waits for the instance to become ready before retrieving the service token by instance displayName.

func TokenWaitHandler

func TokenWaitHandler(ctx context.Context, a EdgeCloudApiClient, projectId, regionId, instanceId string, expirationSeconds *int64) *wait.AsyncActionHandler[edge.Token]

TokenWaitHandler waits for the instance to become ready before retrieving the service token by instance ID.

Types

type EdgeCloudApiClient

type EdgeCloudApiClient interface {
	GetInstanceExecute(ctx context.Context, projectId, regionId, instanceId string) (*edge.Instance, error)
	GetInstanceByNameExecute(ctx context.Context, projectId, regionId, displayName string) (*edge.Instance, error)
	GetTokenByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) edge.ApiGetTokenByInstanceIdRequest
	GetTokenByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) edge.ApiGetTokenByInstanceNameRequest
	GetKubeconfigByInstanceId(ctx context.Context, projectId string, regionId string, instanceId string) edge.ApiGetKubeconfigByInstanceIdRequest
	GetKubeconfigByInstanceName(ctx context.Context, projectId string, regionId string, displayName string) edge.ApiGetKubeconfigByInstanceNameRequest
}

EdgeCloudApiClient is the interface for Edge Cloud API calls which require a waiter.

Jump to

Keyboard shortcuts

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