sysinfo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NumCPU

func NumCPU() int

NumCPU returns the number of CPUs. On Linux and Windows, it returns the number of CPUs which are currently online. On other platforms, it's the equivalent of runtime.NumCPU.

Types

type SysInfo

type SysInfo struct {
	cgroups.Info

	// Whether the kernel supports AppArmor or not
	AppArmor bool

	// Whether the kernel supports Seccomp or not
	Seccomp bool

	// Whether IPv4 forwarding is supported or not, if this was disabled, networking will not work
	IPv4ForwardingDisabled bool

	// Warnings contains a slice of warnings that occurred  while collecting
	// system information. These warnings are intended to be informational
	// messages for the user, and can either be logged or returned to the
	// client; they are not intended to be parsed / used for other purposes,
	// and do not have a fixed format.
	Warnings []error
}

func New

func New(path string) (*SysInfo, []error, error)

Jump to

Keyboard shortcuts

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