system

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-system

GoDoc Go CodeQL Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LiveInformationCh chan LiveInformation

Functions

This section is empty.

Types

type BasicSystemInformation

type BasicSystemInformation struct {
	Value      string  `json:"value" validate:"required"`
	Percentage float64 `json:"percentage" validate:"required"`
}

type CPU

type CPU struct {
	Name         string `json:"name" validate:"required"`
	Threads      int    `json:"threads" validate:"required"`
	Architecture string `json:"architecture" validate:"required"`
}

type CpuSystemInformation

type CpuSystemInformation struct {
	Value      string    `json:"value" validate:"required"`
	Percentage []float64 `json:"percentage" validate:"required"`
}

type LiveInformation

type LiveInformation struct {
	CPU          CpuSystemInformation   `json:"cpu" validate:"required"`
	Ram          BasicSystemInformation `json:"ram" validate:"required"`
	Disk         BasicSystemInformation `json:"disk" validate:"required"`
	ServerUptime uint64                 `json:"server_uptime" validate:"required"`
}

type StaticInformation

type StaticInformation struct {
	CPU  CPU     `json:"cpu" validate:"required"`
	Ram  Storage `json:"ram" validate:"required"`
	Disk Storage `json:"disk" validate:"required"`
}

type Storage

type Storage struct {
	Readable   string  `json:"readable" validate:"required"`
	Value      float64 `json:"value" validate:"required"`
	UnitString string  `json:"unit_string" validate:"required"`
	Unit       float64 `json:"unit" validate:"required"`
}

type System

type System struct {
	Live   LiveInformation   `json:"live" validate:"required"`
	Static StaticInformation `json:"static" validate:"required"`
}

func (*System) Initialize

func (s *System) Initialize()

func (*System) UpdateLiveInformation

func (s *System) UpdateLiveInformation()

Jump to

Keyboard shortcuts

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