component-helpersk8s.io/component-helpers/node/util/sysctl/testing Index | Files

package testing

import "k8s.io/component-helpers/node/util/sysctl/testing"

Index

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.

Source Files

fake.go

Version
v0.32.2 (latest)
Published
Feb 13, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
2 months ago

Tools for package owners.