testing

package
v1.21.12-rc.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake added in v1.18.0

type Fake struct {
	Settings map[string]int
}

Fake is a map-backed implementation of sysctl.Interface, for testing/mocking.

func NewFake

func NewFake() *Fake

NewFake creates a fake sysctl implementation.

func (*Fake) GetSysctl added in v1.18.0

func (m *Fake) GetSysctl(sysctl string) (int, error)

GetSysctl returns the value for the specified sysctl setting.

func (*Fake) SetSysctl added in v1.18.0

func (m *Fake) SetSysctl(sysctl string, newVal int) error

SetSysctl modifies the specified sysctl flag to the new value.

Jump to

Keyboard shortcuts

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