|
testcontainers-cpp 0.2.0
Native C++20 Testcontainers over the Docker Engine API
|
A copyable builder for a richer named volume: driver, driver options, and labels. More...
#include <testcontainers/Volume.hpp>
Public Member Functions | |
| Builder & | with_name (std::string name) |
| Builder & | with_driver (std::string driver) |
| Builder & | with_driver_opt (std::string key, std::string value) |
| Add a driver option (DriverOpts). Add several to set multiple options. | |
| Builder & | with_label (std::string key, std::string value) |
| Add a volume label (Labels). | |
| Volume | create () const |
| Create the volume from the configured options, returning the handle. | |
A copyable builder for a richer named volume: driver, driver options, and labels.
Defined in std types only (no Boost/json leak through the header).
The with_* setters mutate in place and return *this by reference; a single unqualified overload chains on both a named lvalue and a temporary. create() assembles the spec, runs the Reaper hook, and creates the volume.
|
inline |
|
inline |
|
inline |
Add a driver option (DriverOpts). Add several to set multiple options.
|
inline |
Add a volume label (Labels).
The testcontainers session labels are always merged in by create() for Ryuk reaping.
| Volume testcontainers::Volume::Builder::create | ( | ) | const |
Create the volume from the configured options, returning the handle.