feature: readyz API endpoint support (#225)

This commit is contained in:
James Read 2024-02-07 10:36:50 +01:00 committed by GitHub
parent 6892a679ee
commit 759e747f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -155,6 +155,12 @@ message SosReportResponse {
string alert = 1;
}
message GetReadyzRequest {}
message GetReadyzResponse {
string status = 1;
}
service OliveTinApiService {
rpc GetDashboardComponents(GetDashboardComponentsRequest) returns (GetDashboardComponentsResponse) {
option (google.api.http) = {
@ -219,4 +225,10 @@ service OliveTinApiService {
get: "/api/sosreport"
};
}
rpc GetReadyz(GetReadyzRequest) returns (GetReadyzResponse) {
option (google.api.http) = {
get: "/api/readyz"
};
}
}

View File

@ -281,6 +281,14 @@ func (api *oliveTinAPI) SosReport(ctx ctx.Context, req *pb.SosReportRequest) (*p
return res, nil
}
func (api *oliveTinAPI) GetReadyz(ctx ctx.Context, req *pb.GetReadyzRequest) (*pb.GetReadyzResponse, error) {
res := &pb.GetReadyzResponse{
Status: "OK",
}
return res, nil
}
// Start will start the GRPC API.
func Start(globalConfig *config.Config, ex *executor.Executor) {
cfg = globalConfig