bookkeeping

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category int

Category is an enum type for representing the bookkeeping of different type

const (
	// PvtdataExpiry represents the bookkeeping related to expiry of pvtdata because of BTL policy
	PvtdataExpiry Category = iota
	// MetadataPresenceIndicator maintains the bookkeeping about whether metadata is ever set for a namespace
	MetadataPresenceIndicator
)

type Provider

type Provider interface {
	// GetDBHandle returns a db handle that can be used for maintaining the bookkeeping of a given category
	GetDBHandle(ledgerID string, cat Category) *leveldbhelper.DBHandle
	// Close closes the BookkeeperProvider
	Close()
}

Provider provides handle to different bookkeepers for the given ledger

func NewProvider

func NewProvider() Provider

NewProvider instantiates a new provider

type TestEnv

type TestEnv struct {
	TestProvider Provider
	// contains filtered or unexported fields
}

TestEnv provides the bookkeeper provider env for testing

func NewTestEnv

func NewTestEnv(t testing.TB) *TestEnv

NewTestEnv construct a TestEnv for testing

func (*TestEnv) Cleanup

func (env *TestEnv) Cleanup()

Cleanup cleansup the store env after testing

Jump to

Keyboard shortcuts

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