sysctl

package
v1.12.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sysctl allows to change kernel parameters at runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySettings

func ApplySettings(sysSettings []Setting) error

ApplySettings applies all settings in sysSettings.

func Disable

func Disable(name string) error

Disable disables the given sysctl parameter.

func Enable

func Enable(name string) error

Enable enables the given sysctl parameter.

func Read

func Read(name string) (string, error)

Read reads the given sysctl parameter.

func Write

func Write(name string, val string) error

Write writes the given sysctl parameter.

Types

type ErrInvalidSysctlParameter

type ErrInvalidSysctlParameter string

An ErrInvalidSysctlParameter is returned when a parameter is invalid.

func (ErrInvalidSysctlParameter) Error

type Setting

type Setting struct {
	Name      string
	Val       string
	IgnoreErr bool
}

Setting represents a sysctl setting. Its purpose it to be able to iterate over a slice of settings.

Jump to

Keyboard shortcuts

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