nspawnops

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package nspawnops is the composition root for the nspawn isolation backend. The backend package cannot import the phase packages that implement its lifecycle operations, so this package binds them to an agent configuration and injects them as nspawn.Ops.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backend

func Backend(p Params) *nspawn.Backend

Backend returns an nspawn backend whose lifecycle operations are the real phases, bound to p.

Types

type Params

type Params struct {
	Log *slog.Logger
	// Config is the agent configuration goal states are resolved from.
	Config *config.AgentConfig
	// Downloads optionally overrides artifact download sources.
	Downloads *goalstates.DownloadOverrides

	// Resolve overrides goal state resolution. Tests use it; the default is
	// goalstates.ResolveMachine.
	Resolve func(slot string) (*goalstates.MachineGoalState, error)
}

Params bind the operations to one machine's configuration.

Jump to

Keyboard shortcuts

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