summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/remote/config.hpp')
-rw-r--r--src/buildtool/execution_api/remote/config.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/remote/config.hpp b/src/buildtool/execution_api/remote/config.hpp
index b10c3b23..0b028035 100644
--- a/src/buildtool/execution_api/remote/config.hpp
+++ b/src/buildtool/execution_api/remote/config.hpp
@@ -23,6 +23,9 @@
#include <string>
#include <utility>
+#include <fmt/core.h>
+#include <nlohmann/json.hpp>
+
#include "gsl/gsl"
#include "src/buildtool/logging/logger.hpp"
#include "src/utils/cpp/type_safe_arithmetic.hpp"
@@ -61,6 +64,10 @@ class RemoteExecutionConfig {
struct ServerAddress {
std::string host{};
Port port{};
+
+ [[nodiscard]] auto ToJson() const noexcept -> nlohmann::json {
+ return nlohmann::json{fmt::format("{}:{}", host, port)};
+ }
};
// Obtain global instance