filestate

package
v2.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

Package filestate implements the logic for interacting with a filestate backend such as AWS S3, Azure blob storage, or GCP cloud storage.

Index

Constants

View Source
const DisableCheckpointBackupsEnvVar = "PULUMI_DISABLE_CHECKPOINT_BACKUPS"
View Source
const FilePathPrefix = "file://"
View Source
const PulumiFilestateLockingEnvVar = "PULUMI_SELF_MANAGED_STATE_LOCKING"

PulumiFilestateLockingEnvVar is an env var that must be truthy to enable locking when using a filestate backend.

Variables

View Source
var DisableIntegrityChecking bool

DisableIntegrityChecking can be set to true to disable checkpoint state integrity verification. This is not recommended, because it could mean proceeding even in the face of a corrupted checkpoint state file, but can be used as a last resort when a command absolutely must be run.

Functions

func GetLogsForTarget

func GetLogsForTarget(target *deploy.Target, query operations.LogQuery) ([]operations.LogEntry, error)

GetLogsForTarget fetches stack logs using the config, decrypter, and checkpoint in the given target.

func GoogleCredentialsMux

func GoogleCredentialsMux(ctx context.Context) (*blob.URLMux, error)

func IsFileStateBackendURL

func IsFileStateBackendURL(urlstr string) bool

Types

type Backend

type Backend interface {
	backend.Backend
	// contains filtered or unexported methods
}

Backend extends the base backend interface with specific information about local backends.

func Login

func Login(d diag.Sink, url string) (Backend, error)

func New

func New(d diag.Sink, originalURL string) (Backend, error)

type Bucket

type Bucket interface {
	Copy(ctx context.Context, dstKey, srcKey string, opts *blob.CopyOptions) (err error)
	Delete(ctx context.Context, key string) (err error)
	List(opts *blob.ListOptions) *blob.ListIterator
	SignedURL(ctx context.Context, key string, opts *blob.SignedURLOptions) (string, error)
	ReadAll(ctx context.Context, key string) (_ []byte, err error)
	WriteAll(ctx context.Context, key string, p []byte, opts *blob.WriterOptions) (err error)
	Exists(ctx context.Context, key string) (bool, error)
}

Bucket is a wrapper around an underlying gocloud blob.Bucket. It ensures that we pass all paths to it normalized to forward-slash form like it requires.

type GoogleCredentials

type GoogleCredentials struct {
	PrivateKeyID string `json:"private_key_id"`
	PrivateKey   string `json:"private_key"`
	ClientEmail  string `json:"client_email"`
	ClientID     string `json:"client_id"`
}

type Stack

type Stack interface {
	backend.Stack
	Path() string // a path to the stack's checkpoint file on disk.
}

Stack is a local stack. This simply adds some local-specific properties atop the standard backend stack interface.

Jump to

Keyboard shortcuts

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