backend

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSnapshotGenerationMismatch = errors.New("ErrSnapshotGenerationMismatch")
)

Functions

func CloneSnapshot

func CloneSnapshot(snap *deploy.Snapshot) *deploy.Snapshot

CloneSnapshot makes a deep copy of the given snapshot and returns a pointer to the clone.

func NewDefaultBackend

func NewDefaultBackend(snapshotter SnapshotStorage, secretsManager secrets.Manager, project *workspace.Project) *defaultBackend

NewDefaultBackend creates a backend that stores state into Kubernetes secrets.

func NewSecretSnapshotter

func NewSecretSnapshotter(client client.Client, secretsManager secrets.Manager) *secretSnapshotter

NewSecretSnapshotter provides an implementation of snapshot storage based on Kubernetes secrets. The snapshotter uses the given secrets manager to encrypt/decrypt state values.

Types

type Backend

type Backend interface {
	// ParseStackReference takes a string representation and parses it to a reference which may be used for other
	// methods in this backend.
	ParseStackReference(s string) (StackReference, error)

	// LoadStack obtains a stack interface for execution purposes.
	LoadStack(ctx context.Context, pluginCtx plugin.Context, project *workspace.Project, obj client.Object) (Stack, error)
}

Backend defines an interface for executing stacks against a particular state backend.

type DestroyOpts

type DestroyOpts struct {
	DryRun       bool
	Config       config.Map
	EventHandler UpdateEventHandler
}

type RefreshOpts

type RefreshOpts struct {
	DryRun       bool
	Config       config.Map
	EventHandler UpdateEventHandler
}

type SnapshotHandle

type SnapshotHandle interface {
	GetObjectGeneration() int64
}

SnapshotHandle is an opaque representation of a handle to a specific snapshot.

type SnapshotStorage

type SnapshotStorage interface {
	deploy.BackendClient

	// GetSnapshot gets the latest snapshot for the given object.
	GetSnapshot(ctx context.Context, obj client.Object) (*deploy.Snapshot, SnapshotHandle, error)

	// SetSnapshot sets the snapshot for the given object.
	SetSnapshot(ctx context.Context, obj client.Object, snapshot *deploy.Snapshot, handle SnapshotHandle) (SnapshotHandle, error)
}

SnapshotStorage is an interface to snapshot storage. Also implements BackendClient to provide information (e.g. stack outputs) about stacks from a backend.

type Stack

Stack is used to manage stacks of resources against a backend.

type StackReference

type StackReference pulumibackend.StackReference

type UpdateEventHandler

type UpdateEventHandler interface {
	EngineEvent(ctx context.Context, event engine.Event)
}

type UpdateOpts

type UpdateOpts struct {
	DryRun       bool
	Config       config.Map
	EventHandler UpdateEventHandler
}

Jump to

Keyboard shortcuts

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