Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SamplingHash ¶ added in v0.0.2
func SamplingHash(key interface{}) uint64
Types ¶
type Hashtable ¶
type Hashtable interface {
Set(key, value interface{})
Remove(key interface{}) bool
Get(key interface{}) (interface{}, bool)
Iterate(cb func(key, value interface{}) bool)
Len() int
}
func NewOAHashtable ¶ added in v0.0.2
func NewOAHashtable(options ...OAHashtableOption) Hashtable
type OAHashtable ¶ added in v0.0.2
type OAHashtable struct {
// contains filtered or unexported fields
}
Open addressing hash table
func (*OAHashtable) Get ¶ added in v0.0.2
func (h *OAHashtable) Get(key interface{}) (interface{}, bool)
func (*OAHashtable) Iterate ¶ added in v0.0.2
func (h *OAHashtable) Iterate(cb func(key, value interface{}) bool)
func (*OAHashtable) Len ¶ added in v0.0.2
func (h *OAHashtable) Len() int
func (*OAHashtable) Remove ¶ added in v0.0.2
func (h *OAHashtable) Remove(key interface{}) bool
func (*OAHashtable) Set ¶ added in v0.0.2
func (h *OAHashtable) Set(key interface{}, value interface{})
type OAHashtableOption ¶ added in v0.0.2
type OAHashtableOption func(*OAHashtable)
func OptionOAHashtableHash ¶ added in v0.0.2
func OptionOAHashtableHash(hash func(key interface{}) uint64) OAHashtableOption
func OptionOAHashtableLength ¶ added in v0.0.2
func OptionOAHashtableLength(length uint32) OAHashtableOption
Click to show internal directories.
Click to hide internal directories.