# `Chronicle.EventSources.EventSourceDefinition`
[🔗](https://github.com/Cratis/Chronicle.Elixir/blob/main/lib/chronicle/event_sources/event_source_definition.ex#L4)

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.

# `t`

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

# `concurrency_for`

```elixir
@spec concurrency_for(t(), Chronicle.EventSources.EventStream.t() | nil) ::
  Chronicle.EventSources.ConcurrencyDimensions.t()
```

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`

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

Finds a stream by name.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
