Files
glchat/web/src/api/health.ts
T

14 lines
389 B
TypeScript
Raw Normal View History

import { request } from './client';
export interface ReadinessResponse {
status: 'ready' | 'unavailable';
version: string;
checks: Record<string, string>;
}
export const readyQueryKey = ['readyz'] as const;
export function fetchReadiness(signal?: AbortSignal): Promise<ReadinessResponse> {
return request<ReadinessResponse>('/readyz', signal === undefined ? {} : { signal });
}