Docs

actor-id

Source: crates/lvcs/src/runtime/mod.rs.

/// Identifies one actor incarnation in the local journal (decision 63).
///
/// Journal-only: the journal never leaves the peer, so `key` may be a
/// document path. Never use it as a telemetry attribute.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub(crate) struct ActorId {
    /// The machine's `actor_kind` value.
    pub(crate) kind: &'static str,
    /// Instance key within the kind: the document address for `document`,
    /// the workspace id for `mirror` and `workspace`, and `""` for a kind
    /// with one actor per daemon.
    pub(crate) key: String,
    /// Starts at 0 and increases each time the shell spawns this
    /// `(kind, key)` again. Replay builds a fresh actor per incarnation: a
    /// document from its saves at the first entry's `state_before` heads; a
    /// router, mirror, or workspace by replaying every earlier
    /// incarnation's entries.
    pub(crate) incarnation: u64,
}