- 新增 GatewayAggregate 领域实体 (GwTenant, GwTenantRoute, GwServiceInstance) - 新增 IRouteStore, RouteStore, IInstanceStore, InstanceStore - 新增 IRouteManager, RouteManager - 合并 GatewayDbContext 到 PlatformDbContext - 统一 Extensions.AddPlatformCore 注册所有服务
24 lines
1.4 KiB
C#
24 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Identity;
|
|
|
|
using Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
|
|
|
|
namespace Fengling.Platform.Infrastructure;
|
|
|
|
/// <summary>
|
|
/// 服务实例存储接口
|
|
/// </summary>
|
|
public interface IInstanceStore
|
|
{
|
|
Task<GwServiceInstance?> FindByIdAsync(long? id, CancellationToken cancellationToken = default);
|
|
Task<GwServiceInstance?> FindByClusterIdAsync(string clusterId, CancellationToken cancellationToken = default);
|
|
Task<GwServiceInstance?> FindByDestinationAsync(string clusterId, string destinationId, CancellationToken cancellationToken = default);
|
|
Task<IList<GwServiceInstance>> GetAllAsync(CancellationToken cancellationToken = default);
|
|
Task<IList<GwServiceInstance>> GetPagedAsync(int page, int pageSize, string? clusterId = null,
|
|
InstanceHealth? health = null, InstanceStatus? status = null, CancellationToken cancellationToken = default);
|
|
Task<int> GetCountAsync(string? clusterId = null,
|
|
InstanceHealth? health = null, InstanceStatus? status = null, CancellationToken cancellationToken = default);
|
|
Task<IdentityResult> CreateAsync(GwServiceInstance instance, CancellationToken cancellationToken = default);
|
|
Task<IdentityResult> UpdateAsync(GwServiceInstance instance, CancellationToken cancellationToken = default);
|
|
Task<IdentityResult> DeleteAsync(GwServiceInstance instance, CancellationToken cancellationToken = default);
|
|
}
|