# `Tank.Volume`
[🔗](https://github.com/oshlabs/tank/blob/v0.2.0/lib/tank/volume.ex#L1)

A pod-level storage volume, mounted into containers via `Tank.Mount`.

Two sources:

  * `:managed` (default) — Tank allocates `<data_dir>/volumes/<name>`.
  * `{:host, path}` — bind-mount an existing absolute host directory (the
    escape hatch).

# `source`

```elixir
@type source() :: :managed | {:host, Path.t()}
```

# `t`

```elixir
@type t() :: %Tank.Volume{name: String.t(), source: source()}
```

# `new`

```elixir
@spec new(map() | keyword()) :: {:ok, t()} | {:error, term()}
```

Build a validated volume from a map or keyword list.

# `new!`

```elixir
@spec new!(map() | keyword()) :: t()
```

Like `new/1` but raises `ArgumentError` on invalid input.

---

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