keyvalue

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStorage added in v1.4.2

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

func NewMemoryStorage added in v1.4.2

func NewMemoryStorage[K comparable, V any]() *MemoryStorage[K, V]

func (*MemoryStorage[K, V]) AsReadStorage added in v1.4.2

func (ms *MemoryStorage[K, V]) AsReadStorage() ReadStorage[K, V]

func (*MemoryStorage[K, V]) Clean added in v1.4.2

func (ms *MemoryStorage[K, V]) Clean() bool

func (*MemoryStorage[K, V]) Get added in v1.4.2

func (ms *MemoryStorage[K, V]) Get(key K) (V, bool)

func (*MemoryStorage[K, V]) IsEmpty added in v1.4.2

func (ms *MemoryStorage[K, V]) IsEmpty() bool

func (*MemoryStorage[K, V]) Remove added in v1.4.2

func (ms *MemoryStorage[K, V]) Remove(key K) bool

func (*MemoryStorage[K, V]) Store added in v1.4.2

func (ms *MemoryStorage[K, V]) Store(key K, value V)

type ReadStorage

type ReadStorage[K comparable, V any] interface {
	Get(key K) (V, bool)
	IsEmpty() bool
}

type Storage

type Storage[K comparable, V any] interface {
	ReadStorage[K, V]

	Store(key K, value V)
	Remove(key K) bool
	Clean() bool
}

Jump to

Keyboard shortcuts

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