persistentbigmap

package
v0.18.8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = fmt.Errorf("provided key does not exist")

Functions

This section is empty.

Types

type EventMap

type EventMap[DT, MT any] interface {
	Get(key string) (data DT, err error)
	Len() (l int)
	Keys() (keys []string)
	Range(f func(key string, data DT) error)
	Delete(data MT) (err error)
	Set(data DT, meta MT) (err error)
	Exists(key string) (exists bool)
}

func Init

func Init[DT, MT any](serv webserver.Server, s stream.Stream, dataTypeName, dataTypeVersion string, p stream.CryptoKeyProvider, getKey func(d MT) string, ctx context.Context) (ed EventMap[DT, MT], err error)

type Map added in v0.8.0

type Map[T any] interface {
	Store(id string, data T)
	Load(id string) (data T, ok bool)
	Delete(id string)
	Range(f func(k string, v T) bool)
}

func New added in v0.8.0

func New[T any]() Map[T]

Jump to

Keyboard shortcuts

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