שתף באמצעות


ResilienceHttpClientBuilderExtensions.AddStandardHedgingHandler Method

Definition

Overloads

AddStandardHedgingHandler(IHttpClientBuilder)

Adds a standard hedging handler that wraps the execution of the request with a standard hedging mechanism.

AddStandardHedgingHandler(IHttpClientBuilder, Action<IRoutingStrategyBuilder>)

Adds a standard hedging handler that wraps the execution of the request with a standard hedging mechanism.

AddStandardHedgingHandler(IHttpClientBuilder)

Source:
ResilienceHttpClientBuilderExtensions.Hedging.cs
Source:
ResilienceHttpClientBuilderExtensions.Hedging.cs

Adds a standard hedging handler that wraps the execution of the request with a standard hedging mechanism.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Http::Resilience::IStandardHedgingHandlerBuilder ^ AddStandardHedgingHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder);
public static Microsoft.Extensions.Http.Resilience.IStandardHedgingHandlerBuilder AddStandardHedgingHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder);
static member AddStandardHedgingHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder -> Microsoft.Extensions.Http.Resilience.IStandardHedgingHandlerBuilder
<Extension()>
Public Function AddStandardHedgingHandler (builder As IHttpClientBuilder) As IStandardHedgingHandlerBuilder

Parameters

builder
IHttpClientBuilder

The HTTP client builder.

Returns

A IStandardHedgingHandlerBuilder instance that can be used to configure the standard hedging behavior.

Remarks

The standard hedging uses a pool of circuit breakers to ensure that unhealthy endpoints are not hedged against. By default, the selection from pool is based on the URL Authority (scheme + host + port). It is recommended that you configure the way the strategies are selected by calling SelectPipelineByAuthority(IStandardHedgingHandlerBuilder) extensions.

See HttpStandardHedgingResilienceOptions for more details about the used resilience strategies.

Applies to

AddStandardHedgingHandler(IHttpClientBuilder, Action<IRoutingStrategyBuilder>)

Source:
ResilienceHttpClientBuilderExtensions.Hedging.cs
Source:
ResilienceHttpClientBuilderExtensions.Hedging.cs

Adds a standard hedging handler that wraps the execution of the request with a standard hedging mechanism.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Http::Resilience::IStandardHedgingHandlerBuilder ^ AddStandardHedgingHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Action<Microsoft::Extensions::Http::Resilience::IRoutingStrategyBuilder ^> ^ configure);
public static Microsoft.Extensions.Http.Resilience.IStandardHedgingHandlerBuilder AddStandardHedgingHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<Microsoft.Extensions.Http.Resilience.IRoutingStrategyBuilder> configure);
static member AddStandardHedgingHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Action<Microsoft.Extensions.Http.Resilience.IRoutingStrategyBuilder> -> Microsoft.Extensions.Http.Resilience.IStandardHedgingHandlerBuilder
<Extension()>
Public Function AddStandardHedgingHandler (builder As IHttpClientBuilder, configure As Action(Of IRoutingStrategyBuilder)) As IStandardHedgingHandlerBuilder

Parameters

builder
IHttpClientBuilder

The HTTP client builder.

configure
Action<IRoutingStrategyBuilder>

Configures the routing strategy associated with this handler.

Returns

A IStandardHedgingHandlerBuilder instance that can be used to configure the standard hedging behavior.

Remarks

The standard hedging uses a pool of circuit breakers to ensure that unhealthy endpoints are not hedged against. By default, the selection from pool is based on the URL Authority (scheme + host + port). It is recommended that you configure the way the strategies are selected by calling SelectPipelineByAuthority(IStandardHedgingHandlerBuilder) extensions.

See HttpStandardHedgingResilienceOptions for more details about the used resilience strategies.

Applies to