Documentation ¶
Overview ¶
Package leveldb provides storages of leveldb.
Index ¶
- type Database
- func (st *Database) BlockdataMap(height base.Height) (block.BlockdataMap, bool, error)
- func (st *Database) Clean() error
- func (st *Database) CleanByHeight(height base.Height) error
- func (st *Database) Close() error
- func (st *Database) Copy(source storage.Database) error
- func (st *Database) DB() *leveldb.DB
- func (st *Database) Encoder() encoder.Encoder
- func (st *Database) Encoders() *encoder.Encoders
- func (st *Database) HasOperationFact(h valuehash.Hash) (bool, error)
- func (st *Database) HasStagedOperation(fact valuehash.Hash) (bool, error)
- func (st *Database) Info(key string) ([]byte, bool, error)
- func (st *Database) Initialize() error
- func (st *Database) LastManifest() (block.Manifest, bool, error)
- func (st *Database) LastVoteproof(stage base.Stage) base.Voteproof
- func (st *Database) LocalBlockdataMapsByHeight(height base.Height, callback func(block.BlockdataMap) (bool, error)) error
- func (st *Database) Manifest(h valuehash.Hash) (block.Manifest, bool, error)
- func (st *Database) ManifestByHeight(height base.Height) (block.Manifest, bool, error)
- func (st *Database) Manifests(load, reverse bool, limit int64, ...) error
- func (st *Database) NewOperationSeals(seals []operation.Seal) error
- func (st *Database) NewOperations(ops []operation.Operation) error
- func (st *Database) NewProposal(proposal base.Proposal) error
- func (st *Database) NewSession(blk block.Block) (storage.DatabaseSession, error)
- func (st *Database) NewState(sta state.State) error
- func (st *Database) NewSyncerSession() (storage.SyncerSession, error)
- func (st *Database) Proposal(h valuehash.Hash) (base.Proposal, bool, error)
- func (st *Database) ProposalByPoint(height base.Height, round base.Round, proposer base.Address) (base.Proposal, bool, error)
- func (st *Database) Proposals(callback func(base.Proposal) (bool, error), sort bool) error
- func (st *Database) SetBlockdataMaps(bds []block.BlockdataMap) error
- func (st *Database) SetInfo(key string, b []byte) error
- func (st *Database) StagedOperations(callback func(operation.Operation) (bool, error), sort bool) error
- func (st *Database) StagedOperationsByFact(facts []valuehash.Hash) ([]operation.Operation, error)
- func (st *Database) State(key string) (state.State, bool, error)
- func (st *Database) UnstagedOperations(facts []valuehash.Hash) error
- func (st *Database) Voteproof(height base.Height, stage base.Stage) (base.Voteproof, error)
- type DatabaseSession
- func (bst *DatabaseSession) Block() block.Block
- func (bst *DatabaseSession) Cancel() error
- func (bst *DatabaseSession) Close() error
- func (bst *DatabaseSession) Commit(ctx context.Context, bd block.BlockdataMap) error
- func (bst *DatabaseSession) SetACCEPTVoteproof(voteproof base.Voteproof) error
- func (bst *DatabaseSession) SetBlock(_ context.Context, blk block.Block) error
- type SyncerSession
- func (st *SyncerSession) Close() error
- func (st *SyncerSession) Commit() error
- func (st *SyncerSession) HasBlock(height base.Height) (bool, error)
- func (st *SyncerSession) Manifest(height base.Height) (block.Manifest, bool, error)
- func (st *SyncerSession) SetBlocks(blocks []block.Block, maps []block.BlockdataMap) error
- func (st *SyncerSession) SetManifests(manifests []block.Manifest) error
- func (st *SyncerSession) SetSkipLastBlock(bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func NewDatabase ¶
func (*Database) BlockdataMap ¶
func (*Database) HasOperationFact ¶
func (*Database) HasStagedOperation ¶
func (*Database) Initialize ¶
func (*Database) LocalBlockdataMapsByHeight ¶
func (*Database) ManifestByHeight ¶
func (*Database) NewOperationSeals ¶
func (*Database) NewSession ¶
func (*Database) NewSyncerSession ¶
func (st *Database) NewSyncerSession() (storage.SyncerSession, error)
func (*Database) ProposalByPoint ¶
func (*Database) SetBlockdataMaps ¶
func (st *Database) SetBlockdataMaps(bds []block.BlockdataMap) error
func (*Database) StagedOperations ¶
func (*Database) StagedOperationsByFact ¶
func (*Database) UnstagedOperations ¶
type DatabaseSession ¶
type DatabaseSession struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(st *Database, blk block.Block) (*DatabaseSession, error)
func (*DatabaseSession) Block ¶
func (bst *DatabaseSession) Block() block.Block
func (*DatabaseSession) Cancel ¶
func (bst *DatabaseSession) Cancel() error
func (*DatabaseSession) Close ¶
func (bst *DatabaseSession) Close() error
func (*DatabaseSession) Commit ¶
func (bst *DatabaseSession) Commit(ctx context.Context, bd block.BlockdataMap) error
func (*DatabaseSession) SetACCEPTVoteproof ¶
func (bst *DatabaseSession) SetACCEPTVoteproof(voteproof base.Voteproof) error
type SyncerSession ¶
type SyncerSession struct { sync.RWMutex *logging.Logging // contains filtered or unexported fields }
func NewSyncerSession ¶
func NewSyncerSession(main *Database) *SyncerSession
func (*SyncerSession) Close ¶
func (st *SyncerSession) Close() error
func (*SyncerSession) Commit ¶
func (st *SyncerSession) Commit() error
func (*SyncerSession) HasBlock ¶
func (st *SyncerSession) HasBlock(height base.Height) (bool, error)
func (*SyncerSession) SetBlocks ¶
func (st *SyncerSession) SetBlocks(blocks []block.Block, maps []block.BlockdataMap) error
func (*SyncerSession) SetManifests ¶
func (st *SyncerSession) SetManifests(manifests []block.Manifest) error
func (*SyncerSession) SetSkipLastBlock ¶
func (st *SyncerSession) SetSkipLastBlock(bool)
Click to show internal directories.
Click to hide internal directories.