MingaAgent.EventLog.Failure (Minga v0.1.0)

Copy Markdown View Source

Typed, observable failure of EventLog admission or durable commitment.

Summary

Functions

Builds an admission failure, which has no durability receipt.

Builds a post-admission persistence failure.

Removes the original receipt before replaying a retained failure to a later subscriber.

Types

stage()

@type stage() :: :admission | :persistence

t()

@type t() :: %MingaAgent.EventLog.Failure{
  event_type: MingaAgent.EventLog.EventRecord.event_type(),
  reason: term(),
  receipt: reference() | nil,
  stage: stage()
}

Functions

admission(event_type, reason)

Builds an admission failure, which has no durability receipt.

persistence(receipt, event_type, reason)

Builds a post-admission persistence failure.

retained(failure)

@spec retained(t()) :: t()

Removes the original receipt before replaying a retained failure to a later subscriber.