localdb

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DirPath             string
	ConflictRetries     int
	ConflictMaxInterval time.Duration
	BatchWorkers        int
	BatchSize           int
}

func DefaultConfig

func DefaultConfig(dataPath string) Config

type Store

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

func New

func New(cfg Config) (*Store, error)

func (*Store) DB

func (s *Store) DB() *store.LocalDB

func (*Store) Shutdown

func (s *Store) Shutdown()

func (*Store) Update

func (s *Store) Update(fn func(store.Txn) error) error

func (*Store) UpdateLocal

func (s *Store) UpdateLocal(fn func(txn *store.LTxn) error) error

func (*Store) View

func (s *Store) View(fn func(store.Txn) error) error

func (*Store) ViewLocal

func (s *Store) ViewLocal(fn func(txn *store.LTxn) error) error

Jump to

Keyboard shortcuts

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