From 7ec34fa094ac1ec5dfbeb0ec5a820279eee0af51 Mon Sep 17 00:00:00 2001 From: movingsam Date: Tue, 3 Mar 2026 15:31:53 +0800 Subject: [PATCH] feat(03-01): add GwDestination value object - Created destination endpoint value object embedded in GwCluster - Includes DestinationId, Address, Health, Weight, HealthStatus, Status fields - Compatible with YARP Destination config structure --- .../GatewayAggregate/GwDestination.cs | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwDestination.cs diff --git a/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwDestination.cs b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwDestination.cs new file mode 100644 index 0000000..c4a85bf --- /dev/null +++ b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwDestination.cs @@ -0,0 +1,37 @@ +namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate; + +/// +/// 目标端点(值对象,内嵌于 GwCluster) +/// +public class GwDestination +{ + /// + /// 目标标识 + /// + public string DestinationId { get; set; } = string.Empty; + + /// + /// 后端地址 + /// + public string Address { get; set; } = string.Empty; + + /// + /// 健康检查端点 + /// + public string? Health { get; set; } + + /// + /// 权重(用于加权负载均衡) + /// + public int Weight { get; set; } = 1; + + /// + /// 健康状态 + /// + public int HealthStatus { get; set; } = 1; + + /// + /// 状态 + /// + public int Status { get; set; } = 1; +}