coefficients

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmissionsPerRegion map[string]Emissions

EmissionsPerRegion is a map of regions to their emissions

Functions

This section is empty.

Types

type Coefficients

type Coefficients struct {
	CPUMinWh       decimal.Decimal `json:"cpu_min_wh"`
	CPUMaxWh       decimal.Decimal `json:"cpu_max_wh"`
	StorageHddWhTb decimal.Decimal `json:"storage_hdd_wh_tb"`
	StorageSsdWhTb decimal.Decimal `json:"storage_ssd_wh_tb"`
	NetworkingWhGb decimal.Decimal `json:"networking_wh_gb"`
	MemoryWhGb     decimal.Decimal `json:"memory_wh_gb"`
	PueAverage     decimal.Decimal `json:"pue_average"`
}

Coefficients is a struct that contains the coefficients for the energy estimation

type CoefficientsProviders

type CoefficientsProviders struct {
	AWS   Coefficients `json:"AWS"`
	GCP   Coefficients `json:"GCP"`
	Azure Coefficients `json:"Azure"`
}

CoefficientsProviders is a struct that contains the coefficients for the energy estimation per provider

func GetEnergyCoefficients

func GetEnergyCoefficients() *CoefficientsProviders

GetEnergyCoefficients returns the coefficients for the energy estimation

func (*CoefficientsProviders) GetByProvider added in v0.3.0

func (cps *CoefficientsProviders) GetByProvider(provider providers.Provider) Coefficients

GetByProvider returns the coefficients for the energy estimation of a provider

type Emissions added in v0.3.0

type Emissions struct {
	Region              string
	Location            string
	GridCarbonIntensity decimal.Decimal
}

Emissions is the emissions of a region

func RegionEmission added in v0.3.0

func RegionEmission(provider providers.Provider, region string) (*Emissions, error)

RegionEmission returns the emissions of a region

Jump to

Keyboard shortcuts

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