Skip to main content

Module backend

Module backend 

Source
Expand description

Backend contracts (§8). Generic parameters only; no dyn (§6).

Every mutating call takes the OpId that was durably journaled before it (§12). The OpId carries (txn, epoch): the backend refuses the call with Outcome::fenced() if that epoch is not the journal’s current epoch for the transaction, and tags the work it starts with the OpId so jobs_tagged can find it later. This replaces the &Lease parameter in §8.

Structs§

AgentLimits
Limits on launched agents (services.planarian.agents.limits, §12d).
Built
DeviceInfo
InstanceId
One start of an agent’s unit: its systemd InvocationID (I24). The name alone never identifies an agent.
OverrideSet
Flat option assignments for planarian/overrides.nix (wrapped in lib.mkOverride 90).
PinnedSource
The owner’s configuration as Nix will see it.
SessionInfo
StagedSource
An immutable staged copy (§9 step 1).

Enums§

Ending
How a unit’s main process last ended, as the supervisor reports it.
PowerSource
SourceKind

Constants§

AGENTS_SLICE
The slice every launched agent runs in (§12d, R05): the posture stops it as a whole.

Traits§

Backends
Every backend the system needs, as one generic parameter (§6: generics, no dyn). The daemon and the watchdog instantiate it with the real backends; the gym, with fakes.
Clock
GenerationBackend
InventoryBackend
ProbeBackend
ProcessBackend
RuntimeOptionBackend
The core-owned runtime-settable options (§12a).
SessionBackend
SnapshotBackend
UnitBackend

Functions§

agent_unit
The unit an agent runs in (§11, §16).
valid_agent_name
An agent’s name: 1-32 of a-z, 0-9 and -, not starting with -.