algorithm

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheNode

type CacheNode struct {
	Key, Value interface{}
}

func (*CacheNode) NewCacheNode

func (node *CacheNode) NewCacheNode(k, v interface{}) *CacheNode

type LRUCache

type LRUCache struct {
	Capacity int32
	// contains filtered or unexported fields
}

func NewLRUCache

func NewLRUCache(cap int32) *LRUCache

func (*LRUCache) Get

func (lru *LRUCache) Get(k interface{}) (v interface{}, ret bool, err error)

func (*LRUCache) Remove

func (lru *LRUCache) Remove(k interface{}) bool

func (*LRUCache) Set

func (lru *LRUCache) Set(k, v interface{}) error

func (*LRUCache) Size

func (lru *LRUCache) Size() int

Jump to

Keyboard shortcuts

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