Documentation
¶
Overview ¶
Package defaults installs the catalog plugins marked default into every home once
Index ¶
- Constants
- Variables
- func DispatchEntry(ctx context.Context)
- func Entries(ctx context.Context) []*plugins.PluginCatalogEntry
- func FetchPolicy(h string) string
- func RunChild(ctx context.Context) (code int)
- func SpawnInstall(ctx context.Context, h string) (bool, error)
- func StepInstall(ctx context.Context) (map[string]any, error)
- type Outcome
Constants ¶
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
const Entry = "__icebath_default_plugins__"
Argv marker of the detached child that installs the default plugins of every home
const UpdateWait = 900 * time.Second
Time the update tail waits for another installer of the default set
Variables ¶
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 ¶
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 ¶
Fetch policy of a home read without binding its profile, nothing fetched unless allowed and an unreadable config keeping the home owed
func RunChild ¶
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 ¶
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
Types ¶
type Outcome ¶
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 ¶
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