Ankusa.Source (ankusa v0.7.0)

Copy Markdown View Source

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.

Summary

Functions

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.

Types

policy()

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

t()

@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()}
}

Functions

new(id, opts)

@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.