summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/source_tree_client.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-02-29 15:17:26 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-02-29 15:57:17 +0100
commite8a9df96a084dc8c34d928a63e8fedbcb2eec9b6 (patch)
tree30976722418f87b620441e4698590108e56f25bb /src/buildtool/serve_api/remote/source_tree_client.hpp
parenta0e21b45baac40462089d7b80faa33ebabe7b010 (diff)
downloadjustbuild-e8a9df96a084dc8c34d928a63e8fedbcb2eec9b6.tar.gz
just-mr and serve: Extend use of noexcept specifier
The just serve client-side and API methods, as well as just-mr utilities should use the noexcept specifier.
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r--src/buildtool/serve_api/remote/source_tree_client.hpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/buildtool/serve_api/remote/source_tree_client.hpp b/src/buildtool/serve_api/remote/source_tree_client.hpp
index 24b2654a..46b17081 100644
--- a/src/buildtool/serve_api/remote/source_tree_client.hpp
+++ b/src/buildtool/serve_api/remote/source_tree_client.hpp
@@ -44,7 +44,7 @@ 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) -> result_t;
+ bool sync_tree) 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
@@ -63,7 +63,7 @@ class SourceTreeClient {
std::string const& archive_type,
std::string const& subdir,
std::optional<PragmaSpecial> const& resolve_symlinks,
- bool sync_tree) -> result_t;
+ bool sync_tree) 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
@@ -77,26 +77,27 @@ class SourceTreeClient {
[[nodiscard]] auto ServeDistdirTree(
std::shared_ptr<std::unordered_map<std::string, std::string>> const&
distfiles,
- bool sync_tree) -> result_t;
+ bool sync_tree) 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) -> bool;
+ [[nodiscard]] auto ServeContent(std::string const& content) 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) -> bool;
+ [[nodiscard]] auto ServeTree(std::string const& tree_id) 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)
+ [[nodiscard]] auto CheckRootTree(std::string const& tree_id) noexcept
-> std::optional<bool>;
/// \brief Retrieve tree from the CAS of the associated remote-execution
@@ -104,7 +105,8 @@ 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) -> bool;
+ [[nodiscard]] auto GetRemoteTree(std::string const& tree_id) noexcept
+ -> bool;
private:
std::unique_ptr<justbuild::just_serve::SourceTree::Stub> stub_;