summaryrefslogtreecommitdiff
path: root/src/buildtool/common/cli.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-09-08 11:24:26 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-09-13 16:14:43 +0200
commitf48e1ebe7f08159004bf9a88d5a9e474ff32dbb1 (patch)
tree4aba2f8ca184b63696db44797e3ac2cda7ca2db2 /src/buildtool/common/cli.hpp
parentf142997cd581628681353eff9484e56840b3c572 (diff)
downloadjustbuild-f48e1ebe7f08159004bf9a88d5a9e474ff32dbb1.tar.gz
just serve: Add endpoint arguments
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r--src/buildtool/common/cli.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index c90e54f9..a1438400 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -160,6 +160,7 @@ struct ServiceArguments {
struct ServeArguments {
std::filesystem::path config{};
+ std::optional<std::string> remote_serve_address{};
// repositories populated from just-serve config file
std::vector<std::filesystem::path> repositories{};
};
@@ -403,6 +404,15 @@ static inline auto SetupEndpointArguments(
->expected(1, 1);
}
+static inline auto SetupServeEndpointArguments(
+ gsl::not_null<CLI::App*> const& app,
+ gsl::not_null<ServeArguments*> const& clargs) {
+ app->add_option("--remote-serve-address",
+ clargs->remote_serve_address,
+ "Address of the serve service.")
+ ->type_name("NAME:PORT");
+}
+
static inline auto SetupCommonBuildArguments(
gsl::not_null<CLI::App*> const& app,
gsl::not_null<BuildArguments*> const& clargs) {