metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package metrics contains the metric definitions which will be exported by metrics-server-exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetNodeResourceCapacity

func SetNodeResourceCapacity(node string, r Resource, value float64)

SetNodeResourceCapacity sets the actual capacity metric for a node and compute resource.

func SetNodeResourceUsage

func SetNodeResourceUsage(node string, r Resource, value float64)

SetNodeResourceUsage sets the resource usage metric for the given node and compute resource.

func SetPodResourceUsage

func SetPodResourceUsage(namespace, pod string, r Resource, value float64)

SetPodResourceUsage sets the resource usage metric for the given namespace/pod combination.

Types

type Resource

type Resource int

Resource is a type to describe a compute resource

const (
	// CPU describes cpu resources
	CPU Resource = iota
	// Memory describes memory resources
	Memory
)

func (Resource) String

func (r Resource) String() string

Jump to

Keyboard shortcuts

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