The interface routing uses to read Sovite's database tables
(Sovite.Core.Repo.Tables.*): a key goes in, a string value or nothing
comes out.
A table is {module, handle}, where module implements lookup/2.
Routing holds tables as {name, table} pairs, so a failure can name
the table.
Telemetry
[:sovite, :tables, :lookup_error]-%{},%{table, reason}: a table could not be read; the mail is deferred or answered with a temporary error.
Summary
Types
The result of a lookup: {:ok, value}, :error when the key is not in
the table, or {:error, reason} when the table could not be read.
A table: a module and its handle.
Named tables, searched in order.
Callbacks
Looks up key.
Functions
Tries each key in turn, in each table, and returns the first value
found with the key that found it. A table that cannot be read stops the
search and returns {:error, name}: a later table must not answer for
a key the failing one might hold.
Types
The result of a lookup: {:ok, value}, :error when the key is not in
the table, or {:error, reason} when the table could not be read.
A table: a module and its handle.
Named tables, searched in order.
Callbacks
Functions
@spec lookup(tables(), [String.t()]) :: {:ok, String.t(), String.t()} | :error | {:error, String.t()}
Tries each key in turn, in each table, and returns the first value
found with the key that found it. A table that cannot be read stops the
search and returns {:error, name}: a later table must not answer for
a key the failing one might hold.