Class SessionAffinityConfig
- Namespace
- Yarp.ReverseProxy.Configuration
- Assembly
- Yarp.ReverseProxy.dll
Session affinity options.
public sealed record SessionAffinityConfig : IEquatable<SessionAffinityConfig>
- Inheritance
-
SessionAffinityConfig
- Implements
- Inherited Members
Constructors
SessionAffinityConfig()
public SessionAffinityConfig()
Properties
AffinityKeyName
Identifies the name of the field where the affinity value is stored. For the cookie affinity policy this will be the cookie name. For the header affinity policy this will be the header name. The policy will give its own default if no value is set. This value should be unique across clusters to avoid affinity conflicts. https://github.com/microsoft/reverse-proxy/issues/976 This field is required.
public string AffinityKeyName { get; init; }
Property Value
Cookie
Configuration of a cookie storing the session affinity key in case the Policy is set to 'Cookie'.
public SessionAffinityCookieConfig? Cookie { get; init; }
Property Value
Enabled
Indicates whether session affinity is enabled.
public bool? Enabled { get; init; }
Property Value
- bool?
FailurePolicy
Strategy handling missing destination for an affinitized request.
public string? FailurePolicy { get; init; }
Property Value
Policy
The session affinity policy to use.
public string? Policy { get; init; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
Equals(SessionAffinityConfig?)
public bool Equals(SessionAffinityConfig? other)
Parameters
other
SessionAffinityConfig
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
<Clone>$()
public SessionAffinityConfig <Clone>$()
Returns
Operators
operator ==(SessionAffinityConfig?, SessionAffinityConfig?)
public static bool operator ==(SessionAffinityConfig? left, SessionAffinityConfig? right)
Parameters
left
SessionAffinityConfigright
SessionAffinityConfig
Returns
operator !=(SessionAffinityConfig?, SessionAffinityConfig?)
public static bool operator !=(SessionAffinityConfig? left, SessionAffinityConfig? right)
Parameters
left
SessionAffinityConfigright
SessionAffinityConfig