cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

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

func New

func New(o O) *C

func (*C) Delete

func (c *C) Delete(x cid.ID) bool

Delete returns a given impl to the available pool.

func (*C) DeleteOrDie

func (c *C) DeleteOrDie(x cid.ID)

func (*C) Get

func (c *C) Get(x cid.ID) (node.N, bool)

Get returns a impl data struct.

func (*C) GetOrDie

func (c *C) GetOrDie(x cid.ID) node.N

func (*C) Insert

func (c *C) Insert(p, l, r cid.ID, validate bool) cid.ID

func (*C) IsAllocated

func (c *C) IsAllocated(x cid.ID) bool

IsAllocated checks if the given impl is tracked by the cache. This function returns false if the impl is in the freed pool.

func (*C) K

func (c *C) K() vector.D

func (*C) LeafSize

func (c *C) LeafSize() int

type O

type O struct {
	K        vector.D
	LeafSize int
}

Directories

Path Synopsis
Package node defines a node interface.
Package node defines a node interface.
impl
Package impl is a node implementation with manual garbage collection support.
Package impl is a node implementation with manual garbage collection support.
op
balance
Package balance ensures the local node subtree is properly balanced and has a minimal surface area heuristic (SAH).
Package balance ensures the local node subtree is properly balanced and has a minimal surface area heuristic (SAH).

Jump to

Keyboard shortcuts

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