Skip to content

feat(utils): add retry middleware with exponential backoff#130

Open
shivv23 wants to merge 1 commit intoc2siorg:mainfrom
shivv23:feat/retry-middleware
Open

feat(utils): add retry middleware with exponential backoff#130
shivv23 wants to merge 1 commit intoc2siorg:mainfrom
shivv23:feat/retry-middleware

Conversation

@shivv23
Copy link
Copy Markdown

@shivv23 shivv23 commented Apr 3, 2026

Summary

Add retry logic with exponential backoff for API calls.

Why

Cloud APIs can fail due to network issues or rate limits. Retry logic improves reliability.

What

  • retry() function for automatic retries
  • Exponential backoff with configurable delay
  • Respects CloudError retryable flag

Usage

use rustcloud::utils::retry::{retry, RetryConfig};

let result = retry(RetryConfig::new(3), || async {
    client.request().await
}).await?;

Files

  • rustcloud/src/utils/retry.rs

@shivv23 shivv23 force-pushed the feat/retry-middleware branch from 8084b2f to 4c0c3a2 Compare April 7, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant