common

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.1.4"

Variables

This section is empty.

Functions

func CommandMpstat

func CommandMpstat() (*[]float64, error)

func GetCpuStatus

func GetCpuStatus() (*[]float64, error)

func GetFqdn

func GetFqdn() *string

func GetOutboundIP

func GetOutboundIP() *net.IP

func GetUuid

func GetUuid() *string

Types

type IpData

type IpData struct {
	IDX          int    `json:"idx"`
	IP           net.IP `json:"ip"`
	IntName      string `json:"int_name"`
	HardwareAddr string `json:"hardware_addr"`
}

type LinkData

type LinkData struct {
	Token    string `json:"token"`
	Uuid     string `json:"uuid"`
	Hostname string `json:"hostname"`
	Version  string `json:"version"`
}

type ScannerData

type ScannerData struct {
	Version  string           `json:"version"`
	Uuid     string           `json:"uuid"`
	Load     []float64        `json:"load"`
	Hostname string           `json:"hostname"`
	CpuCors  int              `json:"cores"`
	Ram      uint64           `json:"ram"`
	Disk     syscall.Statfs_t `json:"disk"`
	IpData   []IpData         `json:"ip_data"`
	IpAddr   net.IP           `json:"ip_addr"`
	Tasks    []database.Task  `json:"tasks"`
}

func GetScannerData

func GetScannerData() (*ScannerData, error)

Jump to

Keyboard shortcuts

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