store

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 8

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