Skip to main content

Crate orbit_counter

Crate orbit_counter 

Source
Expand description

Keyed fleet counters backed by one authoritative SHM table.

A counter is current state, not history: no ring frame is published and no cursor exists. The owner of a fleet generation calls Counter::reset_all during quiescent boot; everything else is lock-free atomics on immutable-address slots.

Keys are installed once per fleet generation under a short, process-recoverable structural lock. Once installed, their values are immutable-address, signed 64-bit atomics: reads and updates do not publish ring frames and do not acquire an OS lock.

Structs§

Counter
Fleet-wide keyed signed counters.

Enums§

Error
Additions are expected: a cause discovered later lands here rather than in a new major version, so a caller matches what it handles and leaves the rest to a catch-all.

Constants§

COUNTER_CAPACITY
Maximum number of distinct keys installed during one fleet generation.
COUNTER_KEY_MAX
Maximum counter key length in bytes.
COUNTER_STATE_KIND
Reserved Orbit SHM kind for the keyed counter table.

Type Aliases§

Result