Commit 521f9b9
committed
feat(cli): add tower-resilience integration framework
Implements Phase 1 of issue #446 - Tower resilience patterns infrastructure
## Changes
### Core Infrastructure
- Add tower-resilience dependency with circuitbreaker, retry, and ratelimiter features
- Create resilience.rs module with framework for wrapping API clients
- Add ResilienceConfig to profile configuration structure
- Add CLI flags for controlling resilience patterns
### CLI Flags
- --no-resilience: Disable all resilience patterns
- --no-circuit-breaker: Disable circuit breaker only
- --no-retry: Disable retry only
- --retry-attempts N: Override retry attempts
- --rate-limit N: Set rate limit (requests per minute)
### Configuration
- Profiles can now include resilience configuration
- Support for circuit breaker, retry, and rate limiting settings
- Configurable failure thresholds, timeouts, and backoff strategies
## Implementation Status
- Infrastructure and configuration: ✅ Complete
- Tower middleware integration: 🚧 TODO (awaiting stable tower-resilience API)
- The wrap_cloud_client() and wrap_enterprise_client() functions currently
pass through the service unchanged until tower-resilience API stabilizes
## Testing
- Added unit tests for configuration defaults and CLI overrides
- All existing tests pass
- Clippy and fmt checks pass
Next steps will implement the actual middleware once tower-resilience API is stable.1 parent ce1c8a5 commit 521f9b9
File tree
11 files changed
+613
-6
lines changed- crates
- redisctl-config/src
- redisctl
- src
- cli
- commands
- docs
11 files changed
+613
-6
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
460 | 463 | | |
461 | 464 | | |
462 | 465 | | |
| 466 | + | |
463 | 467 | | |
464 | 468 | | |
465 | 469 | | |
| |||
482 | 486 | | |
483 | 487 | | |
484 | 488 | | |
| 489 | + | |
485 | 490 | | |
486 | 491 | | |
487 | 492 | | |
| |||
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
| 624 | + | |
619 | 625 | | |
620 | 626 | | |
621 | 627 | | |
| |||
646 | 652 | | |
647 | 653 | | |
648 | 654 | | |
| 655 | + | |
649 | 656 | | |
650 | 657 | | |
651 | 658 | | |
| |||
676 | 683 | | |
677 | 684 | | |
678 | 685 | | |
| 686 | + | |
679 | 687 | | |
680 | 688 | | |
681 | 689 | | |
| |||
690 | 698 | | |
691 | 699 | | |
692 | 700 | | |
| 701 | + | |
693 | 702 | | |
694 | 703 | | |
695 | 704 | | |
| |||
729 | 738 | | |
730 | 739 | | |
731 | 740 | | |
| 741 | + | |
732 | 742 | | |
733 | 743 | | |
734 | 744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
72 | 92 | | |
73 | 93 | | |
74 | 94 | | |
| |||
0 commit comments