summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/source_tree_client.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r--src/buildtool/serve_api/remote/source_tree_client.hpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/buildtool/serve_api/remote/source_tree_client.hpp b/src/buildtool/serve_api/remote/source_tree_client.hpp
index 9eeef493..fdfd99f8 100644
--- a/src/buildtool/serve_api/remote/source_tree_client.hpp
+++ b/src/buildtool/serve_api/remote/source_tree_client.hpp
@@ -45,7 +45,8 @@ class SourceTreeClient {
/// at index 1 the tree identifier on success.
[[nodiscard]] auto ServeCommitTree(std::string const& commit_id,
std::string const& subdir,
- bool sync_tree) noexcept -> result_t;
+ bool sync_tree) const noexcept
+ -> result_t;
/// \brief Retrieve the Git tree of an archive content, if known by the
/// endpoint. It is a fatal error if the content blob is known to the
@@ -64,7 +65,7 @@ class SourceTreeClient {
std::string const& archive_type,
std::string const& subdir,
std::optional<PragmaSpecial> const& resolve_symlinks,
- bool sync_tree) noexcept -> result_t;
+ bool sync_tree) const noexcept -> result_t;
/// \brief Retrieve the Git tree of a directory of distfiles, if all the
/// content blobs are known by the endpoint. It is a fatal error if all
@@ -78,35 +79,36 @@ class SourceTreeClient {
[[nodiscard]] auto ServeDistdirTree(
std::shared_ptr<std::unordered_map<std::string, std::string>> const&
distfiles,
- bool sync_tree) noexcept -> result_t;
+ bool sync_tree) const noexcept -> result_t;
/// \brief Retrieve the Git tree of a foreign-file directory, if all content
/// blobs are known to the end point and, as a side effect, make that tree
/// known to the serve endpoint.
[[nodiscard]] auto ServeForeignFileTree(const std::string& content,
const std::string& name,
- bool executable) noexcept
+ bool executable) const noexcept
-> result_t;
/// \brief Make a given content blob available in remote CAS, if known by
/// serve remote.
/// \param[in] content Hash of the archive content to look up.
/// \returns Flag to state whether content is in remote CAS.
- [[nodiscard]] auto ServeContent(std::string const& content) noexcept
+ [[nodiscard]] auto ServeContent(std::string const& content) const noexcept
-> bool;
/// \brief Make a given tree available in remote CAS, if known by serve
/// remote.
/// \param[in] tree_id Identifier of the Git tree to look up.
/// \returns Flag to state whether tree is in remote CAS.
- [[nodiscard]] auto ServeTree(std::string const& tree_id) noexcept -> bool;
+ [[nodiscard]] auto ServeTree(std::string const& tree_id) const noexcept
+ -> bool;
/// \brief Checks if the serve endpoint has a given tree locally available
/// and makes it available for a serve-orchestrated build.
/// \param[in] tree_id Identifier of the Git tree to look up.
/// \returns Flag to state whether tree is known or not, or nullopt on
/// errors.
- [[nodiscard]] auto CheckRootTree(std::string const& tree_id) noexcept
+ [[nodiscard]] auto CheckRootTree(std::string const& tree_id) const noexcept
-> std::optional<bool>;
/// \brief Retrieve tree from the CAS of the associated remote-execution
@@ -114,7 +116,7 @@ class SourceTreeClient {
/// \param[in] tree_id Identifier of the Git tree to retrieve.
/// \returns Flag to state whether tree was successfully imported into the
/// local Git storage or not.
- [[nodiscard]] auto GetRemoteTree(std::string const& tree_id) noexcept
+ [[nodiscard]] auto GetRemoteTree(std::string const& tree_id) const noexcept
-> bool;
private: