fix health

This commit is contained in:
sbriat
2023-07-18 17:24:48 +02:00
parent 51314695ef
commit f59f56b459
3 changed files with 23 additions and 5 deletions

21
src/health.proto Normal file
View File

@@ -0,0 +1,21 @@
syntax = "proto3";
package health;
service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
}
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
}
ServingStatus status = 1;
}

View File

@@ -14,10 +14,7 @@ async function bootstrap() {
package: ['ad', 'health'],
protoPath: [
join(__dirname, 'modules/ad/interface/grpc-controllers/ad.proto'),
join(
__dirname,
'modules/health/interface/grpc-controllers/health.proto',
),
join(__dirname, 'health.proto'),
],
url: `${process.env.SERVICE_URL}:${process.env.SERVICE_PORT}`,
loader: { keepCase: true },