github.com/operator-framework/operator-lifecycle-manager@v0.30.0/pkg/controller/registry/reconciler/grpc_address.go (about) 1 package reconciler 2 3 import ( 4 "github.com/operator-framework/api/pkg/operators/v1alpha1" 5 "github.com/sirupsen/logrus" 6 ) 7 8 type GrpcAddressRegistryReconciler struct { 9 now nowFunc 10 } 11 12 var _ RegistryEnsurer = &GrpcAddressRegistryReconciler{} 13 var _ RegistryChecker = &GrpcAddressRegistryReconciler{} 14 var _ RegistryReconciler = &GrpcAddressRegistryReconciler{} 15 16 // EnsureRegistryServer ensures a registry server exists for the given CatalogSource. 17 func (g *GrpcAddressRegistryReconciler) EnsureRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) error { 18 now := g.now() 19 catalogSource.Status.RegistryServiceStatus = &v1alpha1.RegistryServiceStatus{ 20 CreatedAt: now, 21 Protocol: "grpc", 22 } 23 24 return nil 25 } 26 27 // CheckRegistryServer returns true if the given CatalogSource is considered healthy; false otherwise. 28 func (g *GrpcAddressRegistryReconciler) CheckRegistryServer(logger *logrus.Entry, catalogSource *v1alpha1.CatalogSource) (healthy bool, err error) { 29 // TODO: add gRPC health check 30 healthy = true 31 return 32 }