# `Alternera.Plugin.Provisional.Reads`
[🔗](https://github.com/10e-ab/alternera-sdk/blob/v0.9.0/alternera_plugin_sdk/lib/alternera/plugin/provisional/reads.ex#L1)

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.

What a plugin may read from the proxy beyond templates. Each read goes through
`Alternera.Plugin.Host`.

# `allowed_methods`

```elixir
@spec allowed_methods(map() | nil) :: [String.t()]
```

The methods the tenant's pipelines allow for `request`, as a list.

# `error_map`

```elixir
@spec error_map(term()) :: %{required(String.t()) =&gt; term()}
```

The error a catch or On error handles (the context's), as a map with string keys.

# `read_timeout_ms`

```elixir
@spec read_timeout_ms(String.t() | nil) :: pos_integer()
```

How long a call may read an upstream's response, for `tenant_id` or by default for `nil`.

# `script_cache_max_entries`

```elixir
@spec script_cache_max_entries(String.t() | nil) :: pos_integer()
```

How many compiled scripts `tenant_id` may keep, or by default for `nil`.

# `tenant_var`

```elixir
@spec tenant_var(:plain | :secret, String.t(), map() | nil, keyword()) ::
  {:ok, String.t()} | {:error, String.t()}
```

The tenant variable `name` in `scope`, as a reference of `kind` reads it. A
secret reads as the reference, never its value.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
