Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClusterInfoResource = schema.GroupVersionResource{Group: mcadv1beta1.GroupVersion.Group, Version: mcadv1beta1.GroupVersion.Version, Resource: "clusterinfo"}
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
A monitor instace contains a list of Clusters, and rest client
func NewMonitor ¶
NewMonior creates a Monitor instance and configures its clients.
func (Monitor) GetCarbonFromFile ¶
Read carbon from file
func (*Monitor) GetClusters ¶
create the list of spoke Clusters, each spoke is corresponding to one clusterinfo object in hub
func (Monitor) GetForecastedCarbonIntensity ¶
func (Monitor) UpdateCarbon ¶
Retrive carbon intensity and update the carbon field of clusterinfo object
func (Monitor) UpdateClusterInfo ¶
get the names and geolocation of each spoke, update the carbon intensity of its corresponding cluster Info object in the hub.
Click to show internal directories.
Click to hide internal directories.