store

package
v1.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(opts ...Option) events.Store

NewStore returns an initialized events store

Types

type Backup

type Backup interface {
	Snapshot(st store.Store) error
}

Backup is an interface for snapshotting the events store to long term storage

type Option

type Option func(o *Options)

func WithBackup

func WithBackup(back Backup) Option

func WithStore

func WithStore(s store.Store) Option

WithStore sets the underlying store to use

func WithTTL

func WithTTL(ttl time.Duration) Option

WithTTL sets the default TTL

type Options

type Options struct {
	Store  store.Store
	TTL    time.Duration
	Backup Backup
}

Jump to

Keyboard shortcuts

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