Class ClusterState
Representation of a cluster for use at runtime.
Inheritance
Namespace: Yarp.ReverseProxy.Model
Assembly: Yarp.ReverseProxy.dll
Syntax
public sealed class ClusterState : object
Constructors
| Improve this Doc View SourceClusterState(String)
Creates a new instance. This constructor is for tests and infrastructure, this type is normally constructed by the configuration loading infrastructure.
Declaration
public ClusterState(string clusterId)
Parameters
Type | Name | Description |
---|---|---|
System.String | clusterId |
ClusterState(String, ClusterModel)
Constructor overload to additionally initialize the ClusterModel for tests and infrastructure, such as updating the ReverseProxyFeature via HttpContextFeaturesExtensions
Declaration
public ClusterState(string clusterId, ClusterModel model)
Parameters
Type | Name | Description |
---|---|---|
System.String | clusterId | |
ClusterModel | model |
Properties
| Improve this Doc View SourceClusterId
The cluster's unique id.
Declaration
public string ClusterId { get; }
Property Value
Type | Description |
---|---|
System.String |
Destinations
All the destinations associated with this cluster. This collection is populated by the configuration system and should only be directly modified in a test environment. Call IClusterDestinationsUpdater after modifying this collection.
Declaration
public ConcurrentDictionary<string, DestinationState> Destinations { get; }
Property Value
Type | Description |
---|---|
ConcurrentDictionary<System.String, DestinationState> |
DestinationsState
Stores the state of cluster's destinations that can change atomically in reaction to runtime state changes (e.g. changes of destinations' health).
Declaration
public ClusterDestinationsState DestinationsState { get; set; }
Property Value
Type | Description |
---|---|
ClusterDestinationsState |
Model
Encapsulates parts of a cluster that can change atomically in reaction to config changes.
Declaration
public ClusterModel Model { get; }
Property Value
Type | Description |
---|---|
ClusterModel |