kubernetesk8s.io/kubernetes/pkg/util/sysctl/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/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
v1.19.7
Published
Jan 13, 2021
Platform
js/wasm
Imports
2 packages
Last checked
34 seconds ago

Tools for package owners.