component

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployWaiter

type DeployWaiter interface {
	Deployer
	Waiter
}

DeployWaiter controls and waits for life-cycle operations of a component.

func NoOp

func NoOp() DeployWaiter

NoOp does nothing

func OpDestroy

func OpDestroy(dw ...DeployWaiter) DeployWaiter

OpDestroy creates a DeployWaiter which calls Destroy instead of create and WaitCleanup instead of Wait

type Deployer

type Deployer interface {
	// Deploy a component.
	Deploy(ctx context.Context) error
	// Destroy already deployed component.
	Destroy(ctx context.Context) error
}

Deployer is used to control the life-cycle of a component.

func OpDestroyAndWait

func OpDestroyAndWait(dw ...DeployWaiter) Deployer

OpDestroyAndWait creates a Deployer which calls Destroy instead of create and waits for destruction.

func OpWaiter

func OpWaiter(dw ...DeployWaiter) Deployer

OpWaiter creates a Deployer which calls waits for each operation.

type Waiter

type Waiter interface {
	// Wait for deployment to finish and component to report ready.
	Wait(ctx context.Context) error
	// WaitCleanup for destruction to finish and component to be fully removed.
	WaitCleanup(ctx context.Context) error
}

Waiter waits for life-cycle operations of a component to finish.

Directories

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

Jump to

Keyboard shortcuts

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