Files
scylladb/utils/s3/default_aws_retry_strategy.hh
Ernest Zaslavsky 524737a579 retry_strategy: introduce Seastar-based retry strategy
Add a new class derived from Seastar's `default_retry_strategy`.
Relocate the `should_retry` implementation from Scylla's
`default_retry_strategy` into the new class to centralize and
standardize retry behavior.
2025-10-23 15:49:34 +03:00

27 lines
551 B
C++

/*
* Copyright (C) 2024-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
#pragma once
#include <seastar/http/retry_strategy.hh>
namespace aws {
class aws_error;
class default_aws_retry_strategy : public seastar::http::experimental::retry_strategy {
protected:
unsigned _max_retries;
public:
explicit default_aws_retry_strategy(unsigned max_retries = 10);
seastar::future<bool> should_retry(std::exception_ptr error, unsigned attempted_retries) const override;
};
} // namespace aws