Skip to content

Latest commit

 

History

History
189 lines (106 loc) · 5.35 KB

modules.md

File metadata and controls

189 lines (106 loc) · 5.35 KB

kubernetes-health

Table of contents

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

Status

Ƭ Status: "Pending" | "Live" | "Ready" | "NotReady" | "Terminating"

Defined in

Health.ts:4


Task

Ƭ Task: () => Promise<void>

Type declaration

▸ (): Promise<void>

Returns

Promise<void>

Defined in

Health.ts:6

Variables

defaultOptions

Const defaultOptions: Options

Default values for Health options, if not specified

Defined in

Health.ts:49

Functions

createLivenessProbeListener

createLivenessProbeListener(health): ProbeListener

Creates a new ProbeListener that returns 200 if the specified Health instance is live, and 500 otherwise.

Parameters

Name Type Description
health Health the Health instance

Returns

ProbeListener

an ProbeListener

Defined in

probes.ts:41


createProbeServer

createProbeServer(health, options?): http.Server

Creates a new http.Server configured to serve the liveness and readiness endpoints for a given Health instance.

Parameters

Name Type Description
health Health the Health instance to serve
options ProbeServerOptions options for the health probe server

Returns

http.Server

an http.Server ready to serve the health probes

Defined in

probes.ts:97


createReadinessProbeListener

createReadinessProbeListener(health): ProbeListener

Creates a new ProbeListener that returns 200 if the specified Health instance is ready, and 500 otherwise.

Parameters

Name Type Description
health Health the Health instance

Returns

ProbeListener

an ProbeListener

Defined in

probes.ts:59


gracefulHttpTerminatorTask

gracefulHttpTerminatorTask(server, terminationGracePeriodSeconds?): Task

Parameters

Name Type Default value
server Server | Server undefined
terminationGracePeriodSeconds number 1

Returns

Task

Defined in

graceful.ts:8


startProbeServer

startProbeServer(health, options?): http.Server

Create and start a health probe server, listening on on the specified port / hostname.

Parameters

Name Type Description
health Health the Health instance to serve
options ProbeServerOptions & ProbeServerListenOptions options for the health probe server

Returns

http.Server

Defined in

probes.ts:132