...

Package batterylevel

import "context-awareness/plugins/batterylevel"
Overview
Index

Overview ▾

Constants

const (
    PluginName = "BatteryLevel"

    // The label that describes the current battery level in percent (as an integer).
    NodeBatteryLevelLabel = "polaris-slo-cloud.github.io/battery.level"

    // The label that describes the battery capacity in mAh.
    NodeBatteryCapacityLabel = "polaris-slo-cloud.github.io/battery.capacity-mah"

    // The label that describes the requested minimum battery level in percent (as an integer).
    PodMinBatteryLevelLabel = "polaris-slo-cloud.github.io/battery.min-level"

    // The label that describes the minimum battery capacity in mAh.
    PodMinBatteryCapacityLabel = "polaris-slo-cloud.github.io/battery.min-capacity-mah"
)

func NewBatteryLevelClusterAgentPlugin

func NewBatteryLevelClusterAgentPlugin(configMap config.PluginConfig, clusterAgentServices pipeline.ClusterAgentServices) (pipeline.Plugin, error)

func NewBatteryLevelSchedulingPlugin

func NewBatteryLevelSchedulingPlugin(configMap config.PluginConfig, scheduler pipeline.PolarisScheduler) (pipeline.Plugin, error)

type BatteryLevelPlugin

The BatteryLevelPlugin ensures that a node meets certain battery level requirements requested by a pod.

type BatteryLevelPlugin struct {
}

func (*BatteryLevelPlugin) Filter

func (blp *BatteryLevelPlugin) Filter(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo, nodeInfo *pipeline.NodeInfo) pipeline.Status

func (*BatteryLevelPlugin) Name

func (blp *BatteryLevelPlugin) Name() string

func (*BatteryLevelPlugin) PreFilter

func (blp *BatteryLevelPlugin) PreFilter(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo) pipeline.Status