Table of Contents

Enum HealthState

Namespace
LMKit.Agents.Resilience
Assembly
LM-Kit.NET.dll

The health state of an agent.

public enum HealthState

Fields

Unknown = 0

Health status is unknown (no data).

Healthy = 1

Agent is healthy and performing well.

Degraded = 2

Agent is degraded but still functional.

Unhealthy = 3

Agent is unhealthy and may not be functional.

Examples

Routing only to healthy agents in a load-balancer:

using LMKit.Agents.Resilience;

var liveAgents = monitoredAgents.Where(a => a.HealthCheck.Current.Status == HealthState.Healthy).ToList(); var pick = liveAgents[Random.Shared.Next(liveAgents.Count)];

Share