metrics

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerGroupCacheTTLSeconds = 60 * 5
)

Variables

This section is empty.

Functions

func NewContainerInsightsMetricsProvider

func NewContainerInsightsMetricsProvider(metricsGetter MetricsGetter, resourceGroup string) *insightsGetter

func NewPodStatsGetterDecider

func NewPodStatsGetterDecider(containerInsightsGetter podStatsGetter, realTimeGetter podStatsGetter, rgName string, aciCGGetter ContainerGroupGetter) *podStatsGetterDecider

func NewRealTimeMetrics

func NewRealTimeMetrics() *realTimeMetrics

func WrapCachedPodStatsGetter

func WrapCachedPodStatsGetter(ttlSeconds int, getter podStatsGetter) *cachePodStatsGetter

Types

type ACIPodMetricsProvider

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

func NewACIPodMetricsProvider

func NewACIPodMetricsProvider(nodeName, aciResourcegroup string, podGetter PodGetter, aciCGGetter ContainerGroupGetter, aciCGMetricsGetter MetricsGetter) *ACIPodMetricsProvider

func (*ACIPodMetricsProvider) GetStatsSummary

func (p *ACIPodMetricsProvider) GetStatsSummary(ctx context.Context) (summary *stats.Summary, err error)

GetStatsSummary returns the stats summary for pods running on ACI

type ContainerGroupGetter

type ContainerGroupGetter interface {
	GetContainerGroup(ctx context.Context, resourceGroup, containerGroupName string) (*aci.ContainerGroup, *int, error)
}

package dependency: query the Container Group information

type MetricsGetter

type MetricsGetter interface {
	GetContainerGroupMetrics(ctx context.Context, resourceGroup, containerGroup string, options aci.MetricsRequest) (*aci.ContainerGroupMetricsResult, error)
}

package dependency: query the Pod's correspoinding Container Group metrics from Container Insights

type PodGetter

type PodGetter interface {
	GetPods() []*v1.Pod
}

package dependency: query the Pods in current virtual nodes. it usually is ResourceManager

Jump to

Keyboard shortcuts

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