using StellaOps.Router.Common.Enums;
namespace StellaOps.Router.Common.Models;
///
/// Payload for the Heartbeat frame sent periodically by microservices.
///
public sealed record HeartbeatPayload
{
///
/// Gets the instance ID.
///
public required string InstanceId { get; init; }
///
/// Gets the health status.
///
public required InstanceHealthStatus Status { get; init; }
///
/// Gets the current in-flight request count.
///
public int InFlightRequestCount { get; init; }
///
/// Gets the error rate (0.0 to 1.0).
///
public double ErrorRate { get; init; }
///
/// Gets the timestamp when this heartbeat was created.
///
public DateTime TimestampUtc { get; init; } = DateTime.UtcNow;
}