Documentation ¶
Index ¶
- Constants
- func IsErrTimeout(err error) bool
- func MakeResIds(n *yaml.RNode) ([]resid.ResId, error)
- func NewErrTimeOut(d time.Duration, c string) errTimeOut
- func PathSplitter(path string, delimiter string) []string
- func PrevIds(n *yaml.RNode) ([]resid.ResId, error)
- func SameEndingSubSlice(shortest, longest []string) bool
- func SmarterPathSplitter(path string, delimiter string) []string
- func StringSliceContains(slice []string, str string) bool
- func StringSliceIndex(slice []string, str string) int
- func TimedCall(description string, d time.Duration, fn func() error) error
Constants ¶
const ( BuildAnnotationPreviousKinds = konfig.ConfigAnnoDomain + "/previousKinds" BuildAnnotationPreviousNames = konfig.ConfigAnnoDomain + "/previousNames" BuildAnnotationPrefixes = konfig.ConfigAnnoDomain + "/prefixes" BuildAnnotationSuffixes = konfig.ConfigAnnoDomain + "/suffixes" BuildAnnotationPreviousNamespaces = konfig.ConfigAnnoDomain + "/previousNamespaces" BuildAnnotationsRefBy = konfig.ConfigAnnoDomain + "/refBy" BuildAnnotationsGenBehavior = konfig.ConfigAnnoDomain + "/generatorBehavior" BuildAnnotationsGenAddHashSuffix = konfig.ConfigAnnoDomain + "/needsHashSuffix" // the following are only for patches, to specify whether they can change names // and kinds of their targets BuildAnnotationAllowNameChange = konfig.ConfigAnnoDomain + "/allowNameChange" BuildAnnotationAllowKindChange = konfig.ConfigAnnoDomain + "/allowKindChange" OriginAnnotation = "config.kubernetes.io/origin" Enabled = "enabled" )
Variables ¶
This section is empty.
Functions ¶
func IsErrTimeout ¶
func MakeResIds ¶ added in v0.8.11
MakeResIds returns all of an RNode's current and previous Ids
func NewErrTimeOut ¶
func PathSplitter ¶ added in v0.6.9
PathSplitter splits a delimited string, permitting escaped delimiters.
func SameEndingSubSlice ¶ added in v0.8.11
SameEndingSubSlice returns true if the slices end the same way, e.g. {"a", "b", "c"}, {"b", "c"} => true {"a", "b", "c"}, {"a", "b"} => false If one slice is empty and the other is not, return false.
func SmarterPathSplitter ¶ added in v0.8.11
SmarterPathSplitter splits a path, retaining bracketed elements. If the element is a list entry identifier (defined by the '='), it will retain the brackets. E.g. "[name=com.foo.someapp]" survives as one thing after splitting "spec.template.spec.containers.[name=com.foo.someapp].image" See kyaml/yaml/match.go for use of list entry identifiers. If the element is a mapping entry identifier, it will remove the brackets. E.g. "a.b.c" survives as one thing after splitting "metadata.annotations.[a.b.c] This function uses `PathSplitter`, so it also respects escaped delimiters.
func StringSliceContains ¶ added in v0.8.11
StringSliceContains returns true if the slice has the string.
func StringSliceIndex ¶ added in v0.8.11
StringSliceIndex returns the index of the str, else -1.
Types ¶
This section is empty.