leveldb

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package leveldb implements a simple leveldb transaction store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a in memory transaction config store

func New

func New(uri string) (s *Store, err error)

New creates a new in memory transaction config store

func (*Store) Close

func (s *Store) Close() (err error)

Close the store

func (*Store) Delete

func (s *Store) Delete(name string) (err error)

Delete the transaction config for the given name

func (*Store) Get

func (s *Store) Get(name string) (config transaction.Config, err error)

Get a transaction config from the store

func (*Store) Has

func (s *Store) Has(name string) (exists bool, err error)

Has checks if a transaction config exists under the given name

func (*Store) Iter

func (s *Store) Iter(callback func(name string, config transaction.Config) (proceed bool)) (err error)

Iter iterates the transaction configs applying the callback for the name and config pairs. Returning false causes the iteration to stop.

func (*Store) Set

func (s *Store) Set(name string, config transaction.Config) (err error)

Set stores the given transaction config

Jump to

Keyboard shortcuts

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