Documentation ¶
Index ¶
- Variables
- func CloneSnapshot(snap *deploy.Snapshot) *deploy.Snapshot
- func NewDefaultBackend(snapshotter SnapshotStorage, secretsManager secrets.Manager, ...) *defaultBackend
- func NewSecretSnapshotter(client client.Client, secretsManager secrets.Manager) *secretSnapshotter
- type Backend
- type DestroyOpts
- type RefreshOpts
- type SnapshotHandle
- type SnapshotStorage
- type Stack
- type StackReference
- type UpdateEventHandler
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
var (
ErrSnapshotGenerationMismatch = errors.New("ErrSnapshotGenerationMismatch")
)
Functions ¶
func CloneSnapshot ¶
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 ¶
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 ¶
type Stack interface { io.Closer Refresh(ctx context.Context, opts RefreshOpts) (engine.ResourceChanges, result.Result) Update(ctx context.Context, opts UpdateOpts) (engine.ResourceChanges, result.Result) Destroy(ctx context.Context, opts DestroyOpts) (engine.ResourceChanges, result.Result) }
Stack is used to manage stacks of resources against a backend.
type StackReference ¶
type StackReference pulumibackend.StackReference
type UpdateEventHandler ¶
type UpdateOpts ¶
type UpdateOpts struct { DryRun bool Config config.Map EventHandler UpdateEventHandler }