bookkeeping

package
v0.0.0-...-b544036 Latest Latest
Warning

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

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

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
	// SnapshotRequest maintains the information for snapshot requests
	SnapshotRequest
)

type Provider

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

Provider provides db handle to different bookkeepers

func NewProvider

func NewProvider(dbPath string) (*Provider, error)

NewProvider instantiates a new provider

func (*Provider) Close

func (p *Provider) Close()

Close implements the function in the interface 'BookKeeperProvider'

func (*Provider) Drop

func (p *Provider) Drop(ledgerID string) error

Drop drops channel-specific data from the config history db

func (*Provider) GetDBHandle

func (p *Provider) GetDBHandle(ledgerID string, cat Category) *leveldbhelper.DBHandle

GetDBHandle implements the function in the interface 'BookkeeperProvider'

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 (te *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