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 metrics.go recovery.go reset.go rollback.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 a 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")
)

func ClearPreResetHeight Uses

func ClearPreResetHeight() error

func LoadPreResetHeight Uses

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

LoadPreResetHeight returns the pre-reset height of all ledgers.

func NewProvider Uses

func NewProvider() (ledger.PeerLedgerProvider, error)

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

func ResetAllKVLedgers Uses

func ResetAllKVLedgers() error

ResetAllKVLedgers resets all ledger to the genesis block.

func RollbackKVLedger Uses

func RollbackKVLedger(ledgerID string, blockNum uint64) error

RollbackKVLedger rollbacks a ledger to a specified block number

type Provider Uses

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

Provider implements interface ledger.PeerLedgerProvider

func (*Provider) Close Uses

func (provider *Provider) Close()

Close implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) Create Uses

func (provider *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 (provider *Provider) Exists(ledgerID string) (bool, error)

Exists implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) Initialize Uses

func (provider *Provider) Initialize(initializer *ledger.Initializer) error

Initialize implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) List Uses

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

List implements the corresponding method from interface ledger.PeerLedgerProvider

func (*Provider) Open Uses

func (provider *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.
tests
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/validator
txmgmt/validator/internal
txmgmt/validator/statebasedval
txmgmt/validator/valimpl
txmgmt/version

Package kvledger imports 33 packages (graph) and is imported by 12 packages. Updated 2019-08-08. Refresh now. Tools for package owners.