Documentation ¶
Index ¶
- func NewProvider() blkstorage.BlockStoreProvider
- type BlockStoreImpl
- func (b *BlockStoreImpl) AddBlock(block *common.Block) error
- func (b *BlockStoreImpl) GetBlockchainInfo() (*common.BlockchainInfo, error)
- func (b *BlockStoreImpl) RetrieveBlockByHash(blockHash []byte) (*common.Block, error)
- func (b *BlockStoreImpl) RetrieveBlockByNumber(blockNum uint64) (*common.Block, error)
- func (b *BlockStoreImpl) RetrieveBlockByTxID(txID string) (*common.Block, error)
- func (b *BlockStoreImpl) RetrieveBlocks(startNum uint64) (ledger.ResultsIterator, error)
- func (b *BlockStoreImpl) RetrieveTxByBlockNumTranNum(blockNum uint64, tranNum uint64) (*common.Envelope, error)
- func (b *BlockStoreImpl) RetrieveTxByID(txID string) (*common.Envelope, error)
- func (b *BlockStoreImpl) RetrieveTxValidationCodeByTxID(txID string) (peer.TxValidationCode, error)
- func (b *BlockStoreImpl) Shutdown()
- type FsBlockstoreProvider
- func (p *FsBlockstoreProvider) Close()
- func (p *FsBlockstoreProvider) CreateBlockStore(ledgerid string) (blkstorage.BlockStore, error)
- func (p *FsBlockstoreProvider) Exists(ledgerid string) (bool, error)
- func (p *FsBlockstoreProvider) List() ([]string, error)
- func (p *FsBlockstoreProvider) OpenBlockStore(ledgerid string) (blkstorage.BlockStore, error)
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider() blkstorage.BlockStoreProvider
NewProvider constructs a filesystem based block store provider
Types ¶
type BlockStoreImpl ¶
type BlockStoreImpl struct {
// contains filtered or unexported fields
}
func (*BlockStoreImpl) GetBlockchainInfo ¶
func (b *BlockStoreImpl) GetBlockchainInfo() (*common.BlockchainInfo, error)
func (*BlockStoreImpl) RetrieveBlockByHash ¶
func (b *BlockStoreImpl) RetrieveBlockByHash(blockHash []byte) (*common.Block, error)
func (*BlockStoreImpl) RetrieveBlockByNumber ¶
func (b *BlockStoreImpl) RetrieveBlockByNumber(blockNum uint64) (*common.Block, error)
func (*BlockStoreImpl) RetrieveBlockByTxID ¶
func (b *BlockStoreImpl) RetrieveBlockByTxID(txID string) (*common.Block, error)
func (*BlockStoreImpl) RetrieveBlocks ¶
func (b *BlockStoreImpl) RetrieveBlocks(startNum uint64) (ledger.ResultsIterator, error)
func (*BlockStoreImpl) RetrieveTxByBlockNumTranNum ¶
func (*BlockStoreImpl) RetrieveTxByID ¶
func (b *BlockStoreImpl) RetrieveTxByID(txID string) (*common.Envelope, error)
func (*BlockStoreImpl) RetrieveTxValidationCodeByTxID ¶
func (b *BlockStoreImpl) RetrieveTxValidationCodeByTxID(txID string) (peer.TxValidationCode, error)
func (*BlockStoreImpl) Shutdown ¶
func (b *BlockStoreImpl) Shutdown()
type FsBlockstoreProvider ¶
type FsBlockstoreProvider struct {
// contains filtered or unexported fields
}
FsBlockstoreProvider provides handle to block storage - this is not thread-safe
func (*FsBlockstoreProvider) Close ¶
func (p *FsBlockstoreProvider) Close()
Close closes the FsBlockstoreProvider
func (*FsBlockstoreProvider) CreateBlockStore ¶
func (p *FsBlockstoreProvider) CreateBlockStore(ledgerid string) (blkstorage.BlockStore, error)
CreateBlockStore simply calls OpenBlockStore
func (*FsBlockstoreProvider) Exists ¶
func (p *FsBlockstoreProvider) Exists(ledgerid string) (bool, error)
Exists tells whether the BlockStore with given id exists
func (*FsBlockstoreProvider) List ¶
func (p *FsBlockstoreProvider) List() ([]string, error)
List lists the ids of the existing ledgers
func (*FsBlockstoreProvider) OpenBlockStore ¶
func (p *FsBlockstoreProvider) OpenBlockStore(ledgerid string) (blkstorage.BlockStore, error)
OpenBlockStore opens a block store for given ledgerid. If a blockstore is not existing, this method creates one This method should be invoked only once for a particular ledgerid
Click to show internal directories.
Click to hide internal directories.