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: 0

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