v0.0.0-...-8b8575e Latest Latest

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 12 Imported by: 0




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


This section is empty.


func SetContainerClass

func SetContainerClass(cntnrDir string, class string) error

SetContainerClass assigns a to a blockio class. cntnrDir is the cgroup directory of the container without mountpoint and controller (blkio) directory.

func UpdateOciConfig

func UpdateOciConfig(ignoreErrors bool) error

UpdateOciConfig converts the configuration in the opt variable into staticOciBlockIO


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