Skip to content

Commit

Permalink
feat: adding the health check endpoint for the API (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoporoli authored Jul 4, 2024
1 parent f32ef8c commit 15a1b0d
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 16 deletions.
4 changes: 2 additions & 2 deletions kardinal-cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
projectName = "kardinal"
devMode = true
devMode = false
kontrolServiceApiUrl = "ad718d90d54d54dd084dea50a9f011af-1140086995.us-east-1.elb.amazonaws.com"
kontrolServicePort = 8080

Expand Down Expand Up @@ -305,7 +305,7 @@ func getKontrolServiceClient() *api.ClientWithResponses {
}
return client
} else {
client, err := api.NewClientWithResponses(fmt.Sprintf("http://%s:%v", kontrolServiceApiUrl, kontrolServicePort))
client, err := api.NewClientWithResponses(fmt.Sprintf("https://%s", kloudKontrolAPIHost))
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
Expand Down
102 changes: 102 additions & 0 deletions libs/cli-kontrol-api/api/golang/client/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 70 additions & 14 deletions libs/cli-kontrol-api/api/golang/server/server.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions libs/cli-kontrol-api/api/typescript/client/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@


export interface paths {
"/health": {
get: {
responses: {
/** @description Successful response */
200: {
content: {
"application/json": string;
};
};
};
};
};
"/tenant/{uuid}/flow/create": {
post: {
parameters: {
Expand Down
10 changes: 10 additions & 0 deletions libs/cli-kontrol-api/specs/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ info:
title: CLI/Kontrol API
version: 1.0.0
paths:
/health:
description: For health check control
get:
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: string
/tenant/{uuid}/flow/create:
post:
parameters:
Expand Down

0 comments on commit 15a1b0d

Please sign in to comment.