Zanzana: Fix health check endpoint (#104670)
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/fullstorydev/grpchan/inprocgrpc"
|
||||
authzv1 "github.com/grafana/authlib/authz/proto/v1"
|
||||
openfgav1 "github.com/openfga/api/proto/openfga/v1"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
|
||||
dashboardalpha1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1"
|
||||
"github.com/grafana/grafana/pkg/infra/localcache"
|
||||
@@ -70,7 +71,10 @@ func NewServer(cfg setting.ZanzanaServerSettings, openfga OpenFGAServer, logger
|
||||
}
|
||||
|
||||
func (s *Server) IsHealthy(ctx context.Context) (bool, error) {
|
||||
return s.openfga.IsReady(ctx)
|
||||
_, err := s.openfga.ListStores(ctx, &openfgav1.ListStoresRequest{
|
||||
PageSize: wrapperspb.Int32(1),
|
||||
})
|
||||
return err == nil, nil
|
||||
}
|
||||
|
||||
func (s *Server) getContextuals(subject string) (*openfgav1.ContextualTupleKeys, error) {
|
||||
|
||||
Reference in New Issue
Block a user