algo

package
v0.0.0-...-6ded4b1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LRUCache

type LRUCache[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewLRU

func NewLRU[K comparable, V any](cap int) *LRUCache[K, V]

func (*LRUCache[K, V]) Get

func (lru *LRUCache[K, V]) Get(key K) (*Store[K, V], bool)

func (*LRUCache[K, V]) Put

func (lru *LRUCache[K, V]) Put(key K, value V)

type Store

type Store[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*Store[K, V]) Key

func (s *Store[K, V]) Key() K

func (*Store[K, V]) Val

func (s *Store[K, V]) Val() V

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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