Documentation ¶
Index ¶
- Variables
- func Jitter(r *rand.Rand, t time.Duration, jitter float64) time.Duration
- func MakeUUIDName(ownerGK schema.GroupKind, ownerName string, gk schema.GroupKind, ...) string
- func MakeUniqueResourceString(group string, kind string, namespace string, name string) string
- func MakeUniqueResourceString2(ownerGK schema.GroupKind, ownerName string, gk schema.GroupKind, ...) string
Constants ¶
This section is empty.
Variables ¶
var Namespace = uuid.Must(uuid.Parse("9a329043-7ad7-4b1c-812f-9c7a93d6392a"))
Namespace is the ASOv2 UUIDv5 namespace UUID
Functions ¶
func Jitter ¶
Jitter returns the provided duration, scaled by a jitter factor. jitter must be between 0 and 1. After jitter is applied the result will be in the range: [(1-jitter)t, (1+jitter)t], UNLESS (1+jitter)t is larger than MaxInt64, in which case the range will be [(1-jitter)t, math.MaxInt64]
func MakeUUIDName ¶ added in v2.2.0
func MakeUUIDName(ownerGK schema.GroupKind, ownerName string, gk schema.GroupKind, namespace string, name string) string
MakeUUIDName creates a stable UUID (v5) based on the group, kind, namespace, and name of a resource and its owner. If the name of the resource is already a compliant UUID, we just use that. If the name is not a UUID one is generated and returned.
func MakeUniqueResourceString ¶ added in v2.2.0
MakeUniqueResourceString generates a string that uniquely identifies a cluster resource.
Types ¶
This section is empty.