Use hashutil to hold hash tools

This commit is contained in:
harry
2016-01-05 15:31:20 +08:00
committed by Harry Zhang
parent d6ab35a088
commit 2a52976983
7 changed files with 13 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util"
hashutil "k8s.io/kubernetes/pkg/util/hash"
)
// RepackSubsets takes a slice of EndpointSubset objects, expands it to the full
@@ -138,7 +138,7 @@ func hashAddresses(addrs addressSet) string {
}
sort.Sort(addrsReady(slice))
hasher := md5.New()
util.DeepHashObject(hasher, slice)
hashutil.DeepHashObject(hasher, slice)
return hex.EncodeToString(hasher.Sum(nil)[0:])
}
@@ -191,7 +191,7 @@ func SortSubsets(subsets []api.EndpointSubset) []api.EndpointSubset {
}
func hashObject(hasher hash.Hash, obj interface{}) []byte {
util.DeepHashObject(hasher, obj)
hashutil.DeepHashObject(hasher, obj)
return hasher.Sum(nil)
}