bufx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[K comparable, V any] interface {
	Get(key K) (V, bool)
	Put(key K, val V)
	Remove(key K) bool
	Len() int
	Clear()
}

type Entry

type Entry[K comparable, V any] struct {
	Key   K
	Value V
}

type LruCache

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

func (*LruCache[K, V]) Clear

func (it *LruCache[K, V]) Clear()

func (*LruCache[K, V]) Get

func (it *LruCache[K, V]) Get(key K) (V, bool)

func (*LruCache[K, V]) Len

func (it *LruCache[K, V]) Len() int

func (*LruCache[K, V]) Put

func (it *LruCache[K, V]) Put(key K, val V)

func (*LruCache[K, V]) Remove

func (it *LruCache[K, V]) Remove(key K) bool

type SimpleCache

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

func (*SimpleCache[K, V]) Clear

func (it *SimpleCache[K, V]) Clear()

func (*SimpleCache[K, V]) Get

func (it *SimpleCache[K, V]) Get(key K) (V, bool)

func (*SimpleCache[K, V]) Len

func (it *SimpleCache[K, V]) Len() int

func (*SimpleCache[K, V]) Put

func (it *SimpleCache[K, V]) Put(key K, val V)

func (*SimpleCache[K, V]) Remove

func (it *SimpleCache[K, V]) Remove(key K) bool

Jump to

Keyboard shortcuts

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