factory

package
v0.2.16 Latest Latest
Warning

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

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

Documentation

Overview

Package factory builds a Driver from agent config. It exists so the agent and `ushr doctor` resolve the same driver, image store and free-space floor from the same config — a doctor that measured a different disk than the agent gates on would report health the agent doesn't act on.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionCacheDir added in v0.2.12

func ActionCacheDir(cfg config.DriverConfig) string

ActionCacheDir is the host's action archive cache under the agent state dir, shared by every org on the host. "" when the home dir can't be resolved.

func MinFreeBytes

func MinFreeBytes(cfg config.DriverConfig) uint64

MinFreeBytes resolves the free-space floor the admission gate uses: the configured value, else the driver's default. Negative disables the gate.

func New

New constructs the configured driver. An unset type is tart (macOS was the first host shape).

func ReclaimFloorBytes

func ReclaimFloorBytes(cfg config.DriverConfig) uint64

ReclaimFloorBytes is the same floor as a reclaim target, and survives a negative min_free_gb: an operator who never wants a job refused still wants the caches collected, so disabling the gate must not disable upkeep.

Types

This section is empty.

Jump to

Keyboard shortcuts

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