Belay.Config (Belay v1.0.0)

Copy Markdown View Source

The resolved runtime configuration of a Belay instance.

Built from the options passed to the Belay supervisor child spec; carried through every storage and notifier callback. Applications normally never construct one — it is documented because custom storage adapters and notifiers receive it.

Summary

Functions

Resolve the configured 32-byte encryption key, or nil.

Validate and normalize queue options into a producer spec.

Types

t()

@type t() :: %Belay.Config{
  busy_poll: term(),
  clock: term(),
  cron_interval: term(),
  crons: term(),
  dynamic_sync: term(),
  encryption: term(),
  lease_ttl: term(),
  name: term(),
  node_id: term(),
  notifiers: term(),
  poll_interval: term(),
  queues: term(),
  retention: term(),
  shutdown_grace: term(),
  signal_ttl: term(),
  storage: term(),
  storage_ref: term(),
  sweep_interval: term()
}

Functions

encryption_key(config)

@spec encryption_key(t()) :: binary() | nil

Resolve the configured 32-byte encryption key, or nil.

normalize_queue_opts(queue, opts)

@spec normalize_queue_opts(
  atom() | String.t(),
  keyword()
) :: map()

Validate and normalize queue options into a producer spec.