MCPcopy Index your code
hub / github.com/NVIDIA/gpu-operator / GetObjectHash

Function GetObjectHash

internal/utils/utils.go:71–75  ·  view source on GitHub ↗

GetObjectHash returns an FNV-32a hash of the full object (all fields).

(obj interface{})

Source from the content-addressed store, hash-verified

69
70// GetObjectHash returns an FNV-32a hash of the full object (all fields).
71func GetObjectHash(obj interface{}) string {
72 hasher := fnv.New32a()
73 spewPrinter.Fprintf(hasher, "%#v", obj)
74 return fmt.Sprint(hasher.Sum32())
75}
76
77// GetObjectHashIgnoreEmptyKeys returns an FNV-32a hash of only the non-zero
78// fields of a struct. Adding a new zero-valued field will not change

Callers 6

TransformKataManagerFunction · 0.92
DaemonSetFunction · 0.92
isDaemonsetSpecChangedFunction · 0.92
createOrUpdateObjsMethod · 0.92
TestGetObjectHashFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetObjectHashFunction · 0.68