Skip to content

Commit

Permalink
Add healthcheck API
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoAdamek committed Sep 18, 2024
1 parent dc152b8 commit 43ee70f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tigerbay",
"version": "1.1.0-beta.7",
"version": "1.1.1-beta.1",
"description": "API Client library for TigerBay",
"main": "lib/client.js",
"type": "commonjs",
Expand Down
13 changes: 13 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ export class Client {
return new NoteManager(this.axios)
}


public async healthcheck(): Promise<HealthCheckResponse> {
return (await this.axios.get('/healthcheck')).data
}

/**
* Add a new interceptor before a request is sent
*
Expand Down Expand Up @@ -173,3 +178,11 @@ export interface ClientConfig {
credentials: Auth.CredentialsProvider
}

export interface HealthCheckResponse {
[key: string]: {
Name: string
IsHealthy: boolean
Message: string
Duration: string
}
}

0 comments on commit 43ee70f

Please sign in to comment.