diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-27 12:22:09 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 12:58:35 +0200 |
commit | f82adab238f4b45d43049687c8e52bf7372ba053 (patch) | |
tree | f09ba0ef72ef1c13122233960759cd5b938249d5 /src/buildtool/serve_api/remote/serve_api.hpp | |
parent | 5bc6265b2ffe43370b4cddd0a9e4c09b059ef131 (diff) | |
download | justbuild-f82adab238f4b45d43049687c8e52bf7372ba053.tar.gz |
Pass StorageConfig and Storage to Serve
Diffstat (limited to 'src/buildtool/serve_api/remote/serve_api.hpp')
-rw-r--r-- | src/buildtool/serve_api/remote/serve_api.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buildtool/serve_api/remote/serve_api.hpp b/src/buildtool/serve_api/remote/serve_api.hpp index 3374e6aa..fd455037 100644 --- a/src/buildtool/serve_api/remote/serve_api.hpp +++ b/src/buildtool/serve_api/remote/serve_api.hpp @@ -36,14 +36,16 @@ class ServeApi final {}; #include "src/buildtool/serve_api/remote/configuration_client.hpp" #include "src/buildtool/serve_api/remote/source_tree_client.hpp" #include "src/buildtool/serve_api/remote/target_client.hpp" +#include "src/buildtool/storage/storage.hpp" #include "src/utils/cpp/expected.hpp" class ServeApi final { public: explicit ServeApi(ServerAddress const& address, + gsl::not_null<Storage const*> const& storage, gsl::not_null<ApiBundle const*> const& apis) noexcept : stc_{address, &apis->auth}, - tc_{address, apis}, + tc_{address, storage, apis}, cc_{address, &apis->auth} {} ~ServeApi() noexcept = default; @@ -54,11 +56,12 @@ class ServeApi final { [[nodiscard]] static auto Create( RemoteServeConfig const& serve_config, + gsl::not_null<Storage const*> const& storage, gsl::not_null<ApiBundle const*> const& apis) noexcept -> std::optional<ServeApi> { if (serve_config.remote_address) { - return std::make_optional<ServeApi>(*serve_config.remote_address, - apis); + return std::make_optional<ServeApi>( + *serve_config.remote_address, storage, apis); } return std::nullopt; } |