lru

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lru

type Lru struct {
	Call func(key interface{}, value interface{})
	// contains filtered or unexported fields
}

func NewLru

func NewLru(len int) *Lru

func (*Lru) Add

func (l *Lru) Add(key interface{}, val interface{}) error

func (*Lru) Del

func (l *Lru) Del(key interface{})

func (*Lru) Get

func (l *Lru) Get(key interface{}) (val interface{}, ok bool)

func (*Lru) Len

func (l *Lru) Len() int

func (*Lru) RangeValue

func (l *Lru) RangeValue(reverse bool, f func(key, value interface{}) error) error

type Node

type Node struct {
	Key interface{}
	Val interface{}
}

Jump to

Keyboard shortcuts

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