- 新增 docker-compose 配置,包含活动服务、YARP 网关、PostgreSQL 与 Redis - 添加活动服务与网关集成文档,详细介绍配置步骤、API 和故障排查 - 删除旧的 bash 注册脚本,新增跨平台 PowerShell 和通用 bash 注册脚本 - 实现网关相关接口的 TypeScript 客户端调用封装,支持服务注册、路由管理 - 新增网关管理前端界面,包含服务统计、服务注册、路由刷新等功能 - 调整请求客户端默认开启 token 刷新以支持更稳定的认证体验 - 制定微服务命名与版本规范,标准化 API 路径和集群命名规则
67 lines
1.3 KiB
TypeScript
67 lines
1.3 KiB
TypeScript
export interface GatewayStatistics {
|
|
totalServices: number;
|
|
globalRoutes: number;
|
|
tenantRoutes: number;
|
|
totalInstances: number;
|
|
healthyInstances: number;
|
|
recentServices: GatewayService[];
|
|
}
|
|
|
|
export interface GatewayService {
|
|
id: number;
|
|
servicePrefix: string;
|
|
serviceName: string;
|
|
version: string;
|
|
clusterId: string;
|
|
pathPattern: string;
|
|
serviceAddress: string;
|
|
destinationId: string;
|
|
weight: number;
|
|
instanceCount: number;
|
|
isGlobal: boolean;
|
|
tenantCode?: string;
|
|
status: number;
|
|
createdAt: string;
|
|
}
|
|
|
|
export interface GatewayRoute {
|
|
id: number;
|
|
serviceName: string;
|
|
clusterId: string;
|
|
pathPattern: string;
|
|
priority: number;
|
|
isGlobal: boolean;
|
|
tenantCode?: string;
|
|
status: number;
|
|
instanceCount: number;
|
|
}
|
|
|
|
export interface GatewayInstance {
|
|
id: number;
|
|
clusterId: string;
|
|
destinationId: string;
|
|
address: string;
|
|
weight: number;
|
|
health: number;
|
|
status: number;
|
|
createdAt: string;
|
|
}
|
|
|
|
export interface RegisterServiceForm {
|
|
servicePrefix: string;
|
|
serviceName: string;
|
|
version: string;
|
|
serviceAddress: string;
|
|
destinationId?: string;
|
|
weight: number;
|
|
isGlobal: boolean;
|
|
tenantCode?: string;
|
|
}
|
|
|
|
export interface AddInstanceForm {
|
|
clusterId: string;
|
|
destinationId: string;
|
|
address: string;
|
|
weight: number;
|
|
}
|