gatherers

package
v0.0.0-...-73997e6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerResourceGatherer

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

ContainerResourceGatherer gathers resource metrics from containers.

func NewResourceUsageGatherer

func NewResourceUsageGatherer(c clientset.Interface, host string, port int, provider provider.Provider, options ResourceGathererOptions, namespace string) (*ContainerResourceGatherer, error)

NewResourceUsageGatherer creates new instance of ContainerResourceGatherer

func (*ContainerResourceGatherer) Dispose

func (g *ContainerResourceGatherer) Dispose()

Dispose disposes container resource gatherer.

func (*ContainerResourceGatherer) StartGatheringData

func (g *ContainerResourceGatherer) StartGatheringData()

StartGatheringData starts a stat gathering worker blocks for each node to track, and blocks until StopAndSummarize is called.

func (*ContainerResourceGatherer) StopAndSummarize

func (g *ContainerResourceGatherer) StopAndSummarize(percentiles []int) (*ResourceUsageSummary, error)

StopAndSummarize stops stat gathering workers, processes the collected stats, generates resource summary for the passed-in percentiles, and returns the summary.

type NodesSet

type NodesSet int

NodesSet is a flag defining the node set range.

const (
	// AllNodes - all containers on all nodes
	AllNodes NodesSet = 0
	// MasterAndNonDaemons - all containers on Master nodes and non-daemons on other nodes.
	MasterAndNonDaemons NodesSet = 1
)

type ResourceGathererOptions

type ResourceGathererOptions struct {
	InKubemark                        bool
	Nodes                             NodesSet
	ResourceDataGatheringPeriod       time.Duration
	MasterResourceDataGatheringPeriod time.Duration
}

ResourceGathererOptions specifies options for ContainerResourceGatherer.

type ResourceUsageSummary

type ResourceUsageSummary map[string][]util.SingleContainerSummary

ResourceUsageSummary represents summary of resource usage per container.

func (*ResourceUsageSummary) Get

Get returns collection of SingleContainerSummaries for given percentile.

Jump to

Keyboard shortcuts

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