utils

package
v0.55.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFiles

func DeleteFiles(dirPath string, targetFreeSpace uint64, pageSize int, freeSpace func() (uint64, error), logger log.Logger) (int, error)

DeleteFiles deletes a files until the free capacity reaches the target free capacity

func GetNOldestFiles

func GetNOldestFiles(dirPath string, filePageSize int) ([]file, error)

GetNOldestFiles returns the N oldest files on success or empty file slice and an error.

Types

type MemStat

type MemStat struct {
	// contains filtered or unexported fields
}

MemStat holds information about the current memory.

func (MemStat) String

func (ms MemStat) String() string

Jump to

Keyboard shortcuts

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