agenttool

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDiskSize

func GetDiskSize(path string) (datasize.ByteSize, error)

GetDiskSize if dir recursion sum size, file return size directly. return size unit is Byte

func IsPathBeLocked

func IsPathBeLocked(path string) bool

func IsTarCommandExist

func IsTarCommandExist() bool

func LockPath

func LockPath(path string) error

func Mv

func Mv(sourceDir, destDir string) error

func Tar

func Tar(tarFile, tarDir string) error

Tar is the forth step of reource agent do

可选方案: a. tar 目标地址直接指向 NFS b. 在容器内制作 tar,移动至 NFS 经过测试,选用 a 速度更快

func UnLockPath

func UnLockPath(path string) error

func UnTar

func UnTar(tarFile, unTarDir string) error

func WaitingPathUnlock

func WaitingPathUnlock(path string, maxLimitSec int) error

WaitingPathUnlock check path is locked at first, then check every second until unlocked or time limited

Types

This section is empty.

Jump to

Keyboard shortcuts

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