|
testcontainers-cpp 0.2.0
Native C++20 Testcontainers over the Docker Engine API
|
Classes | |
| struct | BuildOptions |
| Options for POST /build — the knobs the Docker build endpoint accepts that we surface. More... | |
| struct | TransportTimeouts |
| Deadlines the transport layer applies to Docker daemon I/O, so a wedged daemon or a network black-hole fails with an error instead of blocking the calling thread forever. More... | |
Typedefs | |
| using | BuildLogConsumer = std::function<void(std::string_view)> |
| Receives decoded build output as the daemon emits it: one call per "stream" payload of the build progress (typically a single newline-terminated line, e.g. | |
| using | ByteSink = std::function<void(const char* data, std::size_t size)> |
| Receives successive blocks of a streamed body (up to ~64 KiB each). | |
| using | BodyProducer = std::function<void(const ByteSink& sink)> |
| Writes a request body incrementally: called once per request with the sink to push blocks into; returning ends the body. | |
| using testcontainers::docker::BuildLogConsumer = std::function<void(std::string_view)> |
Receives decoded build output as the daemon emits it: one call per "stream" payload of the build progress (typically a single newline-terminated line, e.g.
"Step 2/4 : RUN make\n" or a RUN step's own output). Called from the thread running the build. An empty function disables streaming delivery. An exception thrown by the consumer aborts the build read (the connection is closed) and propagates to the caller unchanged.
| using testcontainers::docker::ByteSink = std::function<void(const char* data, std::size_t size)> |
Receives successive blocks of a streamed body (up to ~64 KiB each).
Used on both directions: an upload producer writes blocks into one, a download call delivers response blocks through one. An exception thrown from the sink aborts the transfer and propagates to the caller unchanged.
| using testcontainers::docker::BodyProducer = std::function<void(const ByteSink& sink)> |
Writes a request body incrementally: called once per request with the sink to push blocks into; returning ends the body.
Each block goes onto the wire as one HTTP chunk (the request is sent with Transfer-Encoding: chunked, so the total size never needs to be known up front). An exception aborts the request and propagates unchanged.