Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

xxhash

v1.47.0
go.opentelemetry.io/otel/attribute/internal/xxhash

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

10 matches

Top ↑

Package xxhash provides a wrapper around the xxhash library for attribute hashing.

Types

Hash

type Hash struct {
	// contains filtered or unexported fields
}

Hash wraps xxhash.Digest to provide an API friendly for hashing attribute values.

New

func New() Hash

New returns a new initialized xxHash64 hasher.

Hash.Bool

func (h Hash) Bool(val bool) Hash

Hash.Float64

func (h Hash) Float64(val float64) Hash

Float64 hashes val into h, returning the updated Hash.

Hash.Int64

func (h Hash) Int64(val int64) Hash

Int64 hashes val into h, returning the updated Hash.

Hash.Reset

func (h Hash) Reset()

Reset resets the hash to its initial state.

Hash.String

func (h Hash) String(val string) Hash

Hash.Sum64

func (h Hash) Sum64() uint64

Sum64 returns the current hash value.

Hash.Uint64

func (h Hash) Uint64(val uint64) Hash

Uint64 hashes val into h, returning the updated Hash.

Dependency graph