Table of Contents

Class DestinationState

Namespace
Yarp.ReverseProxy.Model
Assembly
Yarp.ReverseProxy.dll

Representation of a cluster's destination for use at runtime.

public sealed class DestinationState : IReadOnlyList<DestinationState>, IReadOnlyCollection<DestinationState>, IEnumerable<DestinationState>, IEnumerable
Inheritance
DestinationState
Implements
Inherited Members

Constructors

DestinationState(string)

Creates a new instance. This constructor is for tests and infrastructure, this type is normally constructed by the configuration loading infrastructure.

public DestinationState(string destinationId)

Parameters

destinationId string

DestinationState(string, DestinationModel)

Constructor overload to additionally initialize the DestinationModel for tests and infrastructure, such as updating the ReverseProxyFeature via HttpContextFeaturesExtensions

public DestinationState(string destinationId, DestinationModel model)

Parameters

destinationId string
model DestinationModel

Exceptions

ArgumentNullException

model is null.

Properties

ConcurrentRequestCount

Keeps track of the total number of concurrent requests on this endpoint. The setter should only be used for testing purposes.

public int ConcurrentRequestCount { get; set; }

Property Value

int

DestinationId

The destination's unique id.

public string DestinationId { get; }

Property Value

string

Health

Mutable health state for this destination.

public DestinationHealthState Health { get; }

Property Value

DestinationHealthState

Model

A snapshot of the current configuration

public DestinationModel Model { get; }

Property Value

DestinationModel