# `Ankusa.Source`
[🔗](https://github.com/jamescarr/ankusa/blob/ankusa-v0.7.0/packages/ankusa/lib/ankusa/source.ex#L1)

Per-source configuration: how to verify, what to do on a verification
failure, and where delivered hooks go.

A `Ankusa.SourceStore` returns one of these for a given `source_id`.

# `policy`

```elixir
@type policy() :: :reject | :quarantine | :accept_flag
```

# `t`

```elixir
@type t() :: %Ankusa.Source{
  dedupe: Ankusa.Dedupe.t() | nil,
  forward_headers: :default | [String.t()],
  forward_headers_max_bytes: pos_integer(),
  id: String.t(),
  max_headers: pos_integer(),
  on_verify_failure: policy(),
  ordering: [Ankusa.Ordering.sink_ordering()] | nil,
  retry: keyword() | nil,
  sinks: [{module(), keyword()}],
  store_headers: Ankusa.Edge.StoredHeaders.override() | nil,
  tenant_id: String.t(),
  trust_url_tenant: boolean(),
  verifier: {module(), keyword()}
}
```

# `new`

```elixir
@spec new(String.t(), keyword() | map()) :: t()
```

Build a source from a keyword list / map, applying defaults. Raises if
`:tenant_id` isn't `[A-Za-z0-9_-]{1,64}`: the tenant names a storage
partition and a claim-check path segment, so a bad one fails at boot.

---

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