common

package
v0.0.0-...-168a7d3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpenDBOpt = &opt.Options{}
View Source
var StorageDBPaths = []string{"/nodes", "/blocks", "/assets", "/receipts", "/transactions"}
View Source
var WriteOpt = &opt.WriteOptions{
	NoWriteMerge: false,
	Sync:         true,
}

Functions

func BigEndianBytes

func BigEndianBytes(number uint64) []byte

func BigEndianBytesUint16

func BigEndianBytesUint16(n uint16) []byte

func BigEndianBytesUint32

func BigEndianBytesUint32(n uint32) []byte

func CacheDel

func CacheDel(originDB *leveldb.DB, cacheDB *leveldb.DB, key []byte)

func CacheGet

func CacheGet(originDB *leveldb.DB, cacheDB *leveldb.DB, key []byte) ([]byte, error)

func CacheHas

func CacheHas(originDB *leveldb.DB, cacheDB *leveldb.DB, key []byte) (bool, error)

func GetDBRoot

func GetDBRoot(ctx context.Context, ind *core.IpfsNode, vcid cid.Cid, dbpath string) (dir *mfs.Directory, err error, closer func())

func LittleEndianBytes

func LittleEndianBytes(number uint64) []byte

func LookupDBPath

func LookupDBPath(root *mfs.Root, path string) (*mfs.Directory, error)

func OpenExistedDB

func OpenExistedDB(dir *mfs.Directory, dbkey string) (*leveldb.DB, *ADB.MFSStorage, error)

Types

type AMessageEncode

type AMessageEncode interface {
	RawMessageEncode() []byte
	RawMessageDecode(bs []byte) error
}

type MessageTypePrefix

type MessageTypePrefix uint8

type RawSigner

type RawSigner interface {
	RawSignEncode(account accounts.Account) ([]byte, error)
	RawVerifyDecode(bs []byte) error
}

type VDBCacheServices

type VDBCacheServices interface {
	MergerBatch() *leveldb.Batch
	Close()
}

type VDBSerices

type VDBSerices interface {
	NewWriter() (VDBCacheServices, error)
}

Jump to

Keyboard shortcuts

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