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 ¶
func New(cfg config.DriverConfig) (driver.Driver, error)
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.