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

Function Get

tests/utils/clusterutils/cluster.go:126–141  ·  view source on GitHub ↗

Get gets a cluster given name and namespace

(
	ctx context.Context,
	crudClient client.Client,
	namespace, name string,
)

Source from the content-addressed store, hash-verified

124
125// Get gets a cluster given name and namespace
126func Get(
127 ctx context.Context,
128 crudClient client.Client,
129 namespace, name string,
130) (*apiv1.Cluster, error) {
131 namespacedName := types.NamespacedName{
132 Namespace: namespace,
133 Name: name,
134 }
135 cluster := &apiv1.Cluster{}
136 err := objects.Get(ctx, crudClient, namespacedName, cluster)
137 if err != nil {
138 return nil, err
139 }
140 return cluster, nil
141}
142
143// ListPods gathers the current list of instance pods for a cluster in a namespace
144func ListPods(

Callers 15

PrintClusterResourcesFunction · 0.92
GetCredentialsFunction · 0.92
IsWalStorageEnabledFunction · 0.92
ToggleHAReplicationSlotsFunction · 0.92
PatchStatusConditionFunction · 0.92
ExecuteFunction · 0.92
AssertUpdateSecretFunction · 0.92

Calls 1

GetFunction · 0.92

Tested by 11

assertFastSwitchoverFunction · 0.74
AssertRoleReconciledFunction · 0.74
hibernateOnFunction · 0.74
hibernateOffFunction · 0.74