fengling-platform/.planning/phases/03-/03-gateway-cluster-entities-SUMMARY.md
2026-03-03 16:10:45 +08:00

2.3 KiB
Raw Blame History

phase plan subsystem tags dependency_graph tech_stack key_files decisions metrics
03- 01 Gateway
gateway
cluster
domain-entities
yarp
requires provides affects
GwCluster
GwDestination
GwHealthCheckConfig
GwSessionAffinityConfig
GwTenantRoute
added patterns
GwCluster (集群聚合根)
GwDestination (目标端点值对象)
GwHealthCheckConfig (健康检查配置值对象)
GwSessionAffinityConfig (会话亲和配置值对象)
值对象使用 Owned Entity
GUID 字符串 ID
软删除 + 乐观并发
created
Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwCluster.cs
Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwDestination.cs
Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwHealthCheckConfig.cs
Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwSessionAffinityConfig.cs
GwCluster 使用 string Id (GUID) 以兼容 YARP
GwDestination 作为 Owned Entity 内嵌于 GwCluster
值对象在 EF Core 中配置为 Owned Entity
duration completed_date
2026-03-03

阶段 03 - 计划 01: 网关集群实体总结

一句话概述

创建了 GwCluster 聚合根及其内嵌值对象GwDestination、GwHealthCheckConfig、GwSessionAffinityConfig替代旧的 GwServiceInstance 设计,与 YARP ClusterConfig 结构对齐。

已完成任务

任务 名称 提交 文件
1 创建 GwHealthCheckConfig 值对象 198dc2a GwHealthCheckConfig.cs
2 创建 GwSessionAffinityConfig 值对象 b07f56c GwSessionAffinityConfig.cs
3 创建 GwDestination 值对象 7ec34fa GwDestination.cs
4 创建 GwCluster 聚合根 774e3fb GwCluster.cs

验证结果

  • 全部 4 个文件已创建
  • 构建通过0 个错误
  • 值对象结构与 YARP 配置模型匹配

计划偏差

无 - 完全按计划执行。

认证门槛

无。

备注

新的 GwCluster 聚合遵循现有的 GatewayAggregate 代码风格:

  • GUID 字符串 ID 以兼容 YARP
  • 软删除IsDeleted和乐观并发Version字段
  • 内嵌 Destinations 列表和配置值对象
  • 标准审计字段CreatedBy、CreatedTime、UpdatedBy、UpdatedTime