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

Function IsManagedExtensionUsed

pkg/postgres/configuration.go:443–456  ·  view source on GitHub ↗

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

(name string, userConfigs map[string]string)

Source from the content-addressed store, hash-verified

441// IsManagedExtensionUsed checks whether a configuration namespace in the named extension namespaces list
442// is used in the user-provided configuration
443func IsManagedExtensionUsed(name string, userConfigs map[string]string) bool {
444 var extension *ManagedExtension
445 for _, ext := range ManagedExtensions {
446 if ext.Name == name {
447 extension = &ext
448 break
449 }
450 }
451 if extension == nil {
452 return false
453 }
454
455 return extension.IsUsed(userConfigs)
456}
457
458var (
459 // ManagedExtensions contains the list of extensions the operator supports to manage

Calls 1

IsUsedMethod · 0.95

Tested by

no test coverage detected