- createLivenessProbeListener
- createProbeServer
- createReadinessProbeListener
- gracefulHttpTerminatorTask
- startProbeServer
Ƭ Status: "Pending"
| "Live"
| "Ready"
| "NotReady"
| "Terminating"
Ƭ Task: () => Promise
<void
>
▸ (): Promise
<void
>
Promise
<void
>
• Const
defaultOptions: Options
Default values for Health options, if not specified
▸ createLivenessProbeListener(health
): ProbeListener
Creates a new ProbeListener
that returns 200 if the specified Health
instance is live, and 500 otherwise.
Name | Type | Description |
---|---|---|
health |
Health |
the Health instance |
an ProbeListener
▸ createProbeServer(health
, options?
): http.Server
Creates a new http.Server
configured to serve the liveness and readiness endpoints for a given Health instance.
Name | Type | Description |
---|---|---|
health |
Health |
the Health instance to serve |
options |
ProbeServerOptions |
options for the health probe server |
http.Server
an http.Server
ready to serve the health probes
▸ createReadinessProbeListener(health
): ProbeListener
Creates a new ProbeListener
that returns 200 if the specified Health
instance is ready, and 500 otherwise.
Name | Type | Description |
---|---|---|
health |
Health |
the Health instance |
an ProbeListener
▸ gracefulHttpTerminatorTask(server
, terminationGracePeriodSeconds?
): Task
Name | Type | Default value |
---|---|---|
server |
Server | Server |
undefined |
terminationGracePeriodSeconds |
number |
1 |
▸ startProbeServer(health
, options?
): http.Server
Create and start a health probe server, listening on on the specified port / hostname.
Name | Type | Description |
---|---|---|
health |
Health |
the Health instance to serve |
options |
ProbeServerOptions & ProbeServerListenOptions |
options for the health probe server |
http.Server