5#include <userver/engine/deadline.hpp>
13 enum class ReadonlyMaster { kNotExpected, kExpected };
15 PostgresControl() =
default;
18 std::chrono::milliseconds execute_timeout,
19 std::chrono::milliseconds statement_timeout,
20 ReadonlyMaster readonly_master
23 [[
nodiscard]] engine::Deadline MakeExecuteDeadline(std::chrono::milliseconds duration)
const;
25 [[
nodiscard]] std::chrono::milliseconds MakeStatementTimeout(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};