The only runtime configuration the library reads. boot!/1 validates it
once at boot from a NimbleOptions schema and stores it. The adapter is
a module or a {module, keyword} pair, and a bare module means [],
which the adapter's options_schema/0 still validates. The port and the
seam call resolve/0. It answers the boot struct under the overrides
Mediate.Test.with_config/1 put in the process dictionary. It takes the
first non-empty override, from the caller and then from each process in
its $callers chain, and merges it over the boot struct field by field.
Fields: * :adapter - Required. The module implementing Mediate.Adapter, bare or with its options.
:clock(function of arity 0) - A zero-arity function that answers the current time in UTC.&DateTime.utc_now/0when absent.:caps(keyword/0) - The caps on what a record carries by value. The default value is[policy_content_bytes: 65536].:policy_content_bytes(pos_integer/0) - Policy text kept by value. The default value is65536.
Summary
Types
The adapter module, with its own options beside it when it takes any.
The size above which a policy version carries a pointer rather than the text.
What the port calls for now. A test gives one that does not move.
The validated configuration, read once at boot.
Functions
The adapter module and its options.
Validate once at boot and keep the struct for resolve/0.
Validate a keyword list into the struct.
new/1, and it raises the error.
The boot struct under this process's overrides, or an error when neither exists.
The struct as the keyword list new/1 accepts.
Types
The adapter module, with its own options beside it when it takes any.
@type caps() :: [{:policy_content_bytes, pos_integer()}]
The size above which a policy version carries a pointer rather than the text.
@type clock() :: (-> DateTime.t())
What the port calls for now. A test gives one that does not move.
The validated configuration, read once at boot.
Functions
The adapter module and its options.
Validate once at boot and keep the struct for resolve/0.
@spec new(keyword()) :: {:ok, t()} | {:error, Mediate.Error.t()}
Validate a keyword list into the struct.
new/1, and it raises the error.
@spec resolve() :: {:ok, t()} | {:error, Mediate.Error.t()}
The boot struct under this process's overrides, or an error when neither exists.
The struct as the keyword list new/1 accepts.