2022-06-20 12:22:41 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
|
|
|
|
export const healthCheckSchema = {
|
|
|
|
$id: '#/components/schemas/healthCheckSchema',
|
|
|
|
type: 'object',
|
2023-06-12 14:56:45 +02:00
|
|
|
description:
|
|
|
|
'Used by service orchestrators to decide whether this Unleash instance should be marked as healthy or unhealthy',
|
2022-06-20 12:22:41 +02:00
|
|
|
additionalProperties: false,
|
|
|
|
required: ['health'],
|
|
|
|
properties: {
|
|
|
|
health: {
|
2023-06-12 14:56:45 +02:00
|
|
|
description:
|
|
|
|
'The state this Unleash instance is in. GOOD if everything is ok, BAD if the instance should be restarted',
|
2022-06-20 12:22:41 +02:00
|
|
|
type: 'string',
|
|
|
|
enum: ['GOOD', 'BAD'],
|
2023-06-12 14:56:45 +02:00
|
|
|
example: 'GOOD',
|
2022-06-20 12:22:41 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type HealthCheckSchema = FromSchema<typeof healthCheckSchema>;
|