Jido.Thread.EntryNormalizer (Jido v2.3.0)

Copy Markdown View Source

Shared entry normalization for thread and storage append paths.

Ensures all adapters apply the same defaults and attribute extraction for %Jido.Thread.Entry{} structs and plain maps.

Summary

Functions

Normalize a single entry input into %Jido.Thread.Entry{}.

Normalize many entries, assigning monotonic sequence numbers from base_seq.

Types

entry_input()

@type entry_input() :: Jido.Thread.Entry.t() | map()

opts()

@type opts() :: [{:id_generator, (-> String.t())}]

Functions

normalize(entry, seq, now, opts \\ [])

@spec normalize(entry_input(), non_neg_integer(), integer(), opts()) ::
  Jido.Thread.Entry.t()

Normalize a single entry input into %Jido.Thread.Entry{}.

normalize_many(entries, base_seq, now, opts \\ [])

@spec normalize_many([entry_input()], non_neg_integer(), integer(), opts()) :: [
  Jido.Thread.Entry.t()
]

Normalize many entries, assigning monotonic sequence numbers from base_seq.