Foresight.Context (Foresight v0.1.0)

Copy Markdown View Source

Execution context for the public API.

Every public function in Foresight takes a t/0 as its first argument: the tenant, the tenancy mode (:mode_a, :mode_b, or :mode_c), the bank, and the values the storage and embedding layers resolve from them (role_name, prefix, embedding_dim).

Summary

Types

mode()

@type mode() :: :mode_a | :mode_b | :mode_c

t()

@type t() :: %Foresight.Context{
  bank: String.t(),
  embedding_dim: pos_integer() | nil,
  mode: mode(),
  prefix: String.t() | nil,
  role_name: String.t() | nil,
  tenant_id: String.t()
}