providers

package
v0.0.0-...-77a5a62 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupported

func IsSupported(providerType string) bool

Types

type EmissionsType

type EmissionsType string
const (
	Average  EmissionsType = "average"
	Marginal EmissionsType = "marginal"
)

func GetSupportedEmissionsTypes

func GetSupportedEmissionsTypes() []EmissionsType

type Provider

type Provider interface {
	GetCurrent(ctx context.Context, zone string) (float64, error)
	GetForecast(ctx context.Context, zone string) (map[time.Time]float64, error)
}

func GetProvider

func GetProvider(
	ctx context.Context,
	req ctrl.Request,
	kClient client.Client,
	providerRef *v1.ObjectReference,
) (Provider, error)

type ProviderType

type ProviderType string
const (
	WattTime        ProviderType = "watttime"
	ElectricityMaps ProviderType = "electricitymaps"
	Simulator       ProviderType = "simulator"
)

func GetSupportedProviders

func GetSupportedProviders() []ProviderType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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