|
testcontainers-cpp 0.2.0
Native C++20 Testcontainers over the Docker Engine API
|
A container HEALTHCHECK definition, mirroring Docker's create-body Healthcheck object. More...
#include <testcontainers/Healthcheck.hpp>
Public Member Functions | |
| Healthcheck & | with_interval (std::chrono::nanoseconds interval) |
| Healthcheck & | with_timeout (std::chrono::nanoseconds timeout) |
| Healthcheck & | with_retries (int retries) |
| Healthcheck & | with_start_period (std::chrono::nanoseconds start_period) |
| const std::vector< std::string > & | test () const noexcept |
| std::optional< std::chrono::nanoseconds > | interval () const noexcept |
| std::optional< std::chrono::nanoseconds > | timeout () const noexcept |
| std::optional< std::chrono::nanoseconds > | start_period () const noexcept |
| std::optional< int > | retries () const noexcept |
Static Public Member Functions | |
| static Healthcheck | cmd_shell (std::string cmd) |
| ["CMD-SHELL", cmd] — run cmd with the container's default shell. | |
| static Healthcheck | cmd (std::vector< std::string > argv) |
| ["CMD", arg0, arg1, ...] — exec the given argv directly (no shell). | |
| static Healthcheck | none () |
| ["NONE"] — disable any healthcheck inherited from the image. | |
A container HEALTHCHECK definition, mirroring Docker's create-body Healthcheck object.
The test vector follows Docker's tagged convention: the first element is the kind ("CMD", "CMD-SHELL", or "NONE") and the remaining elements are the command/arguments. Build one with the static factories, then tune it with the chainable setters (same style as GenericImage).
A plain, copyable value type (no Boost/Asio leakage).
|
inlinestatic |
|
inlinestatic |
["CMD", arg0, arg1, ...] — exec the given argv directly (no shell).
|
inlinestatic |
["NONE"] — disable any healthcheck inherited from the image.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |