Documentation
¶
Index ¶
- Constants
- func IsPattern(val string) bool
- func MatchAndExtractWildcard(name, pattern string) (wildcardValue string, matched bool)
- func ProcessNamespaceName(namespaceName string, vclusterName string) string
- func TranslateHostNamespace(vClusterName, hostNamespace string, mappings map[string]string) (string, bool)
- func ValidateNamespaceSyncConfig(c *config.Config, name, namespace string) error
Constants ¶
View Source
const ( // Name placeholder will be replaced with this virtual cluster name NamePlaceholder string = "${name}" // WildcardChar is used in pattern mappings. WildcardChar string = "*" )
Variables ¶
This section is empty.
Functions ¶
func MatchAndExtractWildcard ¶
MatchAndExtractWildcard checks if a given name matches a pattern that contains a single wildcard. It returns the string captured by the wildcard and a boolean indicating if the match was successful. If the provided pattern string does not contain a wildcard, it's not considered a pattern by this function, and it will return matched = false.
func ProcessNamespaceName ¶
ProcessNamespaceName returns namespace name after applying all pre-processing to it
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.