Liking cljdoc? Tell your friends :D

hive-addon.lifecycle.policy

Pure lifecycle decisions over a spec set: which addons mount at boot, which stay dormant, what an activation must mount, and what a sweep may evict. No IO, no clock, no host. Time arrives as a number.

Dependency edges come from hive-addon.mount.solve/edges, the same rule chain the mounter orders by, so a lifecycle decision can never disagree with a mount order.

Portable stratum: no reader conditionals, no for, only self-evaluating :or defaults (see hive-addon.mount.solve).

Pure lifecycle decisions over a spec set: which addons mount at boot, which
stay dormant, what an activation must mount, and what a sweep may evict.
No IO, no clock, no host. Time arrives as a number.

Dependency edges come from hive-addon.mount.solve/edges, the same rule chain
the mounter orders by, so a lifecycle decision can never disagree with a
mount order.

Portable stratum: no reader conditionals, no `for`, only self-evaluating
`:or` defaults (see hive-addon.mount.solve).
raw docstring

activation-idsclj/s

(activation-ids specs id active?)

What mounting ID requires: ID and its transitive dependencies that are not ACTIVE? yet, in mount order.

What mounting ID requires: ID and its transitive dependencies that are not
ACTIVE? yet, in mount order.
sourceraw docstring

boot-partitionclj/s

(boot-partition specs lifecycles surface-of)

Split SPECS into what mounts at boot and what stays dormant.

LIFECYCLES is {id Lifecycle}; SURFACE-OF answers an id's Surface or nil.

A :lazy addon is downgraded to eager when :no-surface nothing can be advertised for it, so nothing can try it :required-by-eager something mounted at boot depends on it

Returns {:eager [id ...] in mount order, :dormant [id ...] sorted, :downgraded {id reason}}.

Split SPECS into what mounts at boot and what stays dormant.

LIFECYCLES is {id Lifecycle}; SURFACE-OF answers an id's Surface or nil.

A :lazy addon is downgraded to eager when
  :no-surface          nothing can be advertised for it, so nothing can try it
  :required-by-eager   something mounted at boot depends on it

Returns {:eager [id ...] in mount order, :dormant [id ...] sorted,
         :downgraded {id reason}}.
sourceraw docstring

default-idle-msclj/s

30 minutes.

30 minutes.
sourceraw docstring

default-policyclj/s

source

dependency-closureclj/s

(dependency-closure specs ids)

IDS plus every addon they transitively depend on, within SPECS.

IDS plus every addon they transitively depend on, within SPECS.
sourceraw docstring

dependent-closureclj/s

(dependent-closure specs ids)

IDS plus every addon that transitively depends on them, within SPECS.

IDS plus every addon that transitively depends on them, within SPECS.
sourceraw docstring

policiesclj/s

source

resolve-allclj/s

(resolve-all specs opts)

{addon-id Lifecycle} for SPECS. OPTS: {:defaults decl :overrides {id decl}}.

{addon-id Lifecycle} for SPECS. OPTS: {:defaults decl :overrides {id decl}}.
sourceraw docstring

resolve-lifecycleclj/s

(resolve-lifecycle spec defaults override)

The Lifecycle for SPEC. Precedence, strongest first: the per-id OVERRIDE, the manifest's :addon/lifecycle, the host DEFAULTS decl, the built-ins. A key a layer cannot honour is ignored in that layer.

The Lifecycle for SPEC. Precedence, strongest first: the per-id OVERRIDE,
the manifest's :addon/lifecycle, the host DEFAULTS decl, the built-ins.
A key a layer cannot honour is ignored in that layer.
sourceraw docstring

sweep-planclj/s

(sweep-plan now specs states)

What a sweep at NOW may evict. STATES is {id UseState}.

An idle addon is still kept while any ACTIVE addon depends on it. Evicting a dependent frees its dependencies in the same sweep, so the plan is a fixpoint and :evict is ordered dependents-first.

Returns a SweepPlan.

What a sweep at NOW may evict. STATES is {id UseState}.

An idle addon is still kept while any ACTIVE addon depends on it. Evicting a
dependent frees its dependencies in the same sweep, so the plan is a fixpoint
and :evict is ordered dependents-first.

Returns a SweepPlan.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close