diskfill

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Percentage Mode   = "PERCENTAGE"
	MBToFill   Mode   = "MB_TO_FILL"
	MBLeft     Mode   = "MB_LEFT"
	AtOnce     Method = "AT_ONCE"
	OverTime   Method = "OVER_TIME"
)

Variables

This section is empty.

Functions

func CheckPathWritableProcess added in v1.5.15

func CheckPathWritableProcess(ctx context.Context, targetPath string) error

func CheckPathWritableRunc added in v1.5.15

func CheckPathWritableRunc(ctx context.Context, r ociruntime.OciRuntime, sidecar SidecarOpts, targetPath string) error

Types

type DiskUsage

type DiskUsage struct {
	Capacity  int64
	Used      int64
	Available int64
}

DiskUsage represents disk usage statistics. Measured in 1K blocks.

func CalculateDiskUsage

func CalculateDiskUsage(r io.Reader) (DiskUsage, error)

type Diskfill added in v1.4.0

type Diskfill interface {
	Exited() (bool, error)
	Start() error
	Stop() error
	Args() []string
	Noop() bool
}

func NewDiskfillProcess added in v1.4.0

func NewDiskfillProcess(ctx context.Context, opts Opts) (Diskfill, error)

func NewDiskfillRunc added in v1.4.0

func NewDiskfillRunc(ctx context.Context, r ociruntime.OciRuntime, sidecar SidecarOpts, opts Opts) (Diskfill, error)

type Method

type Method string

type Mode

type Mode string

type Opts

type Opts struct {
	BlockSize int  // in megabytes
	Size      int  // in megabytes or percentage
	Mode      Mode // PERCENTAGE or MB_TO_FILL or MB_LEFT
	TempPath  string
	Method    Method // AT_ONCE or OVER_TIME
}

func (Opts) Args added in v1.4.0

func (o Opts) Args(tempPathOverride string, readDiskUsageFn func(path string) (*DiskUsage, error)) ([]string, error)

type SidecarOpts

type SidecarOpts struct {
	TargetProcess ociruntime.LinuxProcessInfo
	Id            string
}

Jump to

Keyboard shortcuts

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