hamt

package
v0.0.0-...-43dea2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLeaf

func NewLeaf(key uint64, value *list.Element) (l *leaf, err error)

func NewTable

func NewTable(depth uint, r *root, firstLeaf *leaf) (t *table, err error)

Types

type HAMT

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

The HAMT implemented here strictly enforces storing *list.Element for the policies. It uses up to 2^w for table size and 2^t entries for the root where w=6 and t=6 When implementing it in a custom policy, see lrfu for its usage.

func New

func New() *HAMT

func (*HAMT) Delete

func (h *HAMT) Delete(k uint64) error

func (HAMT) Get

func (h HAMT) Get(k uint64) (*list.Element, error)

func (*HAMT) Set

func (h *HAMT) Set(k uint64, v *list.Element) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL