feat(status): add SystemHealth type and getSystemHealth() API function
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user