Class HttpEndpointRoutingOptions

Namespace
Kevlar.Extensions.Http
Assembly
Kevlar.Extensions.Http.dll

Configures alternate authorities for retry and hedge attempts.

public sealed class HttpEndpointRoutingOptions
Inheritance
HttpEndpointRoutingOptions
Inherited Members

Remarks

The endpoint list and scalar values are snapshotted with the handler options.

Constructors

HttpEndpointRoutingOptions()

public HttpEndpointRoutingOptions()

Properties

EndpointProvider

Optionally resolves the endpoint authorities once for each request.

public Func<HttpRequestMessage, CancellationToken, ValueTask<IReadOnlyList<HttpEndpoint>>>? EndpointProvider { get; set; }

Property Value

Func<HttpRequestMessage, CancellationToken, ValueTask<IReadOnlyList<HttpEndpoint>>>

Remarks

Replaces Endpoints when set. An empty result uses the request's own authority. The provider owns caching and must support concurrent requests. The returned list must remain stable while the handler snapshots its ordering. Resolution receives the linked request cancellation token and runs before the shield, outside its timeout budgets. A null list or null endpoint is invalid.

Endpoints

The static endpoint authorities, used when EndpointProvider is not set.

public IList<HttpEndpoint> Endpoints { get; }

Property Value

IList<HttpEndpoint>

Seed

The optional deterministic seed used by weighted ordering. A null value selects a random initial order.

public int? Seed { get; set; }

Property Value

int?

SelectionMode

The endpoint ordering algorithm.

public HttpEndpointSelectionMode SelectionMode { get; set; }

Property Value

HttpEndpointSelectionMode

ShieldFactory

Optionally creates a shield whose breaker or limiter state is isolated to one authority. The factory is called once per authority per handler.

public Func<Uri, Shield<HttpResponseMessage>>? ShieldFactory { get; set; }

Property Value

Func<Uri, Shield<HttpResponseMessage>>