Fact.Seam.EventId behaviour (Fact v0.2.0)
View SourceBehaviour defining how to generate event ids for events in a Fact database.
Implementations of this seam provide the logic for producing unique identifiers for events. The generated ID can be any binary value, such as a UUID or hash.
Callback
generate/2– Generates a new event ID for the given seam instance. Accepts optional parameters viaopts. Returns a binary ID or an error tuple.
Summary
Types
@type t() :: struct()
Callbacks
@callback default_options() :: map()
@callback family() :: atom()
@callback id() :: {atom(), non_neg_integer()}
@callback version() :: non_neg_integer()