livetest

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock() (*os.File, error)

Lock serializes live processes and cleanup. The OS releases it on process exit. The empty lock file remains, so a crash never requires guessing stale ownership.

func PrivateRoot

func PrivateRoot() (string, error)

PrivateRoot returns the OS-private cache root used for live-test state.

func PublishProfile

func PublishProfile(p Profile) error

PublishProfile publishes the manifest first and an atomic digest marker last. Callers must finish clone validation and close the database before publishing.

func ValidateRunDir

func ValidateRunDir(runDir string) (string, error)

ValidateRunDir requires an immediate child of the private runs directory. Existing symlink or junction components are rejected, even within the root. The result uses PrivateRoot's spelling while preserving the run identifier.

Types

type Profile

type Profile struct {
	Version           int      `json:"version"`
	RunID             string   `json:"runId"`
	RunDir            string   `json:"runDir"`
	DBPath            string   `json:"dbPath"`
	ConfigPath        string   `json:"configPath"`
	DefaultTrackers   []string `json:"defaultTrackers"`
	SourceKind        string   `json:"sourceKind"`
	SourceFingerprint string   `json:"sourceFingerprint"`
}

Profile identifies a private, successfully constructed live-test profile. Its manifest contains paths and tracker IDs, never configuration secrets.

func LoadProfile

func LoadProfile(runDir string) (Profile, error)

LoadProfile refuses incomplete, relocated, or path-escaped profiles.

func ProfileForDB

func ProfileForDB(dbPath string) (Profile, error)

ProfileForDB resolves a ready profile for its database, allowing equivalent filesystem paths.

Jump to

Keyboard shortcuts

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