Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sliding window ratelimiter examples #2437

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ new ResiliencePipelineBuilder()
new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1)
}));
```
Expand Down
2 changes: 2 additions & 0 deletions docs/migration-v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ ResiliencePipeline pipeline = new ResiliencePipelineBuilder()
.AddRateLimiter(new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1),
}))
.Build();
Expand All @@ -479,6 +480,7 @@ ResiliencePipeline<HttpResponseMessage> pipelineT = new ResiliencePipelineBuilde
.AddRateLimiter(new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1),
}))
.Build();
Expand Down
1 change: 1 addition & 0 deletions docs/strategies/rate-limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ new ResiliencePipelineBuilder()
new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1)
}));
```
Expand Down
1 change: 1 addition & 0 deletions src/Polly.RateLimiting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ new ResiliencePipelineBuilder()
new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1)
}));
```
Expand Down
2 changes: 2 additions & 0 deletions src/Snippets/Docs/Migration.RateLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static void RateLimiter_V8()
.AddRateLimiter(new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1),
}))
.Build();
Expand All @@ -55,6 +56,7 @@ public static void RateLimiter_V8()
.AddRateLimiter(new SlidingWindowRateLimiter(new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1),
}))
.Build();
Expand Down
1 change: 1 addition & 0 deletions src/Snippets/Docs/RateLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static void Usage()
new SlidingWindowRateLimiterOptions
{
PermitLimit = 100,
SegmentsPerWindow = 4,
Window = TimeSpan.FromMinutes(1)
}));

Expand Down
Loading