Skip to main content

Module lifetime

Module lifetime 

Source
Expand description

Process lifetime — Permanent (re-converging) vs Ephemeral (auto-SIGTERM on Attested / TTL / Failed).

The wire shape follows the same “exactly-one-optional-field” pattern as Intent — one tagged-union idiom across the typescape.

Lisp authoring:

:lifetime (:permanent)
:lifetime (:ephemeral :ttl "1h"
                      :teardown OnAttested
                      :max-concurrent 1)

Default = Permanent — every existing Process keeps its current behavior.

Structs§

EphemeralLifetime
Ephemeral lifetime — Process auto-terminates per teardown_policy.
Lifetime
Lifetime slot on ProcessSpec. Exactly one variant should be populated; when both are unset the resolver returns Permanent.
PermanentLifetime
Permanent lifetime — the existing Process behavior. SIGHUP re-converges; SIGTERM terminates only on explicit operator action.
UnknownTeardownPolicy

Enums§

LifetimeError
LifetimeKind
Closed-set discriminator over Lifetime’s two tagged-union slots. Single source of truth that drives Lifetime::variant’s ambiguity resolver, the reverse LifetimeVariant::kind projection, and any select-style routing. Adding a third lifetime variant (e.g. a future Burst slot for budget-capped non-TTL lifetimes) lands at one ALL entry + one as_str arm + one select arm + one LifetimeVariant::kind arm — exhaustively checked by the compiler.
LifetimeVariant
Resolved enum view used by the reconciler.
TeardownPolicy
When an ephemeral Process self-terminates.