utils

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactRange

func CompactRange(dbHandle protocol.DBHandle, logger protocol.Logger)

做一次compact

func ConcurrentWriteBatch

func ConcurrentWriteBatch(batches []protocol.StoreBatcher, writeFunc conCurfunc,
	blockHeight uint64) error

ConcurrentWriteBatch Concurrent write batch to db

func ConstructDBIndexInfo added in v2.2.0

func ConstructDBIndexInfo(blkIndex *storePb.StoreInfo, offset, byteLen uint64) []byte

索引序列化

func DecodeValueToIndex added in v2.2.0

func DecodeValueToIndex(blockIndexByte []byte) (*storePb.StoreInfo, error)

索引反序列化

func ElapsedMillisSeconds added in v2.2.0

func ElapsedMillisSeconds(start time.Time) int64

计算时间差

func PathExists added in v2.2.0

func PathExists(path string) (bool, error)

判断path是否存在

Types

This section is empty.

Jump to

Keyboard shortcuts

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