3#include "rpc/common/APIVersion.hpp"
4#include "util/config/ObjectView.hpp"
5#include "util/log/Logger.hpp"
7#include <boost/json/object.hpp>
18 uint32_t defaultVersion_;
23 ProductionAPIVersionParser(
31 std::expected<uint32_t, std::string>
32 parse(boost::json::object
const& request)
const override;
35 getDefaultVersion()
const
37 return defaultVersion_;
A baseclass for API version helper.
Definition APIVersion.hpp:29
std::expected< uint32_t, std::string > parse(boost::json::object const &request) const override
Extracts API version information from a JSON object.
Definition APIVersionParser.cpp:39
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:77
Provides a view into a subset of configuration data defined by a prefix.
Definition ObjectView.hpp:21
static constexpr uint32_t kAPI_VERSION_MIN
Minimum API version supported by this build.
Definition APIVersion.hpp:19
static constexpr uint32_t kAPI_VERSION_MAX
Maximum API version supported by this build.
Definition APIVersion.hpp:24
static constexpr uint32_t kAPI_VERSION_DEFAULT
Default API version to use if no version is specified by clients.
Definition APIVersion.hpp:14