MCPcopy Index your code
hub / github.com/zalando/postgres-operator / clusterResync

Method clusterResync

pkg/controller/postgresql.go:28–42  ·  view source on GitHub ↗
(stopCh <-chan struct{}, wg *sync.WaitGroup)

Source from the content-addressed store, hash-verified

26)
27
28func (c *Controller) clusterResync(stopCh <-chan struct{}, wg *sync.WaitGroup) {
29 defer wg.Done()
30 ticker := time.NewTicker(c.opConfig.ResyncPeriod)
31
32 for {
33 select {
34 case <-ticker.C:
35 if err := c.clusterListAndSync(); err != nil {
36 c.logger.Errorf("could not list clusters: %v", err)
37 }
38 case <-stopCh:
39 return
40 }
41 }
42}
43
44// clusterListFunc obtains a list of all PostgreSQL clusters
45func (c *Controller) listClusters(options metav1.ListOptions) (*acidv1.PostgresqlList, error) {

Callers 1

RunMethod · 0.95

Calls 1

clusterListAndSyncMethod · 0.95

Tested by

no test coverage detected