capacity

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSecureBoot added in v0.5.5

func IsSecureBoot() (bool, error)

Types

type Capacity

type Capacity struct {
	CRU uint64 `json:"cru"`
	MRU uint64 `json:"mru"`
	SRU uint64 `json:"sru"`
	HRU uint64 `json:"hru"`
}

Capacity hold the amount of resource unit of a node

type Disks

type Disks struct {
	Tool        string          `json:"tool"`
	Environment string          `json:"environment"`
	Aggregator  string          `json:"aggregator"`
	Devices     []smartctl.Info `json:"devices"`
}

Disks contains the hardware information about the disk of a node

type ResourceOracle

type ResourceOracle struct {
	// contains filtered or unexported fields
}

ResourceOracle is the structure responsible for capacity tracking

func NewResourceOracle

func NewResourceOracle(s *stubs.StorageModuleStub) *ResourceOracle

NewResourceOracle creates a new ResourceOracle

func (*ResourceOracle) DMI

func (r *ResourceOracle) DMI() (*dmi.DMI, error)

DMI run and parse dmidecode commands

func (*ResourceOracle) Disks

func (r *ResourceOracle) Disks() (d Disks, err error)

Disks list and parse the hardware information using smartctl

func (*ResourceOracle) GetHypervisor

func (r *ResourceOracle) GetHypervisor() (string, error)

GetHypervisor gets the name of the hypervisor used on the node

func (*ResourceOracle) Total

func (r *ResourceOracle) Total() (c gridtypes.Capacity, err error)

Total returns the total amount of resource units of the node

func (*ResourceOracle) Uptime

func (r *ResourceOracle) Uptime() (uint64, error)

Uptime returns the uptime of the node

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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