Table of Contents

Class ClusterConfig

Namespace
Yarp.ReverseProxy.Configuration
Assembly
Yarp.ReverseProxy.dll

A cluster is a group of equivalent endpoints and associated policies.

public sealed record ClusterConfig : IEquatable<ClusterConfig>
Inheritance
ClusterConfig
Implements
Inherited Members

Constructors

ClusterConfig()

public ClusterConfig()

Properties

ClusterId

The Id for this cluster. This needs to be globally unique. This field is required.

public string ClusterId { get; init; }

Property Value

string

Destinations

The set of destinations associated with this cluster.

public IReadOnlyDictionary<string, DestinationConfig>? Destinations { get; init; }

Property Value

IReadOnlyDictionary<string, DestinationConfig>

HealthCheck

Health checking config.

public HealthCheckConfig? HealthCheck { get; init; }

Property Value

HealthCheckConfig

HttpClient

Config for the HTTP client that is used to call destinations in this cluster.

public HttpClientConfig? HttpClient { get; init; }

Property Value

HttpClientConfig

HttpRequest

Config for outgoing HTTP requests.

public ForwarderRequestConfig? HttpRequest { get; init; }

Property Value

ForwarderRequestConfig

LoadBalancingPolicy

Load balancing policy.

public string? LoadBalancingPolicy { get; init; }

Property Value

string

Metadata

Arbitrary key-value pairs that further describe this cluster.

public IReadOnlyDictionary<string, string>? Metadata { get; init; }

Property Value

IReadOnlyDictionary<string, string>

SessionAffinity

Session affinity config.

public SessionAffinityConfig? SessionAffinity { get; init; }

Property Value

SessionAffinityConfig

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(ClusterConfig?)

public bool Equals(ClusterConfig? other)

Parameters

other ClusterConfig

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

<Clone>$()

public ClusterConfig <Clone>$()

Returns

ClusterConfig

Operators

operator ==(ClusterConfig?, ClusterConfig?)

public static bool operator ==(ClusterConfig? left, ClusterConfig? right)

Parameters

left ClusterConfig
right ClusterConfig

Returns

bool

operator !=(ClusterConfig?, ClusterConfig?)

public static bool operator !=(ClusterConfig? left, ClusterConfig? right)

Parameters

left ClusterConfig
right ClusterConfig

Returns

bool