persistentmap

package module
v0.0.0-...-0d9a908 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 3 Imported by: 0

README

go-persistentmap

CI GoDoc

Documentation

Index

Constants

View Source
const (
	MapBucket = "map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeserializeFunc

type DeserializeFunc func([]byte) interface{}

type DeserializedTuple

type DeserializedTuple struct {
	Key   string
	Value interface{}
}

type PersistentMap

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

func NewPersistentMap

func NewPersistentMap(filename string) *PersistentMap

func NewPersistentMapWithSerialization

func NewPersistentMapWithSerialization(filename string, serializer SerializeFunc, deserializer DeserializeFunc) *PersistentMap

func (*PersistentMap) Close

func (m *PersistentMap) Close()

func (*PersistentMap) Delete

func (m *PersistentMap) Delete(key string)

func (*PersistentMap) Get

func (m *PersistentMap) Get(key string) []byte

func (*PersistentMap) GetAndDeserialize

func (m *PersistentMap) GetAndDeserialize(key string) interface{}

func (*PersistentMap) IterationChannel

func (m *PersistentMap) IterationChannel() chan Tuple

func (*PersistentMap) IterationDeserializedChannel

func (m *PersistentMap) IterationDeserializedChannel() chan DeserializedTuple

func (*PersistentMap) SerializeAndSet

func (m *PersistentMap) SerializeAndSet(key string, obj interface{})

func (*PersistentMap) Set

func (m *PersistentMap) Set(key string, data []byte)

type SerializeFunc

type SerializeFunc func(interface{}) []byte

type Tuple

type Tuple struct {
	Key   string
	Value []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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