defaults

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package defaults installs the catalog plugins marked default into every home once

Index

Constants

View Source
const (
	FetchAllowed    = "allowed"
	FetchDenied     = "denied"
	FetchUnreadable = "unreadable"
)

Whether a home may fetch plugins: allowed, denied by security.allow_lazy_installs or the env opt out, or an unreadable config that keeps the home owed

View Source
const Entry = "__icebath_default_plugins__"

Argv marker of the detached child that installs the default plugins of every home

View Source
const UpdateWait = 900 * time.Second

Time the update tail waits for another installer of the default set

Variables

View Source
var Identity func(ctx context.Context) string

Identity of the installed code a settled pass is recorded under, installed by the update package

Functions

func DispatchEntry

func DispatchEntry(ctx context.Context)

DispatchEntry runs the default plugin install and exits when argv carries the entry, otherwise records that this binary handles it

func Entries

func Entries(ctx context.Context) []*plugins.PluginCatalogEntry

Catalog entries marked default that this OS and this icebath can run, from the live catalog else the in-tree one

func FetchPolicy

func FetchPolicy(h string) string

Fetch policy of a home read without binding its profile, nothing fetched unless allowed and an unreadable config keeping the home owed

func RunChild

func RunChild(ctx context.Context) (code int)

RunChild is the detached child, logging to logs/default-plugins.log of the dependency home root; one that finds another installer running leaves its request to that one

func SpawnInstall

func SpawnInstall(ctx context.Context, h string) (bool, error)

SpawnInstall starts the detached child that installs the defaults of every home unless the last attempt failed recently, h when given having to allow fetching; a running child sees the request when it finishes and scans again, and the call never waits

func StepInstall

func StepInstall(ctx context.Context) (map[string]any, error)

StepInstall is the boot step, never blocking the start: owed, so later starts check again without network, until a child reports every default settled for this revision; an owed start outside the backoff starts one

Types

type Outcome

type Outcome struct {
	Installed []string
	Owed      []string
	Skipped   string
}

What one pass over the default plugins did: the plugins it installed, what is still to fetch and why it ran nothing

func Install

func Install(ctx context.Context, h string, say func(string), entries []*plugins.PluginCatalogEntry) (Outcome, error)

Install installs and enables every default plugin a home never had, entries nil reading the catalog; one plugin's failure is reported through say and listed as owed, never returned

func InstallAndRecord

func InstallAndRecord(ctx context.Context, say func(string), wait time.Duration) (Outcome, error)

InstallAndRecord is the one coordinator of the update tail and the detached child: it passes over every home again until no rescan was asked for meanwhile, then records what the boot step reads, a failure beginning the backoff and a clean pass marking this revision settled

Jump to

Keyboard shortcuts

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