storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnsetKeyErr = "key %s not set"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheMap

type CacheMap struct {
	// contains filtered or unexported fields
}

func (*CacheMap) Del

func (cm *CacheMap) Del(key []byte) error

func (*CacheMap) Free

func (cm *CacheMap) Free() error

func (*CacheMap) Get

func (cm *CacheMap) Get(key []byte) ([]byte, error)

func (CacheMap) New

func (cm CacheMap) New() KeyValue

func (*CacheMap) Set

func (cm *CacheMap) Set(key []byte, value []byte) error

type KeyValue

type KeyValue interface {
	New() KeyValue
	Free() error
	Set([]byte, []byte) error
	Get([]byte) ([]byte, error)
	Del([]byte) error
}

func NewCacheMap

func NewCacheMap() KeyValue

Jump to

Keyboard shortcuts

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