operations

package
v1.5.0-659.f45d675 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wbt

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

Wbt is WrapWbt implementation with CMD executor

func NewWbt

func NewWbt(e command.CmdExecutor) *Wbt

NewWbt returns Wbt instance

func (*Wbt) RestoreDefault

func (w *Wbt) RestoreDefault(device string) error

RestoreDefault restores default Wbt value for given device Example output: sh -c echo -1 /sys/block/<device>/queue/wbt_lat_usec

func (*Wbt) SetValue

func (w *Wbt) SetValue(device string, value uint32) error

SetValue checks Wbt value for given device and change it if not equal Example output: sh -c echo <value> /sys/block/<device>/queue/wbt_lat_usec

type WrapWbt

type WrapWbt interface {
	SetValue(device string, value uint32) error
	RestoreDefault(device string) error
}

WrapWbt is an interface that encapsulates operation with WBT

Jump to

Keyboard shortcuts

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