Documentation
¶
Index ¶
- Variables
- func BlockStorePath(rootFSPath string) string
- func BookkeeperDBPath(rootFSPath string) string
- func ClearPreResetHeight(rootFSPath string, ledgerIDs []string) error
- func CompletedSnapshotsPath(snapshotRootDir string) string
- func ConfigHistoryDBPath(rootFSPath string) string
- func HistoryDBPath(rootFSPath string) string
- func InProgressSnapshotsPath(snapshotRootDir string) string
- func LedgerProviderPath(rootFSPath string) string
- func LoadPreResetHeight(rootFSPath string, ledgerIDs []string) (map[string]uint64, error)
- func PauseChannel(rootFSPath, ledgerID string) error
- func PvtDataStorePath(rootFSPath string) string
- func RebuildDBs(config *ledger.Config) error
- func ResetAllKVLedgers(rootFSPath string) error
- func ResumeChannel(rootFSPath, ledgerID string) error
- func RollbackKVLedger(rootFSPath, ledgerID string, blockNum uint64) error
- func SnapshotDirForLedgerHeight(snapshotRootDir, ledgerID string, snapshotHeight uint64) string
- func SnapshotsDirForLedger(snapshotRootDir, ledgerID string) string
- func StateDBPath(rootFSPath string) string
- func UpgradeDBs(config *ledger.Config) error
- func UpgradeIDStoreFormat(t *testing.T, rootFSPath string)
- type Provider
Constants ¶
This section is empty.
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") )
Functions ¶
func BlockStorePath ¶ added in v1.5.6
BlockStorePath returns the absolute path of block storage
func BookkeeperDBPath ¶ added in v1.5.6
BookkeeperDBPath return the absolute path of bookkeeper DB
func ClearPreResetHeight ¶ added in v1.4.2
ClearPreResetHeight removes the prereset height recorded in the file system for the specified ledgers.
func CompletedSnapshotsPath ¶ added in v1.5.6
CompletedSnapshotsPath returns the absolute path that is used for persisting the snapshots
func ConfigHistoryDBPath ¶ added in v1.5.6
ConfigHistoryDBPath returns the absolute path of configHistory DB
func HistoryDBPath ¶ added in v1.5.6
HistoryDBPath returns the absolute path of history DB
func InProgressSnapshotsPath ¶ added in v1.5.6
InProgressSnapshotsPath returns the dir path that is used temporarily during the genration of the snapshots for a ledger
func LedgerProviderPath ¶ added in v1.5.6
LedgerProviderPath returns the absolute path of ledgerprovider
func LoadPreResetHeight ¶ added in v1.4.2
LoadPreResetHeight returns the prereset height for the specified ledgers.
func PauseChannel ¶ added in v1.5.6
PauseChannel updates the channel status to inactive in ledgerProviders.
func PvtDataStorePath ¶ added in v1.5.6
PvtDataStorePath returns the absolute path of pvtdata storage
func RebuildDBs ¶ added in v1.5.6
RebuildDBs drops existing ledger databases. Dropped database will be rebuilt upon server restart
func ResetAllKVLedgers ¶ added in v1.4.2
ResetAllKVLedgers resets all ledger to the genesis block.
func ResumeChannel ¶ added in v1.5.6
ResumeChannel updates the channel status to active in ledgerProviders
func RollbackKVLedger ¶ added in v1.4.2
RollbackKVLedger rollbacks a ledger to a specified block number
func SnapshotDirForLedgerHeight ¶ added in v1.5.6
SnapshotDirForLedgerHeight returns the absolute path for a particular snapshot for a ledger
func SnapshotsDirForLedger ¶ added in v1.5.6
SnapshotsDirForLedger returns the absolute path of the dir for the snapshots for a specified ledger
func StateDBPath ¶ added in v1.5.6
StateDBPath returns the absolute path of state level DB
func UpgradeDBs ¶ added in v1.5.6
UpgradeDBs upgrades existing ledger databases to the latest formats. It checks the format of idStore and does not drop any databases if the format is already the latest version. Otherwise, it drops ledger databases and upgrades the idStore format.
func UpgradeIDStoreFormat ¶ added in v1.5.6
UpgradeIDStoreFormat updates ledger idStore to current format
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements interface ledger.PeerLedgerProvider
func NewProvider ¶
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 ¶
func (p *Provider) Close()
Close implements the corresponding method from interface ledger.PeerLedgerProvider
func (*Provider) Create ¶
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 ¶
Exists implements the corresponding method from interface ledger.PeerLedgerProvider
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
benchmark
|
|
fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
txmgmt
|
|
privacyenabledstate/mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
queryutil/mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
statedb/mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
validation/mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |