hardware

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

dms

Table of Contents

  1. Description
  2. Structure and Organisation
  3. Functionality
  4. Data Types
  5. Testing
  6. References

Specification

Description

The hardware package is responsible for handling the hardware related functionalities of the DMS.

Structure and Organisation

Here is quick overview of the contents of this package:

cpu: This package contains the functionality related to the CPU of the device.

ram.go: This file contains the functionality related to the RAM.

disk.go: This file contains the functionality related to the Disk.

gpu: This package contains the functionality related to the GPU of the device.

Functionality
GetMachineResources()
  • signature: GetMachineResources() (types.MachineResources, error)
  • input: None
  • output: types.MachineResources
  • output(error): error
GetCPU()
  • signature: GetCPU() (types.CPU, error)
  • input: None
  • output: types.CPU
  • output(error): error
GetRAM()
  • signature: GetRAM() (types.RAM, error)
  • input: None
  • output: types.RAM
  • output(error): error
GetDisk()
  • signature: GetDisk() (types.Disk, error)
  • input: None
  • output: types.Disk
  • output(error): error
Data Types

The hardware types can be found in the types package.

Testing

The tests can be found in the *_test.go files in the respective packages.

References

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDisk

func GetDisk() (types.Disk, error)

GetDisk returns the types.Disk for the system

func GetDiskUsage

func GetDiskUsage() (types.Disk, error)

GetDiskUsage returns the types.Disk usage

func GetRAM

func GetRAM() (types.RAM, error)

GetRAM returns the types.RAM information for the system

func GetRAMUsage

func GetRAMUsage() (types.RAM, error)

GetRAMUsage returns the RAM usage

func NewHardwareManager

func NewHardwareManager() types.HardwareManager

NewHardwareManager creates a new instance of defaultHardwareManager.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳