persistenteventmapttl

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type EventMap

type EventMap[DT any] interface {
	Get(key string) (data DT, err error)
	Exists(key string) (exists bool)
	//Len() (l int)
	//Keys() (keys []string)
	//Range(f func(key string, data DT) error)
	Delete(data DT) (err error)
	Set(data DT) (err error)
	Stream(
		eventTypes []event.Type,
		from store.StreamPosition,
		filter stream.Filter,
		ctx context.Context,
	) (out <-chan event.Event[bcts.Bytes, *bcts.Bytes], err error)
	Range() iter.Seq2[string, DT]
}

func Init

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

Jump to

Keyboard shortcuts

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