collections

package
v0.0.0-...-9bbb796 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyDoesNotContains = errors.New("")
)

Functions

This section is empty.

Types

type CachedMap

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

func NewCachedMap

func NewCachedMap[K comparable, V any]() CachedMap[K, V]

func (CachedMap[K, V]) Add

func (m CachedMap[K, V]) Add(key K, value V)

func (CachedMap[K, V]) Get

func (m CachedMap[K, V]) Get(key K) (value V, err error)

func (CachedMap[K, V]) Has

func (m CachedMap[K, V]) Has(key K) bool

func (CachedMap[K, V]) Remove

func (m CachedMap[K, V]) Remove(key K)

type ReplacingMap

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

func NewReplacingMap

func NewReplacingMap[K comparable, V any](size uint) ReplacingMap[K, V]

func (*ReplacingMap[K, V]) Add

func (m *ReplacingMap[K, V]) Add(key K, value V)

func (*ReplacingMap[K, V]) Get

func (m *ReplacingMap[K, V]) Get(key K) (value V, err error)

func (*ReplacingMap[K, V]) Has

func (m *ReplacingMap[K, V]) Has(key K) bool

func (*ReplacingMap[K, V]) Remove

func (m *ReplacingMap[K, V]) Remove(key K)

func (*ReplacingMap[K, V]) SetSize

func (m *ReplacingMap[K, V]) SetSize(size uint)

func (*ReplacingMap[K, V]) Touch

func (m *ReplacingMap[K, V]) Touch(key K)

Jump to

Keyboard shortcuts

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