testing

package
v0.30.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

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

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

GetSysctl returns the value for the specified sysctl setting.

func (*Fake) SetSysctl

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