Skip to main content

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​