package utils
import "sigs.k8s.io/kustomize/api/internal/utils"
Index ¶
- Constants
- func IsErrTimeout(err error) bool
- func MakeResIds(n *yaml.RNode) ([]resid.ResId, error)
- func NewErrTimeOut(d time.Duration, c string) *errTimeOut
- func PrevIds(n *yaml.RNode) ([]resid.ResId, error)
- func SameEndingSubSlice(shortest, longest []string) bool
- 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 ( // build annotations 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" // for keeping track of origin and transformer data OriginAnnotationKey = "config.kubernetes.io/origin" TransformerAnnotationKey = "alpha.config.kubernetes.io/transformations" Enabled = "enabled" )
Functions ¶
func IsErrTimeout ¶
func MakeResIds ¶
MakeResIds returns all of an RNode's current and previous Ids
func NewErrTimeOut ¶
func PrevIds ¶
PrevIds returns all of an RNode's previous Ids
func SameEndingSubSlice ¶
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 StringSliceContains ¶
StringSliceContains returns true if the slice has the string.
func StringSliceIndex ¶
StringSliceIndex returns the index of the str, else -1.
func TimedCall ¶
TimedCall runs fn, failing if it doesn't complete in the given duration. The description is used in the timeout error message.
Source Files ¶
annotations.go errtimeout.go makeResIds.go stringslice.go timedcall.go
- Version
- v0.20.0 (latest)
- Published
- Jun 28, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 5 hours ago –
Tools for package owners.