utils

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 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 added in v0.39.0

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 added in v0.39.0

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

MemStat holds information about the current memory.

func (MemStat) String added in v0.39.0

func (ms MemStat) String() string

Jump to

Keyboard shortcuts

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