# `Hush.Provider`
[🔗](https://github.com/gordalina/hush/blob/v1.3.0/lib/hush/provider.ex#L1)

Hush relies on providers to resolve values that the consumer requests.

You can [read here](https://hexdocs.pm/hush/readme.html#writing-your-own-provider) on how to write your own provider.

# `child_spec`

```elixir
@type child_spec() :: Supervisor.child_spec()
```

# `fetch`

```elixir
@callback fetch(key :: String.t()) ::
  {:ok, String.t()} | {:error, :not_found} | {:error, any()}
```

# `load`

```elixir
@callback load(config :: Keyword.t()) :: :ok | {:ok, [child_spec()]} | {:error, any()}
```

# `fetch`

```elixir
@spec fetch(module(), String.t()) ::
  {:ok, String.t() | nil} | {:error, :required} | {:error, any()}
```

Fetch a value from a provider

# `valid?`

```elixir
@spec valid?(module()) :: :ok | {:error, String.t()}
```

Is the provider a valid one?

---

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