fabric: github.com/hyperledger/fabric/core/ledger/kvledger Index | Files | Directories

package kvledger

import "github.com/hyperledger/fabric/core/ledger/kvledger"

Index

Package Files

coll_elg_notifier.go drop_dbs.go hashcheck_pvtdata.go kv_ledger.go kv_ledger_provider.go ledger_filepath.go metrics.go pause_resume.go rebuild_dbs.go recovery.go reset.go rollback.go upgrade_dbs.go

Variables

var (
    // ErrLedgerIDExists is thrown by a CreateLedger call if a ledger with the given id already exists
    ErrLedgerIDExists = errors.New("LedgerID already exists")
    // ErrNonExistingLedgerID is thrown by an OpenLedger call if a ledger with the given id does not exist
    ErrNonExistingLedgerID = errors.New("LedgerID does not exist")
    // ErrLedgerNotOpened is thrown by a CloseLedger call if a ledger with the given id has not been opened
    ErrLedgerNotOpened = errors.New("ledger is not opened yet")
    // ErrInactiveLedger is thrown by an OpenLedger call if a ledger with the given id is not active
    ErrInactiveLedger = errors.New("Ledger is not active")
)

func BlockStorePath Uses

func BlockStorePath(rootFSPath string) string

BlockStorePath returns the absolute path of block storage

func BookkeeperDBPath Uses

func BookkeeperDBPath(rootFSPath string) string

BookkeeperDBPath return the absolute path of bookkeeper DB

func ClearPreResetHeight Uses

func ClearPreResetHeight(rootFSPath string, ledgerIDs []string) error

ClearPreResetHeight removes the prereset height recorded in the file system for the specified ledgers.

func ConfigHistoryDBPath Uses

func ConfigHistoryDBPath(rootFSPath string) string

ConfigHistoryDBPath returns the absolute path of configHistory DB

func HistoryDBPath Uses

func HistoryDBPath(rootFSPath string) string

HistoryDBPath returns the absolute path of history DB

func LedgerProviderPath Uses

func LedgerProviderPath(rootFSPath string) string

LedgerProviderPath returns the absolute path of ledgerprovider

func LoadPreResetHeight Uses

func LoadPreResetHeight(rootFSPath string, ledgerIDs []string) (map[string]uint64, error)

LoadPreResetHeight returns the prereset height for the specified ledgers.

func PauseChannel Uses

func PauseChannel(rootFSPath, ledgerID string) error

PauseChannel updates the channel status to inactive in ledgerProviders.

func PvtDataStorePath Uses

func PvtDataStorePath(rootFSPath string) string

PvtDataStorePath returns the absolute path of pvtdata storage

func RebuildDBs Uses

func RebuildDBs(rootFSPath string) error

RebuildDBs drops existing ledger databases. Dropped database will be rebuilt upon server restart

func ResetAllKVLedgers Uses

func ResetAllKVLedgers(rootFSPath string) error

ResetAllKVLedgers resets all ledger to the genesis block.

func ResumeChannel Uses

func ResumeChannel(rootFSPath, ledgerID string) error

ResumeChannel updates the channel status to active in ledgerProviders

func RollbackKVLedger Uses

func RollbackKVLedger(rootFSPath, ledgerID string, blockNum uint64) error

RollbackKVLedger rollbacks a ledger to a specified block number

func StateDBPath Uses

func StateDBPath(rootFSPath string) string

StateDBPath returns the absolute path of state level DB

func UpgradeDBs Uses

func UpgradeDBs(rootFSPath string) error

UpgradeDBs upgrades existing ledger databases to the latest formats

func UpgradeIDStoreFormat Uses

func UpgradeIDStoreFormat(rootFSPath string) error

UpgradeIDStoreFormat upgrades the format for idStore

type Provider Uses

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

Provider implements interface ledger.PeerLedgerProvider

func NewProvider Uses

func NewProvider(initializer *ledger.Initializer) (pr *Provider, e error)

NewProvider instantiates a new Provider. This is not thread-safe and assumed to be synchronized by the caller

func (*Provider) Close Uses

func (p *Provider) Close()

Close implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) Create Uses

func (p *Provider) Create(genesisBlock *common.Block) (ledger.PeerLedger, error)

Create implements the corresponding method from interface ledger.PeerLedgerProvider This functions sets a under construction flag before doing any thing related to ledger creation and upon a successful ledger creation with the committed genesis block, removes the flag and add entry into created ledgers list (atomically). If a crash happens in between, the 'recoverUnderConstructionLedger' function is invoked before declaring the provider to be usable

func (*Provider) Exists Uses

func (p *Provider) Exists(ledgerID string) (bool, error)

Exists implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) List Uses

func (p *Provider) List() ([]string, error)

List implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) Open Uses

func (p *Provider) Open(ledgerID string) (ledger.PeerLedger, error)

Open implements the corresponding method from interface ledger.PeerLedgerProvider

Directories

PathSynopsis
bookkeeping
history/historydb
history/historydb/historyleveldb
history/historydb/historyleveldb/fakesCode generated by counterfeiter.
msgs
tests
tests/fakesCode generated by counterfeiter.
txmgmt/privacyenabledstatePackage privacyenabledstate is a generated protocol buffer package.
txmgmt/pvtstatepurgemgmt
txmgmt/queryutil
txmgmt/queryutil/mockCode generated by counterfeiter.
txmgmt/rwsetutil
txmgmt/statedb
txmgmt/statedb/commontests
txmgmt/statedb/mockCode generated by counterfeiter.
txmgmt/statedb/statecouchdb
txmgmt/statedb/statecouchdb/msgs
txmgmt/statedb/stateleveldb
txmgmt/statedb/stateleveldb/msgs
txmgmt/storageutil
txmgmt/txmgr
txmgmt/txmgr/lockbasedtxmgr
txmgmt/txmgr/mockCode generated by counterfeiter.
txmgmt/validator
txmgmt/validator/internal
txmgmt/validator/statebasedval
txmgmt/validator/valimpl
txmgmt/validator/valimpl/mockCode generated by counterfeiter.
txmgmt/version

Package kvledger imports 35 packages (graph) and is imported by 19 packages. Updated 2019-11-16. Refresh now. Tools for package owners.