blockio

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ConfigModuleName is the configuration section of blockio class definitions
	ConfigModuleName = "blockio"
)

Variables

This section is empty.

Functions

func SetContainerClass

func SetContainerClass(c cache.Container, class string) error

SetContainerClass assigns the pod in a container to a blockio class.

func UpdateOciConfig

func UpdateOciConfig(ignoreErrors bool) error

UpdateOciConfig converts the configuration in the opt variable into staticOciBlockIO

Types

type BlockDeviceInfo

type BlockDeviceInfo struct {
	Major   int64
	Minor   int64
	DevNode string
	Origin  string
}

BlockDeviceInfo holds information on a block device to be configured. As users can specify block devices using wildcards ("/dev/disk/by-id/*SSD*") BlockDeviceInfo.Origin is maintained for traceability: why this block device is included in configuration. BlockDeviceInfo.DevNode contains resolved device node, like "/dev/sda".

type Class

type Class struct {
	Name       string
	Parameters cgroups.OciBlockIOParameters
}

Class represents a block I/O class, a class name together with its associated parameters, essentially a single key/value pair from staticOciBlockIO below. This type is only used for querying all (static) block I/O classes in a sorting- form.

func GetClasses

func GetClasses() []*Class

GetClasses returns block I/O class names and associated parameters in sorted slice.

type DevicesParameters

type DevicesParameters struct {
	Devices           []string `json:",omitempty"`
	ThrottleReadBps   string   `json:",omitempty"`
	ThrottleWriteBps  string   `json:",omitempty"`
	ThrottleReadIOPS  string   `json:",omitempty"`
	ThrottleWriteIOPS string   `json:",omitempty"`
	Weight            string   `json:",omitempty"`
}

DevicesParameters defines Block IO parameters for a set of devices.

Jump to

Keyboard shortcuts

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