feat(student-bff): 完整实现 student-bff 聚合层
包含 src 全部实现、Dockerfile、shared-ts/bff 包等
This commit is contained in:
38
services/student-bff/src/app.module.ts
Normal file
38
services/student-bff/src/app.module.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* AppModule - student-bff 根模块.
|
||||
*
|
||||
* 仲裁依据:
|
||||
* - coord-final-decisions §2 B1 (GraphQL Yoga + DataLoader)
|
||||
* - coord-final-decisions §2 B8 (DownstreamClient 抽象复用)
|
||||
* - coord-final-decisions §1 G8 (GlobalErrorFilter)
|
||||
*
|
||||
* 模块装配:
|
||||
* - CacheModule (Global): Redis 缓存
|
||||
* - DownstreamModule (Global): gRPC 下游客户端
|
||||
* - CircuitBreakerModule (Global): opossum 熔断器 (P6)
|
||||
* - HealthModule: /healthz + /readyz
|
||||
* - StudentModule: GraphQL Yoga + Resolver
|
||||
* - DataLoaderModule: DataLoader 工厂
|
||||
* - EventModule: Kafka 事件订阅 + push-gateway 推送 (P5)
|
||||
*/
|
||||
import { Module } from "@nestjs/common";
|
||||
import { CacheModule } from "./shared/cache/cache.module.js";
|
||||
import { DownstreamModule } from "./shared/downstream/downstream.module.js";
|
||||
import { HealthModule } from "./shared/health/health.module.js";
|
||||
import { StudentModule } from "./student/student.module.js";
|
||||
import { DataLoaderModule } from "./student/dataloaders/data-loader.module.js";
|
||||
import { EventModule } from "./student/events/event.module.js";
|
||||
import { CircuitBreakerModule } from "./shared/circuit-breaker/circuit-breaker.module.js";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
CacheModule,
|
||||
DownstreamModule,
|
||||
CircuitBreakerModule,
|
||||
HealthModule,
|
||||
DataLoaderModule,
|
||||
StudentModule,
|
||||
EventModule,
|
||||
],
|
||||
})
|
||||
export class AppModule {}
|
||||
Reference in New Issue
Block a user