Documentation ¶
Index ¶
- type Aggregator
- func (a *Aggregator) Collect(summary *controlplane.NodeStatsSummary)
- func (a *Aggregator) GetAntreaClusterNetworkPolicyStats(name string) (*statsv1alpha1.AntreaClusterNetworkPolicyStats, bool)
- func (a *Aggregator) GetAntreaNetworkPolicyStats(namespace, name string) (*statsv1alpha1.AntreaNetworkPolicyStats, bool)
- func (a *Aggregator) GetNetworkPolicyStats(namespace, name string) (*statsv1alpha1.NetworkPolicyStats, bool)
- func (a *Aggregator) ListAntreaClusterNetworkPolicyStats() []statsv1alpha1.AntreaClusterNetworkPolicyStats
- func (a *Aggregator) ListAntreaNetworkPolicyStats(namespace string) []statsv1alpha1.AntreaNetworkPolicyStats
- func (a *Aggregator) ListNetworkPolicyStats(namespace string) []statsv1alpha1.NetworkPolicyStats
- func (a *Aggregator) Run(stopCh <-chan struct{})
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 NewAggregator ¶
func NewAggregator(networkPolicyInformer networkinginformers.NetworkPolicyInformer, cnpInformer crdvinformers.ClusterNetworkPolicyInformer, anpInformer crdvinformers.NetworkPolicyInformer) *Aggregator
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.