async

package
v1.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResource

func CreateResource(ctx context.Context, scope FutureScope, client Creator, spec azure.ResourceSpecGetter, serviceName string) error

CreateResource implements the logic for creating a resource Asynchronously.

func DeleteResource

func DeleteResource(ctx context.Context, scope FutureScope, client Deleter, spec azure.ResourceSpecGetter, serviceName string) error

DeleteResource implements the logic for deleting a resource Asynchronously.

Types

type Creator

type Creator interface {
	FutureHandler
	CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter) (azureautorest.FutureAPI, error)
}

Creator is a client that can create or update a resource asynchronously.

type Deleter

type Deleter interface {
	FutureHandler
	DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter) (azureautorest.FutureAPI, error)
}

Deleter is a client that can delete a resource asynchronously.

type FutureHandler

type FutureHandler interface {
	// IsDone returns true if the operation is complete.
	IsDone(ctx context.Context, future azureautorest.FutureAPI) (bool, error)
}

FutureHandler is a client that can check on the progress of a future.

type FutureScope

type FutureScope interface {
	logr.Logger
	azure.AsyncStatusUpdater
}

FutureScope is a scope that can perform store futures and conditions in Status.

Directories

Path Synopsis
Package mock_async is a generated GoMock package.
Package mock_async is a generated GoMock package.

Jump to

Keyboard shortcuts

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