Chronicle.EventStoreSubscriptions.DefinitionBuilder (cratis_chronicle v1.0.3)

Copy Markdown View Source

Immutable builder for event store subscription definitions.

When no event types are configured explicitly, the builder uses all registered event types passed to new/1.

Summary

Functions

Builds an event store subscription definition.

Creates a new definition builder.

Adds an event type to the subscription definition.

Types

t()

@type t() :: %Chronicle.EventStoreSubscriptions.DefinitionBuilder{
  event_types: [module()],
  registered_event_types: [module()]
}

Functions

build(builder, id, source_event_store)

Builds an event store subscription definition.

new(registered_event_types \\ [])

@spec new([module()]) :: t()

Creates a new definition builder.

with_event_type(builder, event_type)

@spec with_event_type(t(), module()) :: t()

Adds an event type to the subscription definition.