blockio

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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