# `PgFlowDashboard.Config`
[🔗](https://github.com/agoodway/pgflow/blob/v0.1.0/lib/pgflow_dashboard/config.ex#L1)

Configuration validation and management for PgFlowDashboard.

Uses NimbleOptions to validate configuration options passed to the dashboard router.

## Required Options

  * `:repo` - The Ecto repository module to use for database queries.
  * `:pubsub` - The Phoenix.PubSub module for real-time updates.

## Optional Options

  * `:refresh_interval` - Polling interval in milliseconds. Default: `5_000`.
  * `:time_zone` - Time zone for displaying timestamps. Default: `"UTC"`.
  * `:default_time_range` - Default time range filter. Default: `:last_24h`.
  * `:max_grid_runs` - Maximum runs to show in history grid. Default: `50`.
  * `:query_timeout` - Database query timeout in milliseconds. Default: `10_000`.
  * `:enable_pubsub` - Whether to enable real-time PubSub updates. Default: `true`.
  * `:cache_ttl` - Cache TTL in milliseconds. Default: `5_000`.

## Examples

    config = PgFlowDashboard.Config.validate!(
      repo: MyApp.Repo,
      pubsub: MyApp.PubSub,
      refresh_interval: 10_000
    )

# `schema`

```elixir
@spec schema() :: keyword()
```

Returns the NimbleOptions schema for PgFlowDashboard configuration.

# `validate!`

```elixir
@spec validate!(keyword()) :: keyword()
```

Validates the given configuration options.

Raises `ArgumentError` if the configuration is invalid.

## Examples

    iex> PgFlowDashboard.Config.validate!(repo: MyApp.Repo, pubsub: MyApp.PubSub)
    [repo: MyApp.Repo, pubsub: MyApp.PubSub, ...]

    iex> PgFlowDashboard.Config.validate!(pubsub: MyApp.PubSub)
    ** (ArgumentError) required :repo option not found

---

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