qos: add timeout to service level info

Service level information now consists of the timeout config,
which stores the timeout value for all operations.
This commit is contained in:
Piotr Sarna
2021-01-07 16:48:08 +01:00
parent ef8da7930f
commit 3339ea1d0d

View File

@@ -26,8 +26,8 @@
#include <seastar/core/print.hh>
#include <map>
#include <stdexcept>
#include <variant>
#include <seastar/core/lowres_clock.hh>
namespace qos {
@@ -36,6 +36,17 @@ namespace qos {
* a service level.
*/
struct service_level_options {
struct unset_marker {
bool operator==(const unset_marker&) const { return true; };
bool operator!=(const unset_marker&) const { return false; };
};
struct delete_marker {
bool operator==(const delete_marker&) const { return true; };
bool operator!=(const delete_marker&) const { return false; };
};
std::variant<unset_marker, delete_marker, lowres_clock::duration> timeout = unset_marker{};
bool operator==(const service_level_options& other) const = default;
bool operator!=(const service_level_options& other) const = default;
};