Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[API Proposal]: HttpKey usage #7535

Open
Labels

Description

Background and motivation

Re: Microsoft.Extensions.Http.Resilience, Microsoft.Extensions.DependencyInjection

So HttpKey is currently not a public API member. When registering resilience handlers on an IHttpClientBuilder using the AddResilienceHandler extension, it creates an HttpResiliencePipelineBuilder by calling AddHttpResiliencePipeline<HttpKey, HttpResponseMessage>.

AFAICT all documentation that deals with "advanced" scenarios, like executing a pipeline using ExecuteAsync with a given ResilienceContext, requires a ResiliencePipelineProvider or ResiliencePipelineRegistry with a key type of string. When using DI to request such a provider, it is not currently possible to reference a type of ResiliencePipelineProvider<HttpKey> because HttpKey is an internal type.

API Proposal

internal readonly record struct HttpKey(string Name, string InstanceName)

should be

public readonly record struct HttpKey(string Name, string InstanceName)

API Usage

ResiliencePipelineProvider<HttpKey> theRegisteredProvider,

Alternative Designs

Provide guidance on how to accomplish advanced scenarios when using AddResilienceHandler

Risks

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /