INNER CODE UNIT · Go
handleBackendConfigEnqueueRequests
streamnative/function-mesh · controllers/common.go:418
func handleBackendConfigEnqueueRequests(mgr manager.Manager, object client.Object, listType client.ObjectList) []reconcile.Request {
backendConfig := object.(*v1alpha1.BackendConfig)
// if autoUpdate is false, we don't need to reconcile functions
if !backendConfig.Spec.AutoUpdate {
return nil
}
var namespace string
if object.GetName() == utils.GlobalBackendConfig && object.GetNamespace() == utils.GlobalBackendConfigNamespace {
namespace = ""
} else if object.GetName() == utils.NamespacedBackendConfig {
namespace = object.GetNamespace()
} else {
return nil
}
ctx := context.Background()
requests, err := listAndEnqueueRequests(ctx, mgr, listType, namespace)