sysctl

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int16

type Int16 struct {
	// contains filtered or unexported fields
}

Int16 represents a 16 bit int sysctl

func NewInt16

func NewInt16(sysctl string, cacheFor time.Duration) *Int16

NewInt16 creates a new sysctl.Int16

`sysctl` is the path for the sysctl, e.g. net.inet.ip.portrange.first `cacheFor` caches the sysctl's value for the given time duration; `0` disables caching

func (*Int16) Get

func (i *Int16) Get() (uint16, error)

Get gets the current value of the sysctl

Jump to

Keyboard shortcuts

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