Spectre.Identity (Spectre v0.3.0)

Copy Markdown View Source

Generates durable identifiers shared by runtime entities.

UUIDv7 keeps identifiers unique across processes, restarts, and BEAM nodes while retaining creation-time ordering. It replaces process-local System.unique_integer/1 identifiers at persistence boundaries.

Summary

Types

A canonical lowercase UUID string.

Functions

Derives a stable idempotency key from an effect identifier.

Generates an RFC 9562 UUIDv7 string.

Types

uuid7()

@type uuid7() :: <<_::288>>

A canonical lowercase UUID string.

Functions

idempotency_key(id)

@spec idempotency_key(term()) :: String.t()

Derives a stable idempotency key from an effect identifier.

uuid7()

@spec uuid7() :: uuid7()

Generates an RFC 9562 UUIDv7 string.