contenthash

package
v0.0.0-...-8a63693 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package contenthash hashes the content of various objects.

Package contenthash hashes the content of various objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesMap

func BytesMap(m map[string][]byte) string

BytesMap returns a hex-encoded hash of all the content in the map.

This can be used to compare two unordered sets of key-value pairs for equality. The keys can be arbitrary strings. The values can be arbitrary byte slices.

func ContainerUpdates

func ContainerUpdates(in *corev1.Container) string

ContainerUpdates returns a hex-encoded hash of a Container.

This is not guaranteed to detect changes in any part of the Container. We only try to detect certain changes that otherwise would not be applied by update.PodContainers(), such as when things are removed from lists in which extra items are usually tolerated because they might have been injected.

func ContainersUpdates

func ContainersUpdates(in []corev1.Container) string

ContainersUpdates returns a hex-encoded hash of a list of Containers.

This is not guaranteed to detect changes in any part of the Container. We only try to detect certain changes that otherwise would not be applied by update.PodContainers(), such as when things are removed from lists in which extra items are usually tolerated because they might have been injected.

func StringList

func StringList(in []string) string

StringList returns a hex-encoded hash of a list of strings.

This can be used to compare two ordered lists of strings for equality. The strings can be arbitrary values.

func StringMap

func StringMap(m map[string]string) string

StringMap returns a hex-encoded hash of all the content in the map.

This can be used to compare two unordered sets of key-value pairs for equality. The keys and values can both be arbitrary strings.

func StringMapKeys

func StringMapKeys(m map[string]string) string

StringMapKeys returns a hex-encoded hash of only the keys in the map.

This can be used to compare two unordered sets of keys for equality. The keys can be arbitrary strings. The values in the map are ignored.

func Tolerations

func Tolerations(in []corev1.Toleration) string

Tolerations returns a hex-encoded hash of a list of Tolerations.

func TopologySpreadConstraints

func TopologySpreadConstraints(in []corev1.TopologySpreadConstraint) string

TopologySpreadConstraints returns a hex-encoded hash of a list of topologySpreadConstraints.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL