Documentation ¶
Overview ¶
Package hashutil ...
Index ¶
- func AP(source string) uint64
- func BKDR(source string, seed uint64) uint64
- func DJB(source string) uint64
- func GetBucketNum(hashMethod protoc_cache_server.HashMethod, source string, seed int64, ...) int64
- func GetHashNum(hashMethod protoc_cache_server.HashMethod, source string, seed uint64) uint64
- func New(source string) uint64
- func NewMD5(source string) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBucketNum ¶
func GetBucketNum(hashMethod protoc_cache_server.HashMethod, source string, seed int64, bucketSize int64) int64
GetBucketNum Get bucket num and return a number in the range [1, bucketSize]
func GetHashNum ¶
func GetHashNum(hashMethod protoc_cache_server.HashMethod, source string, seed uint64) uint64
GetHashNum Get the hash value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.