feat: 完成配置中心重构和命名规范优化
- 重构config层为配置中心架构,支持动态配置管理 - 统一core层命名规范(event-bus→event, circuit-breaker→breaker, domain-sdk→sdk) - 修复数据库连接配置路径问题 - 实现配置中心完整功能:系统配置、动态配置、配置验证、统计 - 优化目录结构,为微服务架构做准备 - 修复TypeScript编译错误和依赖注入问题
This commit is contained in:
16
wwjcloud/src/core/event/eventBusPublisher.ts
Normal file
16
wwjcloud/src/core/event/eventBusPublisher.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class EventBusPublisher {
|
||||
private readonly logger = new Logger(EventBusPublisher.name);
|
||||
|
||||
async publish<T>(event: string, data: T, metadata?: Record<string, any>): Promise<void> {
|
||||
this.logger.debug(`Publishing event: ${event}`, { data, metadata });
|
||||
// TODO: 实现具体的发布逻辑
|
||||
}
|
||||
|
||||
async publishBatch<T>(events: Array<{ event: string; data: T; metadata?: Record<string, any> }>): Promise<void> {
|
||||
this.logger.debug(`Publishing batch events: ${events.length} events`);
|
||||
// TODO: 实现具体的批量发布逻辑
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user