vsysinfo

package
v0.0.0-...-1671bb8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNetwork

func GetNetwork() (map[string]*OSNetwork, error)

Types

type OSNetwork

type OSNetwork struct {
	Index       int          `json:"index"`
	Name        string       `json:"name"`
	MAC         string       `json:"mac"`
	MTU         int          `json:"mtu"`
	Flags       string       `json:"flags"`
	IP          []*net.IPNet `json:"ip"`
	IsUp        bool         `json:"is_up"`
	IsMulticast bool         `json:"is_multicast"`
	IsBroadcast bool         `json:"is_broadcast"`
	IsLoopback  bool         `json:"is_loopback"`
}

type OSRuntime

type OSRuntime struct {
	PID  int      `json:"pid"`
	UID  int      `json:"uid"`
	GID  int      `json:"gid"`
	WD   string   `json:"wd"`
	Envs []string `json:"envs"`
}

func GetRuntime

func GetRuntime() (*OSRuntime, error)

type SysInfo

type SysInfo struct {
	OS       string                `json:"os"`
	Arch     string                `json:"arch"`
	NumCPU   int                   `json:"num_cpu"`
	Hostname string                `json:"hostname"`
	Runtime  *OSRuntime            `json:"runtime"`
	Network  map[string]*OSNetwork `json:"network"`
}

func NewSysInfo

func NewSysInfo() (*SysInfo, error)

Jump to

Keyboard shortcuts

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