Chronicle.EventSources.EventSourceDefinition (cratis_chronicle v3.16.1)

Copy Markdown View Source

A discovered event source definition: stable name, description, default concurrency dimensions and streams.

The name is the event source type written on appended events and the EventSource metadata recorded on them.

Summary

Functions

Returns the dimensions that apply to an append: those of the stream when one is given and declares any, otherwise those of the event source.

Types

t()

@type t() :: %Chronicle.EventSources.EventSourceDefinition{
  concurrency: Chronicle.EventSources.ConcurrencyDimensions.t(),
  description: String.t(),
  module: module(),
  name: String.t(),
  streams: [Chronicle.EventSources.EventStream.t()]
}

Functions

concurrency_for(event_source_definition, arg2)

Returns the dimensions that apply to an append: those of the stream when one is given and declares any, otherwise those of the event source.

find_stream(event_source_definition, name)

@spec find_stream(t(), String.t()) :: Chronicle.EventSources.EventStream.t() | nil

Finds a stream by name.