Refactor code structure for improved readability and maintainability
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
export interface HealthStatus {
|
||||
status: 'healthy' | 'degraded' | 'unhealthy';
|
||||
service: string;
|
||||
timestamp: string;
|
||||
uptime: number;
|
||||
checks: {
|
||||
database: {
|
||||
status: 'ok' | 'error';
|
||||
responseTime: number;
|
||||
details?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
export declare class HealthService {
|
||||
private readonly prisma;
|
||||
private readonly startTime;
|
||||
constructor(prisma: PrismaService);
|
||||
getOverallHealth(): Promise<{
|
||||
status: 'healthy' | 'degraded' | 'unhealthy';
|
||||
statusCode: number;
|
||||
service: string;
|
||||
timestamp: string;
|
||||
uptime: number;
|
||||
checks: {
|
||||
database: {
|
||||
status: 'ok' | 'error';
|
||||
responseTime: number;
|
||||
details?: string;
|
||||
};
|
||||
};
|
||||
}>;
|
||||
getDatabaseHealth(): Promise<{
|
||||
status: 'ok' | 'error';
|
||||
database: string;
|
||||
responseTime: number;
|
||||
timestamp: string;
|
||||
details?: string;
|
||||
statusCode: number;
|
||||
}>;
|
||||
}
|
||||
Reference in New Issue
Block a user