Documentation ¶
Index ¶
- Constants
- Variables
- func NewProvider(conf *Conf, indexConfig *blkstorage.IndexConfig) blkstorage.BlockStoreProvider
- type Conf
- 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)
Constants ¶
View Source
const ( // ChainsDir = "chains" // IndexDir = "index" )
Variables ¶
View Source
var ErrUnexpectedEndOfBlockfile = errors.New("unexpected end of blockfile")
这主要发生在出现块和部分块内容时发生崩溃的情况下。
Functions ¶
func NewProvider ¶
func NewProvider(conf *Conf, indexConfig *blkstorage.IndexConfig) blkstorage.BlockStoreProvider
Types ¶
type FsBlockstoreProvider ¶
type FsBlockstoreProvider struct {
// contains filtered or unexported fields
}
func (*FsBlockstoreProvider) Close ¶
func (p *FsBlockstoreProvider) Close()
func (*FsBlockstoreProvider) CreateBlockStore ¶
func (p *FsBlockstoreProvider) CreateBlockStore(ledgerid string) (blkstorage.BlockStore, error)
func (*FsBlockstoreProvider) Exists ¶
func (p *FsBlockstoreProvider) Exists(ledgerid string) (bool, error)
func (*FsBlockstoreProvider) List ¶
func (p *FsBlockstoreProvider) List() ([]string, error)
func (*FsBlockstoreProvider) OpenBlockStore ¶
func (p *FsBlockstoreProvider) OpenBlockStore(ledgerid string) (blkstorage.BlockStore, error)
Click to show internal directories.
Click to hide internal directories.