Skip to main content

healthCheck

Workspace API


Workspace API / services/granite/healthCheck

services/granite/healthCheck

Interfaces

HealthCheckResult

Defined in: services/granite/healthCheck.ts:52

Result of a health check for a Granite endpoint

Properties

name

name: string

Defined in: services/granite/healthCheck.ts:53

healthy

healthy: boolean

Defined in: services/granite/healthCheck.ts:54

statusCode?

optional statusCode: number

Defined in: services/granite/healthCheck.ts:55

error?

optional error: string

Defined in: services/granite/healthCheck.ts:56

latencyMs

latencyMs: number

Defined in: services/granite/healthCheck.ts:57

Functions

validateGraniteEndpoints()

validateGraniteEndpoints(): Promise<HealthCheckResult[]>

Defined in: services/granite/healthCheck.ts:117

Validate all Granite endpoints are reachable

Returns

Promise<HealthCheckResult[]>

Array of health check results

Throws

Error only if GRANITE_HEALTH_CHECK_FAIL_FAST=true and endpoints are unhealthy


getGraniteHealthStatus()

getGraniteHealthStatus(): Promise<{ healthy: boolean; endpoints: HealthCheckResult[]; }>

Defined in: services/granite/healthCheck.ts:229

Health check endpoint handler for HTTP /health routes Returns 200 if healthy, 503 if any required endpoint is unhealthy

Returns

Promise<{ healthy: boolean; endpoints: HealthCheckResult[]; }>