Introduce GatewayRegistrationResyncService to recover stale registrations, extract IGatewayTransportClient interface, add EndpointsUpdate and RegistrationResyncRequest frame types, and expand transport test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using StellaOps.Router.Common.Enums;
|
|
|
|
namespace StellaOps.Router.Common.Models;
|
|
|
|
/// <summary>
|
|
/// Payload for the Heartbeat frame sent periodically by microservices.
|
|
/// </summary>
|
|
public sealed record HeartbeatPayload
|
|
{
|
|
/// <summary>
|
|
/// Gets the instance descriptor.
|
|
/// </summary>
|
|
public InstanceDescriptor? Instance { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the instance ID.
|
|
/// </summary>
|
|
public required string InstanceId { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the health status.
|
|
/// </summary>
|
|
public required InstanceHealthStatus Status { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the current in-flight request count.
|
|
/// </summary>
|
|
public int InFlightRequestCount { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the error rate (0.0 to 1.0).
|
|
/// </summary>
|
|
public double ErrorRate { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the timestamp when this heartbeat was created.
|
|
/// </summary>
|
|
public DateTime TimestampUtc { get; init; } = DateTime.UtcNow;
|
|
}
|