Skip to content

Create a Negotiate pool service #3955

@seanmonstar

Description

@seanmonstar

In hyper-util, create a Negotiate type that uses an inner make-service, inspects the result, and then either returns an upgraded service, or fallback, depending on the negotiated. This is somewhat like a Router, but instead of routing on the request, it's routing on the response. It's an advanced form of an Either. The original use case is that of a connector that can sends ALPN to a destination, and can either comeback with HTTP/2 negotiated, or fallback to HTTP/1.

See more in the proposal at #3948.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions