networktraffic

package
v0.0.0-...-efe589a Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "NetworkTraffic"

Variables

This section is empty.

Functions

Types

type NetworkTraffic

type NetworkTraffic struct {
	// contains filtered or unexported fields
}

NetworkTraffic is a score plugin that favors nodes based on their network traffic amount. Nodes with less traffic are favored. Implements framework.ScorePlugin

func (*NetworkTraffic) Name

func (n *NetworkTraffic) Name() string

func (*NetworkTraffic) NormalizeScore

func (n *NetworkTraffic) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status

func (*NetworkTraffic) Score

func (n *NetworkTraffic) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status)

func (*NetworkTraffic) ScoreExtensions

func (n *NetworkTraffic) ScoreExtensions() framework.ScoreExtensions

type PrometheusHandler

type PrometheusHandler struct {
	// contains filtered or unexported fields
}

func NewPrometheus

func NewPrometheus(address, networkInterface string, timeRange time.Duration) *PrometheusHandler

func (*PrometheusHandler) GetNodeBandwidthMeasure

func (p *PrometheusHandler) GetNodeBandwidthMeasure(node string) (*model.Sample, error)

Jump to

Keyboard shortcuts

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