mirror of https://github.com/certd/certd
perf: 增加健康检查探针 /health/liveliness 和 /health/readiness
parent
fd0e1da4a2
commit
44019e1042
|
@ -0,0 +1,21 @@
|
||||||
|
import {Controller, Get, Provide} from '@midwayjs/core';
|
||||||
|
import {BaseController, Constants} from '@certd/lib-server';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@Provide()
|
||||||
|
@Controller('/health')
|
||||||
|
export class HealthController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
@Get('/liveliness', { summary: Constants.per.guest })
|
||||||
|
async liveliness(): Promise<any> {
|
||||||
|
return this.ok('ok')
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get('/readiness', { summary: Constants.per.guest })
|
||||||
|
async readiness(): Promise<any> {
|
||||||
|
return this.ok('ok')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue