mem

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make[K comparable, V any](n int) map_cache.Map[K, V]

func MakeSafe

func MakeSafe[K comparable, V any](n int) map_cache.SafeMap[K, V]

Types

type Safe

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

func (*Safe[K, V]) All

func (c *Safe[K, V]) All() iter.Seq[V]

func (*Safe[K, V]) Delete

func (c *Safe[K, V]) Delete(k K)

func (*Safe[K, V]) Get

func (c *Safe[K, V]) Get(k K) (v V, ok bool)

func (*Safe[K, V]) Len

func (c *Safe[K, V]) Len() int

func (*Safe[K, V]) Locker

func (c *Safe[K, V]) Locker() sync.Locker

func (*Safe[K, V]) Put

func (c *Safe[K, V]) Put(k K, v V)

func (*Safe[K, V]) RLocker

func (c *Safe[K, V]) RLocker() sync.Locker

func (*Safe[K, V]) Scan

func (c *Safe[K, V]) Scan() iter.Seq2[K, V]

type Unsafe

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

func (*Unsafe[K, V]) All

func (c *Unsafe[K, V]) All() iter.Seq[V]

func (*Unsafe[K, V]) Delete

func (c *Unsafe[K, V]) Delete(k K)

func (*Unsafe[K, V]) Get

func (c *Unsafe[K, V]) Get(k K) (v V, ok bool)

func (*Unsafe[K, V]) Len

func (c *Unsafe[K, V]) Len() int

func (*Unsafe[K, V]) Put

func (c *Unsafe[K, V]) Put(k K, v V)

func (*Unsafe[K, V]) Scan

func (c *Unsafe[K, V]) Scan() iter.Seq2[K, V]

Jump to

Keyboard shortcuts

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