Skip to content
Snippets Groups Projects
Commit f2c23021 authored by Murat Kabilov's avatar Murat Kabilov
Browse files

generate clusterEvent queue key in a separate function

parent 59678378
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import (
"github.com/Sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
......@@ -169,7 +170,7 @@ func (c *Controller) initController() {
return "", fmt.Errorf("could not cast to ClusterEvent")
}
return fmt.Sprintf("%s-%s", e.EventType, e.UID), nil
return queueClusterKey(e.EventType, e.UID), nil
})
}
......@@ -206,3 +207,7 @@ func (c *Controller) runPostgresqlInformer(stopCh <-chan struct{}, wg *sync.Wait
c.postgresqlInformer.Run(stopCh)
}
func queueClusterKey(eventType spec.EventType, uid types.UID) string {
return fmt.Sprintf("%s-%s", eventType, uid)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment