fsblkstorage

package
v0.0.0-...-523a819 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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 Conf

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

func NewConf

func NewConf(blockStorageDir string, maxBlockfileSize int) *Conf

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL