keyvalue

package
v1.4.1 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 MemoryKeyStringStorage

type MemoryKeyStringStorage[V any] struct {
	// contains filtered or unexported fields
}

func NewMemoryKeyStringStorage

func NewMemoryKeyStringStorage[V any]() *MemoryKeyStringStorage[V]

func (*MemoryKeyStringStorage[V]) AsReadStorage

func (ms *MemoryKeyStringStorage[V]) AsReadStorage() ReadStorage[string, V]

func (*MemoryKeyStringStorage[V]) Clean

func (ms *MemoryKeyStringStorage[V]) Clean() bool

func (*MemoryKeyStringStorage[V]) Get

func (ms *MemoryKeyStringStorage[V]) Get(key string) (V, bool)

func (*MemoryKeyStringStorage[V]) IsEmpty

func (ms *MemoryKeyStringStorage[V]) IsEmpty() bool

func (*MemoryKeyStringStorage[V]) Remove

func (ms *MemoryKeyStringStorage[V]) Remove(key string) bool

func (*MemoryKeyStringStorage[V]) Store

func (ms *MemoryKeyStringStorage[V]) Store(key string, value V)

type ReadStorage

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

type Storage

type Storage[K any, 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