summaryrefslogtreecommitdiff
path: root/src/buildtool/common/remote/retry.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-16 15:51:24 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-19 09:50:37 +0200
commit953fc900629dd2b04c509b4f953e75dd351e09d9 (patch)
tree074258da62e9c2d58cd4998ba9f1ac0e595d1cc8 /src/buildtool/common/remote/retry.hpp
parent2361355beb80685157b2a0cf6f79c14e010a00de (diff)
downloadjustbuild-953fc900629dd2b04c509b4f953e75dd351e09d9.tar.gz
Pass RetryConfig instance to WithRetry
Diffstat (limited to 'src/buildtool/common/remote/retry.hpp')
-rw-r--r--src/buildtool/common/remote/retry.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildtool/common/remote/retry.hpp b/src/buildtool/common/remote/retry.hpp
index c0ce318b..6b8278a4 100644
--- a/src/buildtool/common/remote/retry.hpp
+++ b/src/buildtool/common/remote/retry.hpp
@@ -23,6 +23,7 @@
#include <utility>
#include "grpcpp/grpcpp.h"
+#include "src/buildtool/common/remote/retry_config.hpp"
#include "src/buildtool/logging/logger.hpp"
// Utility class to help detecting when exit the retry loop. This class can be
@@ -51,6 +52,7 @@ using CallableReturningRetryResponse = std::function<RetryResponse(void)>;
/// Retry loop interrupts when one of the two members of the function's returned
/// RetryResponse object is set to true.
[[nodiscard]] auto WithRetry(CallableReturningRetryResponse const& f,
+ RetryConfig const& retry_config,
Logger const& logger) noexcept -> bool;
using CallableReturningGrpcStatus = std::function<grpc::Status(void)>;
@@ -59,6 +61,7 @@ using CallableReturningGrpcStatus = std::function<grpc::Status(void)>;
/// Retry loop interrupts when function returns an error code different from
/// UNAVAILABLE.
[[nodiscard]] auto WithRetry(CallableReturningGrpcStatus const& f,
+ RetryConfig const& retry_config,
Logger const& logger) noexcept
-> std::pair<bool, grpc::Status>;