From f48e1ebe7f08159004bf9a88d5a9e474ff32dbb1 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 8 Sep 2023 11:24:26 +0200 Subject: just serve: Add endpoint arguments --- src/buildtool/common/cli.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/buildtool/common/cli.hpp') 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 remote_serve_address{}; // repositories populated from just-serve config file std::vector repositories{}; }; @@ -403,6 +404,15 @@ static inline auto SetupEndpointArguments( ->expected(1, 1); } +static inline auto SetupServeEndpointArguments( + gsl::not_null const& app, + gsl::not_null 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 const& app, gsl::not_null const& clargs) { -- cgit v1.2.3