-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c648a5
commit c105809
Showing
8 changed files
with
290 additions
and
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v18.17.1 | ||
v20.18.1 |
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 |
---|---|---|
|
@@ -76,5 +76,6 @@ | |
], | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Controller, Get } from "@nestjs/common"; | ||
import { ApiTags } from "@nestjs/swagger"; | ||
|
||
import { ETHEvmHealthServiceBase, EvmHealthServiceBase, FLREvmHealthServiceBase, SGBEvmHealthServiceBase } from "../service/health.service"; | ||
|
||
abstract class BaseHealthController { | ||
protected abstract healthService: EvmHealthServiceBase; | ||
|
||
/** | ||
* Gets the state entries from the indexer database. | ||
* @returns | ||
*/ | ||
@Get("health") | ||
public async indexerState(): Promise<boolean> { | ||
return this.healthService.checkHealth(); | ||
} | ||
} | ||
|
||
@ApiTags("Health") | ||
@Controller("sgb/") | ||
export class SGBHealthController extends BaseHealthController { | ||
constructor(protected healthService: SGBEvmHealthServiceBase) { | ||
super(); | ||
} | ||
} | ||
|
||
@ApiTags("Health") | ||
@Controller("flr/") | ||
export class FLRHealthController extends BaseHealthController { | ||
constructor(protected healthService: FLREvmHealthServiceBase) { | ||
super(); | ||
} | ||
} | ||
|
||
@ApiTags("Health") | ||
@Controller("eth/") | ||
export class ETHHealthController extends BaseHealthController { | ||
constructor(protected healthService: ETHEvmHealthServiceBase) { | ||
super(); | ||
} | ||
} |
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
Oops, something went wrong.