localdb

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: BSD-3-Clause Imports: 7 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(txn rony.StoreTxn) error) error

func (*Store) UpdateLocal

func (s *Store) UpdateLocal(fn func(txn *rony.StoreLocalTxn) error) error

func (*Store) View

func (s *Store) View(fn func(rony.StoreTxn) error) error

func (*Store) ViewLocal

func (s *Store) ViewLocal(fn func(txn *rony.StoreLocalTxn) error) error

Jump to

Keyboard shortcuts

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