persistence

package
v0.0.0-...-a71f0cf Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDBName

func GetDBName(parsedURI *url.URL) (db string, err error)

GetDBName returns the database name from the given URI. If no database name is specified, "memory" is returned. Example: "db:bbolt:./my-db?snapshotInterval=3" returns "bbolt".

func GetPath

func GetPath(parsedURI *url.URL) (path string, err error)

func GetSnapshotInterval

func GetSnapshotInterval(parsedURI *url.URL) (snapshotInterval int, err error)

Types

type Store

type Store interface {
	GetSnapshot(actorName string) (snapshot *persistencev1.SnapshotRecord, err error)
	PersistSnapshot(actorName string, snapshot *persistencev1.SnapshotRecord)
	DeleteSnapshots(actorName string, inclusiveToIndex int)
	GetEvents(actorName string, eventIndexStart int, eventIndexEnd int, callback func(e *persistencev1.EventRecord))
	PersistEvent(actorName string, event *persistencev1.EventRecord)
	DeleteEvents(actorName string, inclusiveToIndex int)
	Restart()
	GetSnapshotInterval() int
}

Store is the interface that wraps the basic persistence operations.

type URI

type URI string

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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