Interface IDestinationHealthUpdater
- Namespace
- Yarp.ReverseProxy.Health
- Assembly
- Yarp.ReverseProxy.dll
Updates destinations' health states when it's requested by a health check policy while taking into account not only the new evaluated value but also the overall current cluster's health state.
public interface IDestinationHealthUpdater
Methods
SetActive(ClusterState, IEnumerable<NewActiveDestinationHealth>)
Sets the active health values on the given destinations.
void SetActive(ClusterState cluster, IEnumerable<NewActiveDestinationHealth> newHealthStates)
Parameters
cluster
ClusterStateCluster.
newHealthStates
IEnumerable<NewActiveDestinationHealth>New active health states.
SetPassive(ClusterState, DestinationState, DestinationHealth, TimeSpan)
Sets the passive health on the given destination
.
void SetPassive(ClusterState cluster, DestinationState destination, DestinationHealth newHealth, TimeSpan reactivationPeriod)
Parameters
cluster
ClusterStateCluster.
destination
DestinationStateDestination.
newHealth
DestinationHealthNew passive health value.
reactivationPeriod
TimeSpanIf
newHealth
is Unhealthy, this parameter specifies a reactivation period after which the destination's Passive value will be reset to Unknown. Otherwise, it's not used.