Provisional: added for Script, and a change to it needs a changelog line but
no new major (docs/USER_PLUGINS_DESIGN.md). The namespace has nothing to do
with the context's :provisional? key.
The tenant's named key-value stores, through Alternera.Plugin.Host.
tenant is the context's :store_tenant. Under dry_run?: true, the
context's :dry_run?, a write answers what it would have and writes nothing.
A name the proxy does not accept is {:error, :store_invalid_name}, and a
write to a key that holds a cache entry {:error, :store_reserved_key}.
A store the tenant marked secret (secret?/2) holds values the recording
must never show. A step that hands one on says so in its summary:
secret_outputs: true records its value output as a placeholder, and
header_vars, a map of each variable it wrote the value to and
secret_mark/0, records those variables the same way.
A cache container keeps its entries in a store of its own, which a step
reaches only through invalidate/4: the host gives a step whose options
hold operation: :invalidate and cache: id the container's target as
:cache_target when it prepares the pipeline, and invalidate/4 makes
the container's key on the exchange and removes its entries.
Summary
Functions
Deletes key, answering whether it held one. Takes :dry_run?.
The entries of a store. Takes :prefix and :limit.
The entry of key (its value, its size and its age in seconds), or :miss.
Removes the entries cache container cache keeps under the key it would
make on this exchange, inputs (key placeholder to value) in place of
what the exchange has. target is the step's :cache_target; context
is the step's, whose view, tenant and store scope the host reads.
Answers whether it removed any and the key as the step may show it
("[secret]" for a secret store's), {:error, :store_no_cache} for a
target the host did not make, or :unresolved when the key does
not resolve on this exchange. Takes :cache (the container's id) and
:dry_run?, which answers whether an entry is there and removes none.
Whether a store can hold value as it is: text, numbers, booleans, nil, lists and objects of them.
Writes key. Takes :ttl, :if_absent and :dry_run?.
Whether the tenant marked store name secret.
The mark header_vars puts on a variable written from a secret store.
Changes key by mode, answering the value it holds now and whether the
change created it. Takes :ttl, :create_if_missing, :initial and
:dry_run?.
Whether the proxy accepts name as a store's name.
Types
Functions
Deletes key, answering whether it held one. Takes :dry_run?.
@spec entries(String.t(), String.t(), keyword()) :: {:ok, [%{key: String.t(), value: term(), age_s: non_neg_integer()}], %{truncated: boolean()}} | {:error, error()}
The entries of a store. Takes :prefix and :limit.
@spec get(String.t(), String.t(), String.t()) :: {:ok, %{value: term(), bytes: non_neg_integer(), age_s: non_neg_integer()}} | :miss | {:error, error()}
The entry of key (its value, its size and its age in seconds), or :miss.
@spec invalidate(map(), term(), %{required(String.t()) => String.t()}, keyword()) :: {:ok, %{deleted: boolean(), key: String.t()}} | :unresolved | {:error, error()}
Removes the entries cache container cache keeps under the key it would
make on this exchange, inputs (key placeholder to value) in place of
what the exchange has. target is the step's :cache_target; context
is the step's, whose view, tenant and store scope the host reads.
Answers whether it removed any and the key as the step may show it
("[secret]" for a secret store's), {:error, :store_no_cache} for a
target the host did not make, or :unresolved when the key does
not resolve on this exchange. Takes :cache (the container's id) and
:dry_run?, which answers whether an entry is there and removes none.
Whether a store can hold value as it is: text, numbers, booleans, nil, lists and objects of them.
Writes key. Takes :ttl, :if_absent and :dry_run?.
Whether the tenant marked store name secret.
@spec secret_mark() :: String.t()
The mark header_vars puts on a variable written from a secret store.
@spec update(String.t(), String.t(), String.t(), mode(), keyword()) :: {:ok, term(), %{created: boolean()}} | {:error, error()}
Changes key by mode, answering the value it holds now and whether the
change created it. Takes :ttl, :create_if_missing, :initial and
:dry_run?.
Whether the proxy accepts name as a store's name.