nodetable

package
v0.0.0-...-b800c40 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareNodeTable

func CompareNodeTable(a, b unsafe.Pointer) int

func MemoryInUse

func MemoryInUse() (sz int64)

Types

type EqualKeyFn

type EqualKeyFn func(unsafe.Pointer, []byte) bool

type HashFn

type HashFn func([]byte) uint32

type NodeTable

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

func New

func New(hfn HashFn, kfn EqualKeyFn) *NodeTable

func (*NodeTable) Close

func (nt *NodeTable) Close()

func (*NodeTable) Get

func (nt *NodeTable) Get(key []byte) unsafe.Pointer

func (*NodeTable) MemoryInUse

func (nt *NodeTable) MemoryInUse() int64

func (*NodeTable) Remove

func (nt *NodeTable) Remove(key []byte) (success bool, nptr unsafe.Pointer)

func (*NodeTable) Stats

func (nt *NodeTable) Stats() string

func (*NodeTable) Update

func (nt *NodeTable) Update(key []byte, nptr unsafe.Pointer) (updated bool, oldPtr unsafe.Pointer)

Jump to

Keyboard shortcuts

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