Insider.Identity (Insider v0.1.0)

Copy Markdown View Source

Same-node correlation for explicitly declared process identities.

Correlation is layered so absent evidence remains :unknown; it is never converted into a guessed match. The registry intentionally exposes no lookup by PID.

Summary

Functions

Declares a new process generation for subject and returns its Insider.Identity.Generation. Identities are explicit: nothing is inferred from PIDs.

Starts the identity registry that declare/3 and active?/2 operate on.

Types

relation()

@type relation() :: :same | :different | :unknown

relations()

@type relations() :: %{
  physical: relation(),
  process_generation: relation(),
  logical_actor: relation(),
  logical_operation: relation()
}

Functions

active?(registry, generation)

@spec active?(GenServer.server(), term()) :: boolean()

attach(registry, event, generation)

@spec attach(GenServer.server(), Insider.Event.t(), term()) ::
  {:ok, Insider.Event.t()} | {:error, Insider.Protocol.Error.t()}

declare(registry, subject, options \\ [])

Declares a new process generation for subject and returns its Insider.Identity.Generation. Identities are explicit: nothing is inferred from PIDs.

relation(left, right)

start_link(options)

@spec start_link(keyword()) :: GenServer.on_start()

Starts the identity registry that declare/3 and active?/2 operate on.