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.
UnknownLifetimeKind
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.

Constants§

DEFAULT_EPHEMERAL_MAX_CONCURRENT
Workspace-canonical default cluster-wide concurrency budget wire- form — the u32 handle over the same 1 value default_ephemeral_max_concurrent returns. Use this const for compile-time comparisons; use default_ephemeral_max_concurrent for the serde default = "…" slot contract.
DEFAULT_EPHEMERAL_TTL
Workspace-canonical humantime default TTL wire-form — the &'static str handle over the same "1h" value default_ephemeral_ttl returns. Use this const for compile-time comparisons and format arguments; use default_ephemeral_ttl for the owned String the serde default = "…" slot contract expects.

Functions§

default_ephemeral_max_concurrent
Workspace-canonical default cluster-wide concurrency budget for every ephemeral authoring surface — the ONE substrate owner of the 1 wire-form default that pre-lift lived as TWO identical private fn default_max_concurrent() -> u32 { 1 } shims across EphemeralLifetime + crate::ephemeral::EphemeralSpec.
default_ephemeral_ttl
Workspace-canonical humantime default TTL for every ephemeral authoring surface — the ONE substrate owner of the "1h" wire-form default that pre-lift lived as THREE identical private fn default_ttl() -> String { "1h".to_string() } shims across [tatara-process]’s own EphemeralLifetime + [crate::ephemeral:: EphemeralSpec] + [tatara-reconciler]’s EphemeralDefaults.