sysctl

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NetIPv6Forwarding     = "net/ipv6/conf/all/forwarding"
	NetIPv4Forwarding     = "net/ipv4/ip_forward"
	Ipv4ArpIgnoreAll      = "net/ipv4/conf/all/arp_ignore"
	Ipv4ArpIgnore         = "net/ipv4/conf/%s/arp_ignore"
	PingGroupRange        = "net/ipv4/ping_group_range"
	IPv4RouteLocalNet     = "net/ipv4/conf/%s/route_localnet"
	UnprivilegedPortStart = "net/ipv4/ip_unprivileged_port_start"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// GetSysctl returns the value for the specified sysctl setting
	GetSysctl(sysctl string) (string, error)
	// SetSysctl modifies the specified sysctl flag to the new value
	SetSysctl(sysctl string, newVal string) error
}

Interface is an injectable interface for running sysctl commands.

func New

func New() Interface

New returns a new Interface for accessing sysctl

Jump to

Keyboard shortcuts

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