feat(GOV-009): 建立后端契约与健康检查
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import type { DependencyHealthDto } from '../../http-contracts/src/health.dto';
|
||||
|
||||
export class DisabledHealthClient {
|
||||
constructor(private readonly detail: string) {}
|
||||
|
||||
async check(): Promise<DependencyHealthDto> {
|
||||
return { status: 'disabled', detail: this.detail };
|
||||
}
|
||||
|
||||
async close(): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
async onModuleDestroy(): Promise<void> {
|
||||
await this.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user