Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DataPath string = fmt.Sprintf("%s/data/v1", repoPath)
Functions ¶
func CloneAndUpdateFactorsData ¶
func CloneAndUpdateFactorsData() error
CloneAndUpdateFactorsData wraps the CloneAndUpdateRepo function with private variables passed.
func CloneAndUpdateRepo ¶
CloneAndUpdateRepo checks if a local repo exists and is up to date with origin. Otherwise, it deletes and clones it to the repoPath.
Types ¶
type Coefficient ¶
type CoefficientData ¶
type Embodied ¶
type Embodied struct { MachineType string `yaml:"type"` AdditionalMemoryKiloWattCO2e float64 `yaml:"additionalmemory"` AdditionalStorageKiloWattCO2e float64 `yaml:"additionalstorage"` AdditionalCPUsKiloWattCO2e float64 `yaml:"additionalcpus"` AdditionalGPUsKiloWattCO2e float64 `yaml:"additionalgpus"` TotalEmbodiedKiloWattCO2e float64 `yaml:"total"` VCPU float64 `yaml:"vCPU"` // vCPU count for instance Type TotalVCPU float64 `yaml:"totalVCPU"` // Highest amount of vCPUs in machine type family Architecture string MachineSpecs }
TODO: Need to add machine lifespan for embodied carbon
type EmbodiedData ¶
type EmissionFactors ¶
type EmissionFactors struct { Provider v1.Provider Coefficient CoefficientData // key is region Embodied EmbodiedData // key is machineType *ProviderDefaults }
func ProviderEmissions ¶
func ProviderEmissions(provider v1.Provider, dataPath string) (*EmissionFactors, error)
ProviderEmissions reads in emission data for a specified provider and stores them into the emissionFactors struct for calulating
type MachineSpecs ¶
type MachineSpecsData ¶
type MachineSpecsData map[string]MachineSpecs // key = architecture name (Haswell, Skylake, ..)
type ProviderDefaults ¶
type ProviderDefaults struct { Provider string `yaml:"name"` MinWatts float64 `yaml:"minWatts"` MaxWatts float64 `yaml:"maxWatts"` HDDStorageWatts float64 `yaml:"hddStorageWatts"` SSDStorageWatts float64 `yaml:"ssdStorageWatts"` NetworkingKilloWattHours float64 `yaml:"networkingKilloWattHours"` MemoryKilloWattHours float64 `yaml:"memoryKilloWattHours"` AveragePUE float64 `yaml:"averagePUE"` }
Click to show internal directories.
Click to hide internal directories.