MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / SetCluster

Method SetCluster

pkg/management/postgres/instance.go:319–321  ·  view source on GitHub ↗

SetCluster updates the cached cluster for use outside the reconciliation cycle when the API client is not available

(cluster *apiv1.Cluster)

Source from the content-addressed store, hash-verified

317// SetCluster updates the cached cluster for use outside the reconciliation
318// cycle when the API client is not available
319func (instance *Instance) SetCluster(cluster *apiv1.Cluster) {
320 instance.cluster.Store(cluster)
321}
322
323// RequiresDesignatedPrimaryTransition checks if this instance is a primary
324// that needs to become a designated primary in a replica cluster

Callers 7

GetInstanceMethod · 0.95
instance_test.goFile · 0.80
probes_test.goFile · 0.80
middleware_test.goFile · 0.80
joinSubCommandFunction · 0.80
upgradeSubCommandMethod · 0.80
ReconcileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected