sandboxversions

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package sandboxversions reads and writes a worker's sandbox versions file, which atelet keeps in the worker's directory (nodepath.AteomPath) as nodepath.SandboxVersionsFileName.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(path string, v *File) (bool, error)

Write atomically replaces the file at path with v, unless it already holds the same content. It reports whether it wrote.

Types

type Attributes

type Attributes map[string]string

Attributes maps a compatibility attribute key, e.g. "sandbox_runtime_hash", to its value.

type File

type File struct {
	// DefaultRuntime is the runtime new and cold-booted actors start under,
	// from the default version of the pool's SandboxConfig.
	DefaultRuntime Attributes `json:"defaultRuntime"`
	// RestorableRuntimes are the other runtimes the worker can restore
	// snapshots from, from the config's other Enabled versions in spec order.
	// None repeats another runtime or the default.
	RestorableRuntimes []Attributes `json:"restorableRuntimes,omitempty"`
}

File is the content of a worker's sandbox versions file: the sandbox runtimes the worker can run, as the compatibility attributes atelet computed for them. The ateom adds each runtime's attributes to the ones it probes itself and registers the result as RegisterWorkerRequest's default_runtime and restorable_runtimes.

func Read

func Read(path string) (*File, error)

Read returns the content of the file at path. A missing file is an error wrapping fs.ErrNotExist.

Jump to

Keyboard shortcuts

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