-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(healthcheck): Update health check architecture
- Add dog sample app - Upgrade dependencies
- Loading branch information
1 parent
15c97ec
commit fceb4ba
Showing
39 changed files
with
1,139 additions
and
13,902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export type HealthIndicatorResult = { | ||
[key: string]: any; | ||
}; | ||
|
||
export type HealthIndicatorFunction = () => Promise<HealthIndicatorResult>; | ||
|
||
/** | ||
* Represents a health indicator of a health check | ||
*/ | ||
export interface HealthIndicator { | ||
/** | ||
* If the health indicator is healthy | ||
* | ||
* @param {string} key The key of the health check which will be used in the result object | ||
* @param {any} [options] The options to configure the health indicator | ||
*/ | ||
isHealthy(key: string, options?: any): Promise<HealthIndicatorResult>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './terminus-module-options.interface'; | ||
export * from './health-indicator.interface'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { TERMINUS_LIB } from './terminus.constants'; | ||
import * as terminus from '@godaddy/terminus'; | ||
import { createTerminus } from '@godaddy/terminus'; | ||
|
||
/** | ||
* The type of the Terminus instance | ||
*/ | ||
export type TerminusLib = typeof terminus; | ||
export type TerminusLib = typeof createTerminus; | ||
|
||
/** | ||
* Create a wrapper so it is injectable & easier to test | ||
*/ | ||
export const TerminusLibProvider = { | ||
provide: TERMINUS_LIB, | ||
useValue: terminus as any, | ||
useValue: createTerminus as any, | ||
}; |
Oops, something went wrong.