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

Function getClusters

internal/cmd/plugin/maintenance/maintenance.go:110–118  ·  view source on GitHub ↗
(ctx context.Context, allNamespaces bool)

Source from the content-addressed store, hash-verified

108}
109
110func getClusters(ctx context.Context, allNamespaces bool) (apiv1.ClusterList, error) {
111 var clusterList apiv1.ClusterList
112 var opts []client.ListOption
113 if !allNamespaces {
114 opts = append(opts, client.InNamespace(plugin.Namespace))
115 }
116 err := plugin.Client.List(ctx, &clusterList, opts...)
117 return clusterList, err
118}
119
120func getCluster(ctx context.Context, clusterName string) (apiv1.ClusterList, error) {
121 var clusterList apiv1.ClusterList

Callers 1

MaintenanceFunction · 0.85

Calls 1

ListMethod · 0.45

Tested by

no test coverage detected