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

Method IsUsed

pkg/postgres/configuration.go:430–439  ·  view source on GitHub ↗

IsUsed checks whether a configuration namespace in the extension namespaces list is used in the user-provided configuration

(userConfigs map[string]string)

Source from the content-addressed store, hash-verified

428// IsUsed checks whether a configuration namespace in the extension namespaces list
429// is used in the user-provided configuration
430func (e ManagedExtension) IsUsed(userConfigs map[string]string) bool {
431 for k := range userConfigs {
432 for _, namespace := range e.Namespaces {
433 if strings.HasPrefix(k, namespace+".") {
434 return true
435 }
436 }
437 }
438 return false
439}
440
441// IsManagedExtensionUsed checks whether a configuration namespace in the named extension namespaces list
442// is used in the user-provided configuration

Callers 5

IsManagedExtensionUsedFunction · 0.95
reconcileDatabasesMethod · 0.80
reconcileExtensionsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected