wait

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	InstanceStateEmpty       = ""
	InstanceStateProgressing = "Progressing"
	InstanceStateSuccess     = "Ready"
	InstanceStateFailed      = "Failure"
	InstanceStateDeleted     = "Deleted"
)

Variables

This section is empty.

Functions

func CreateInstanceWaitHandler

func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[postgresflex.InstanceResponse]

CreateInstanceWaitHandler will wait for instance creation

func DeleteInstanceWaitHandler

func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[struct{}]

DeleteInstanceWaitHandler will wait for instance deletion

func DeleteUserWaitHandler

func DeleteUserWaitHandler(ctx context.Context, a APIClientUserInterface, projectId, instanceId, userId string) *wait.AsyncActionHandler[struct{}]

DeleteUserWaitHandler will wait for delete

func ForceDeleteInstanceWaitHandler added in v0.12.0

func ForceDeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[struct{}]

ForceDeleteInstanceWaitHandler will wait for instance deletion

func PartialUpdateInstanceWaitHandler

func PartialUpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[postgresflex.InstanceResponse]

PartialUpdateInstanceWaitHandler will wait for instance update

Types

type APIClientInstanceInterface

type APIClientInstanceInterface interface {
	GetInstanceExecute(ctx context.Context, projectId, instanceId string) (*postgresflex.InstanceResponse, error)
	ListUsersExecute(ctx context.Context, projectId string, instanceId string) (*postgresflex.ListUsersResponse, error)
}

Interface needed for tests

type APIClientUserInterface

type APIClientUserInterface interface {
	GetUserExecute(ctx context.Context, projectId, instanceId, userId string) (*postgresflex.GetUserResponse, error)
}

Interface needed for tests

Jump to

Keyboard shortcuts

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