Skip to content

Commit

Permalink
Migration guide from v7 to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Sep 19, 2023
1 parent 73a0848 commit 48f7190
Show file tree
Hide file tree
Showing 32 changed files with 941 additions and 45 deletions.
10 changes: 5 additions & 5 deletions README_V8.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Visit [resilience strategies](docs/resilience-strategies.md) docs to explore how
<!-- snippet: retry -->
```cs
// Add retry using the default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/retry.md#defaults for default values.
// See https://www.pollydocs.org/strategies/retry#defaults for defaults.
new ResiliencePipelineBuilder().AddRetry(new RetryStrategyOptions());

// For instant retries with no delay
Expand Down Expand Up @@ -208,7 +208,7 @@ If all retries fail, a retry strategy rethrows the final exception back to the c
<!-- snippet: circuit-breaker -->
```cs
// Add circuit breaker with default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/circuit-breaker.md#defaults for default values.
// See https://www.pollydocs.org/strategies/circuit-breaker#defaults for defaults.
new ResiliencePipelineBuilder().AddCircuitBreaker(new CircuitBreakerStrategyOptions());

// Add circuit breaker with customized options:
Expand Down Expand Up @@ -320,7 +320,7 @@ For more details, refer to the [Fallback documentation](docs/strategies/fallback
<!-- snippet: Hedging -->
```cs
// Add hedging with default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/hedging.md#defaults for default values.
// See https://www.pollydocs.org/strategies/hedging#defaults for defaults.
new ResiliencePipelineBuilder<HttpResponseMessage>()
.AddHedging(new HedgingStrategyOptions<HttpResponseMessage>());

Expand Down Expand Up @@ -366,7 +366,7 @@ The timeout resilience strategy assumes delegates you execute support [co-operat
<!-- snippet: timeout -->
```cs
// Add timeout using the default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/timeout.md#defaults for default values.
// See https://www.pollydocs.org/strategies/timeout#defaults for defaults.
new ResiliencePipelineBuilder()
.AddTimeout(new TimeoutStrategyOptions());

Expand Down Expand Up @@ -410,7 +410,7 @@ Timeout strategies throw `TimeoutRejectedException` when a timeout occurs. For m
<!-- snippet: rate-limiter -->
```cs
// Add rate limiter with default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/rate-limiter.md#defaults for default values.
// See https://www.pollydocs.org/strategies/rate-limiter#defaults for defaults.
new ResiliencePipelineBuilder()
.AddRateLimiter(new RateLimiterStrategyOptions());

Expand Down
4 changes: 3 additions & 1 deletion docs/advanced/resilience-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Below is an example demonstrating how to work with `ResilienceContext`:
ResilienceContext context = ResilienceContextPool.Shared.Get(cancellationToken);

// Attach custom data to the context
context.Properties.Set(MyResilienceKeys.Key1, "my-data");
context.Properties.Set(MyResilienceKeys.Key2, 123);

Expand Down Expand Up @@ -69,6 +68,9 @@ public static class MyResilienceKeys
```
<!-- endSnippet -->

> [!NOTE]
> We recommend defining a static class to hold the resilience property keys used in your project. This approach makes these keys easier to discover and maintain. For simpler scenarios, you can directly use the creation of `ResiliencePropertyKey<string>` since it's a cheap, struct-based API.
## Resilient context pooling

<!-- Overview -->
Expand Down
Loading

0 comments on commit 48f7190

Please sign in to comment.