stats

package
Version: v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

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

Aggregator collects the stats from the antrea-agents, aggregates them, caches the result, and provides interfaces for Stats API handlers to query them. It implements the following interfaces: - pkg/apiserver/registry/controlplane/nodestatssummary.statsCollector - pkg/apiserver/registry/stats/networkpolicystats.statsProvider - pkg/apiserver/registry/stats/antreaclusternetworkpolicystats.statsProvider - pkg/apiserver/registry/stats/antreanetworkpolicystats.statsProvider

func (*Aggregator) Collect

func (a *Aggregator) Collect(summary *controlplane.NodeStatsSummary)

Collect collects the node summary asynchronously to avoid the competition for the statsLock and to save clients from pending on it.

func (*Aggregator) GetAntreaClusterNetworkPolicyStats

func (a *Aggregator) GetAntreaClusterNetworkPolicyStats(name string) (*statsv1alpha1.AntreaClusterNetworkPolicyStats, bool)

func (*Aggregator) GetAntreaNetworkPolicyStats

func (a *Aggregator) GetAntreaNetworkPolicyStats(namespace, name string) (*statsv1alpha1.AntreaNetworkPolicyStats, bool)

func (*Aggregator) GetNetworkPolicyStats

func (a *Aggregator) GetNetworkPolicyStats(namespace, name string) (*statsv1alpha1.NetworkPolicyStats, bool)

func (*Aggregator) ListAntreaClusterNetworkPolicyStats

func (a *Aggregator) ListAntreaClusterNetworkPolicyStats() []statsv1alpha1.AntreaClusterNetworkPolicyStats

func (*Aggregator) ListAntreaNetworkPolicyStats

func (a *Aggregator) ListAntreaNetworkPolicyStats(namespace string) []statsv1alpha1.AntreaNetworkPolicyStats

func (*Aggregator) ListNetworkPolicyStats

func (a *Aggregator) ListNetworkPolicyStats(namespace string) []statsv1alpha1.NetworkPolicyStats

func (*Aggregator) Run

func (a *Aggregator) Run(stopCh <-chan struct{})

Run runs a loop that keeps taking stats summary from the data channel and actually collecting them until the provided stop channel is closed.

Source Files

Jump to

Keyboard shortcuts

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