enginev1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 73 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthHandler

func HealthHandler(w http.ResponseWriter, r *http.Request)

func ReencryptState added in v0.9.0

func ReencryptState(
	ctx context.Context,
	config *core.Config,
	fileSystem afero.Fs,
	opts ReencryptStateOptions,
) (*statestore.ReencryptReport, error)

ReencryptState re-seals a memfile state directory under the configured key.

Covers encrypting a directory written in plaintext, moving one from a previous key to the current one, and decrypting one. Which of those happens follows from the configuration: the key under state.encryption is the target, state.encryption.previous_keys are the keys the existing objects are opened with, and Decrypt inverts the target.

Run with the engine stopped. The engine holds state in memory and persists it on write, so a pass against a live engine is liable to be overwritten by it.

func Setup

func Setup(
	router *mux.Router,
	config *core.Config,
	pluginServiceListener net.Listener,
) (io.WriteCloser, func(), error)

Setup wires up the v1 API on the given router and returns the callback that shuts everything it started back down.

The order below is the order things depend on each other in; where a step depends on its position rather than only on having run, that is noted.

Types

type ReencryptStateOptions added in v0.9.0

type ReencryptStateOptions struct {
	// DryRun reports what the pass would do and writes nothing, neither state nor backup.
	DryRun bool
	// Decrypt writes state back as plaintext instead of sealing it with the configured key,
	// which backs state encryption out. Needs the key that sealed the state to still be
	// configured.
	Decrypt bool
	// BackupDir is where a copy of the state is written before anything is rewritten. Empty
	// derives one alongside the state directory.
	BackupDir string
	// SkipBackup proceeds without taking a copy first. A pass rewrites objects in place, so
	// an interruption leaves a store holding a mix of keys; the copy is what makes that
	// recoverable.
	SkipBackup bool
	// Force proceeds even though something is listening on the engine's address. A running
	// engine holds state in memory and will write it back over this pass.
	Force bool
	// Out receives a line per object. Nil discards them.
	Out io.Writer
}

ReencryptStateOptions controls a re-encryption pass over a memfile state directory.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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