Documentation ¶
Index ¶
- func ApplyPatch(db DB, patch Patch) error
- func ApplyWithoutOverride(db db, patch Patch) error
- func DebugDB(db DB) string
- func DebugPatch(patch Patch) string
- func GetEntryByHash(db DB, hash types.Hash) ([]byte, error)
- func GetEntryByHeight(db DB, height uint64) ([]byte, error)
- func GetFrontierIdentifier(db DB) types.HashHeight
- func GetIdentifierByHash(db DB, hash types.Hash) (*types.HashHeight, error)
- func PatchHash(patch Patch) types.Hash
- func SetFrontier(db DB, version types.HashHeight, data []byte) error
- type Commit
- type DB
- type LevelDBLike
- type LevelDBLikeRO
- type Manager
- type Patch
- type PatchReplayer
- type StorageIterator
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPatch ¶
func ApplyWithoutOverride ¶
func DebugPatch ¶
func GetFrontierIdentifier ¶
func GetFrontierIdentifier(db DB) types.HashHeight
func GetIdentifierByHash ¶
func SetFrontier ¶
func SetFrontier(db DB, version types.HashHeight, data []byte) error
Types ¶
type Commit ¶
type Commit interface { Identifier() types.HashHeight Previous() types.HashHeight Serialize() ([]byte, error) }
type DB ¶
type DB interface { Get([]byte) ([]byte, error) Has([]byte) (bool, error) Put(key, value []byte) error Delete(key []byte) error NewIterator(prefix []byte) StorageIterator Subset(prefix []byte) DB Apply(Patch) error Changes() (Patch, error) Snapshot() DB }
func DisableNotFound ¶
func NewLevelDBWrapper ¶
type LevelDBLike ¶
type LevelDBLike interface { LevelDBLikeRO Put(key []byte, value []byte, wo *opt.WriteOptions) error }
type LevelDBLikeRO ¶
type Manager ¶
type Manager interface { Frontier() DB Get(types.HashHeight) DB GetPatch(identifier types.HashHeight) Patch Add(Transaction) error Pop() error Stop() error Location() string }
func NewLevelDBManager ¶
func NewMemDBManager ¶
type Patch ¶
type Patch interface { Put(key []byte, value []byte) Delete(key []byte) Replay(PatchReplayer) error Dump() []byte }
func NewPatchFromDump ¶
func PrefixPatchValues ¶
func RollbackPatch ¶
type PatchReplayer ¶
type StorageIterator ¶
type Transaction ¶
Click to show internal directories.
Click to hide internal directories.