5#include <userver/engine/deadline.hpp>
13 enum class ReadonlyMaster { kNotExpected, kExpected };
15 PostgresControl() =
default;
17 PostgresControl(std::chrono::milliseconds execute_timeout,
18 std::chrono::milliseconds statement_timeout,
19 ReadonlyMaster readonly_master);
21 [[
nodiscard]] engine::Deadline MakeExecuteDeadline(
22 std::chrono::milliseconds duration)
const;
24 [[
nodiscard]] std::chrono::milliseconds MakeStatementTimeout(
25 std::chrono::milliseconds duration)
const;
27 bool IsReadonlyMasterExpected()
const;
30 std::chrono::milliseconds execute_timeout_{};
31 std::chrono::milliseconds statement_timeout_{};
32 bool is_readonly_master_expected_{
false};