Documentation ¶
Index ¶
- Constants
- Variables
- func Clean(dataPath string, dryRun bool, logger *logrus.Logger) error
- func SelectNcduDataPath() string
- func TopHugeDirsFromNcdu(topN uint64, raw []byte, parentPath string, maxDepth, depth uint64) (map[string]uint64, uint64, error)
- type DiskUsageChecker
- type NcduNode
- type UsageConfig
Constants ¶
View Source
const ( NCDU_EXPORT_DATA_PATH = "/data" NCDU_JOB_LOCK_PREFIX = "/tmp/sa-disk-ncdu-lock-" DATA_STALE_THRESHOLD = time.Hour )
Variables ¶
View Source
var (
RE_TIMESTRING = regexp.MustCompile(`\d{14}`)
)
Functions ¶
func SelectNcduDataPath ¶
func SelectNcduDataPath() string
Types ¶
type DiskUsageChecker ¶
type DiskUsageChecker struct {
// contains filtered or unexported fields
}
func NewDiskUsageChecker ¶
func NewDiskUsageChecker(config *UsageConfig, logger *logrus.Logger) (*DiskUsageChecker, error)
func (*DiskUsageChecker) Check ¶
func (c *DiskUsageChecker) Check() error
func (*DiskUsageChecker) FindLatestExportedData ¶
func (c *DiskUsageChecker) FindLatestExportedData() error
func (*DiskUsageChecker) HasDataFile ¶
func (c *DiskUsageChecker) HasDataFile() bool
func (*DiskUsageChecker) IsForceRead ¶
func (c *DiskUsageChecker) IsForceRead() bool
func (*DiskUsageChecker) ReadData ¶
func (c *DiskUsageChecker) ReadData() error
Click to show internal directories.
Click to hide internal directories.