Documentation
¶
Overview ¶
Package hash provides generic utilities for computing hashes. This package contains no domain-specific types and can be used by any package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeHash ¶
ComputeHash is a generic hash function following Kubernetes patterns. It computes a hash value from any object using dump.ForHash() for deterministic string representation and an optional collisionCount to avoid hash collisions. The hash will be safe encoded to avoid bad words.
This follows the same algorithm as Kubernetes controller.ComputeHash but works with any type instead of being specific to PodTemplateSpec.
Typical usage pattern from k8s.io/apimachinery/pkg/util/dump:
hashableString := dump.ForHash(myObject) // Then pass to a hash function
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.