feature: readyz API endpoint support (#225)
This commit is contained in:
parent
6892a679ee
commit
759e747f54
|
|
@ -155,6 +155,12 @@ message SosReportResponse {
|
||||||
string alert = 1;
|
string alert = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GetReadyzRequest {}
|
||||||
|
|
||||||
|
message GetReadyzResponse {
|
||||||
|
string status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
service OliveTinApiService {
|
service OliveTinApiService {
|
||||||
rpc GetDashboardComponents(GetDashboardComponentsRequest) returns (GetDashboardComponentsResponse) {
|
rpc GetDashboardComponents(GetDashboardComponentsRequest) returns (GetDashboardComponentsResponse) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
|
|
@ -219,4 +225,10 @@ service OliveTinApiService {
|
||||||
get: "/api/sosreport"
|
get: "/api/sosreport"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpc GetReadyz(GetReadyzRequest) returns (GetReadyzResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/api/readyz"
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,14 @@ func (api *oliveTinAPI) SosReport(ctx ctx.Context, req *pb.SosReportRequest) (*p
|
||||||
return res, nil
|
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.
|
// Start will start the GRPC API.
|
||||||
func Start(globalConfig *config.Config, ex *executor.Executor) {
|
func Start(globalConfig *config.Config, ex *executor.Executor) {
|
||||||
cfg = globalConfig
|
cfg = globalConfig
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue