utils

package
v2.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package utils package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPathRWMod added in v2.3.3

func CheckPathRWMod(path string) error

CheckPathRWMod 判断path是否存在且有写权限 @Description: @param path @return bool @return error

func CompactRange

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

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

func ConstructDBIndexInfo added in v2.2.0

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

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

func CreatePath added in v2.3.4

func CreatePath(path string) error

CreatePath add next time @Description: @param path @return error

func DecodeValueToIndex added in v2.2.0

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

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

func ElapsedMillisSeconds added in v2.2.0

func ElapsedMillisSeconds(start time.Time) int64

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

func FileLocker added in v2.3.4

func FileLocker(f *os.File) error

FileLocker add next time

@Description:
@param f
@return error

func FileUnLocker added in v2.3.4

func FileUnLocker(f *os.File) error

FileUnLocker add next time

@Description:
@param f
@return error

func PathExists added in v2.2.0

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