pkg/labels/labels.go
func (ls Labels) HashForLabels(names ...string) uint64 {
	b := make([]byte, 0, 1024)

	for _, v := range ls {
		for _, n := range names {
			if v.Name == n {
				b = append(b, v.Name...)
				b = append(b, sep)
				b = append(b, v.Value...)
				b = append(b, sep)
				break
			}
		}
	}
	return xxhash.Sum64(b)
}
func (ls Labels) HashForLabels(names ...string) uint64 {
	b := make([]byte, 0, 1024)

	for _, v := range ls {
		for _, n := range names {
			if v.Name == n {
				b = append(b, v.Name...)
				b = append(b, sep)
				b = append(b, v.Value...)
				b = append(b, sep)
				break
			}
		}
	}
	return xxhash.Sum64(b)
}
func ( ls Labels ) HashForLabels ( names ... string ) uint64 { b := make ( [ ] byte , 0 , 1024 ) for _ , v := range ls { for _ , n := range names { if v . Name == n { b = append ( b , v . Name ... ) b = append ( b , sep ) b = append ( b , v . Value ... ) b = append ( b , sep ) break } } } return xxhash . Sum64 ( b ) }
// HashForLabels returns a hash value for the labels matching the provided names.
HashForLabels returns a hash value for the labels matching the provided names .