Public digest-rule persistence API for durable rule lookup and storage.
Digest flush execution closes automatically only when the configured
dispatcher is Chimeway.Dispatch.Oban, because bucket accumulation can then
schedule Chimeway.Dispatch.DigestFlushWorker from persisted
window_ends_at state.
Hosts using any other dispatcher still retain the durable public
emit_bucket/2 seam and are expected to drive flush execution explicitly.
Chimeway does not imply built-in automatic digest scheduling outside the Oban
path.
Summary
Functions
Emits a due digest bucket and returns the canonical emitted delivery identity.
Finds the first digest rule matching channel and rule selectors.
Fetches a digest rule by ID.
Lists digest rules, optionally filtered by exact-match fields.
Creates or updates a digest rule by stable rule_key and rule_version.
Types
Functions
Emits a due digest bucket and returns the canonical emitted delivery identity.
This remains the explicit host-managed flush seam when
Chimeway.Dispatch.Oban is not the configured dispatcher.
@spec find_matching_rule(rule_lookup()) :: Chimeway.Digests.DigestRule.t() | nil
Finds the first digest rule matching channel and rule selectors.
@spec get_rule!(binary()) :: Chimeway.Digests.DigestRule.t()
Fetches a digest rule by ID.
@spec list_rules(keyword()) :: [Chimeway.Digests.DigestRule.t()]
Lists digest rules, optionally filtered by exact-match fields.
@spec upsert_rule(map()) :: {:ok, Chimeway.Digests.DigestRule.t()} | {:error, Ecto.Changeset.t()}
Creates or updates a digest rule by stable rule_key and rule_version.