utils

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 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)

CompactRange 做一次compact @Description: @param dbHandle @param logger

func ConcurrentWriteBatch

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

ConcurrentWriteBatch Concurrent write batch to db @Description: @param batches @param writeFunc @param blockHeight @return error

func ConstructDBIndexInfo

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

ConstructDBIndexInfo 索引序列化 @Description: @param blkIndex @param offset @param byteLen @return []byte

func DecodeValueToIndex

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

DecodeValueToIndex 索引反序列化 @Description: @param blockIndexByte @return *storePb.StoreInfo @return error

func ElapsedMillisSeconds

func ElapsedMillisSeconds(start time.Time) int64

ElapsedMillisSeconds 计算时间差 @Description: @param start @return int64

func PathExists

func PathExists(path string) (bool, error)

PathExists 判断path是否存在 @Description: @param path @return bool @return error

Types

This section is empty.

Jump to

Keyboard shortcuts

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