API Reference NoNoncense v#2.0.0

Copy Markdown View Source

Modules

Generate locally unique nonces (number-only-used-once) in distributed Elixir.

Exception raised when a NoNoncense instance is called while disabled, for example because its machine ID lease was lost.

Exception raised when a NoNoncense instance is not initialized.

Supervised machine ID lease management for NoNoncense.

Guards against machine ID conflicts between nodes by broadcasting each node's machine ID to newly connected peers and calling on_conflict whenever a duplicate is detected.

In-memory cache of a machine ID and its lease.

Acquires and renews a machine ID lease through a pluggable NoNoncense.MachineId.Strategy, directly managing the configured NoNoncense factories.

Behaviour for pluggable machine ID lease strategies, used by NoNoncense.MachineId.LeaseManager to coordinate unique machine ID assignment across nodes (e.g. through SQL or Redis).

Strategy to acquire the machine ID from the last digits in an environment variable value. Useful for using Kubernetes StatefulSets for determining the machine ID.

Strategy to assign machine IDs based on the current node's network identifiers (hostname, FQDN, IP addresses, or OTP node name), matched against a fixed list of all possible nodes.

Strategy to acquire a machine ID lease from Redis, coordinating uniqueness across nodes through a single Redis hash.

Strategy to acquire a machine ID lease from a SQL database (Postgres or MySQL), coordinating uniqueness across nodes through a single table.

Events emitted while managing machine IDs. Nonce generation is never instrumented.