feat(status): add SystemHealth type and getSystemHealth() API function

This commit is contained in:
wangwei
2026-05-21 23:54:52 +08:00
parent 6bf5600a26
commit 4e90b4f2da
2 changed files with 21 additions and 4 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { fetchAPI, type SystemConfig, type SystemStats } from './index';
import { fetchAPI, type SystemConfig, type SystemHealth, type SystemStats } from './index';
export async function getSystemStats(): Promise<SystemStats> {
return fetchAPI<SystemStats>('/status/stats');
@@ -8,8 +8,8 @@ export async function getSystemConfig(): Promise<SystemConfig> {
return fetchAPI<SystemConfig>('/status/config');
}
export async function getMilvusHealth(): Promise<{ connected: boolean; collections: string[] }> {
return fetchAPI('/status/milvus/health');
export async function getSystemHealth(): Promise<SystemHealth> {
return fetchAPI<SystemHealth>('/status/health');
}
export type { SystemConfig, SystemStats };
export type { SystemConfig, SystemHealth, SystemStats };