Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (deploy) (push) Successful in 4m8s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 18m9s
Foundation / checks (client) (push) Canceled after 18m8s
Foundation / checks (network) (push) Canceled after 18m7s
Foundation / checks (tsan) (push) Canceled after 15m39s
Foundation / checks (postgres) (push) Canceled after 18m13s
27 lines
749 B
C++
27 lines
749 B
C++
#pragma once
|
|
|
|
// Test-only opaque TCP relay. TLS remains end-to-end between libpq and PostgreSQL.
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace evo::test {
|
|
class PostgresRelay {
|
|
public:
|
|
explicit PostgresRelay(std::uint16_t backend_port);
|
|
~PostgresRelay();
|
|
PostgresRelay(const PostgresRelay&) = delete;
|
|
PostgresRelay& operator=(const PostgresRelay&) = delete;
|
|
[[nodiscard]] std::string port() const;
|
|
void drop_requests(bool);
|
|
void drop_responses(bool);
|
|
[[nodiscard]] std::uint64_t dropped_requests() const;
|
|
[[nodiscard]] std::uint64_t dropped_responses() const;
|
|
[[nodiscard]] bool healthy() const;
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> impl_;
|
|
};
|
|
} // namespace evo::test
|