preamble

package
v0.13.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClock

func WithClock(clock clock.Clock) func(store *Store)

func WithDirectory

func WithDirectory(directory string) func(store *Store)

func WithGetStateFunc

func WithGetStateFunc(f func() map[int]map[string]internal.KeyData) func(store *Store)

func WithReadWriter

func WithReadWriter(rw ReadWriter) func(store *Store)

func WithSetKeyDataFunc

func WithSetKeyDataFunc(f func(database int, key string, data internal.KeyData)) func(store *Store)

Types

type ReadWriter

type ReadWriter interface {
	io.ReadWriteSeeker
	io.Closer
	Truncate(size int64) error
	Sync() error
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewPreambleStore

func NewPreambleStore(options ...func(store *Store)) (*Store, error)

func (*Store) Close

func (store *Store) Close() error

func (*Store) CreatePreamble

func (store *Store) CreatePreamble() error

func (*Store) Restore

func (store *Store) Restore() error

Jump to

Keyboard shortcuts

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