Documentation ¶
Index ¶
- Constants
- 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) GetMulticastGroup(group string) (*statsv1alpha1.MulticastGroup, 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) ListMulticastGroups() []statsv1alpha1.MulticastGroup
- func (a *Aggregator) ListNetworkPolicyStats(namespace string) []statsv1alpha1.NetworkPolicyStats
- func (a *Aggregator) Run(stopCh <-chan struct{})
Constants ¶
const (
GroupNameIndexName = "groupName"
)
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 - pkg/apiserver/registry/stats/multicastgroup.statsProvider
func NewAggregator ¶
func NewAggregator(networkPolicyInformer networkinginformers.NetworkPolicyInformer, cnpInformer crdinformers.ClusterNetworkPolicyInformer, anpInformer crdinformers.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) GetMulticastGroup ¶ added in v1.7.0
func (a *Aggregator) GetMulticastGroup(group string) (*statsv1alpha1.MulticastGroup, 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) ListMulticastGroups ¶ added in v1.7.0
func (a *Aggregator) ListMulticastGroups() []statsv1alpha1.MulticastGroup
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.