Documentation ¶
Index ¶
- func IsMetricDataExpired(err error) bool
- func NewExternalMetricManager(metricStore *utilmetric.MetricStore, emitter metrics.MetricEmitter) types.ExternalMetricManager
- func NewFakeMetricsFetcher(emitter metrics.MetricEmitter) types.MetricsFetcher
- func NewMetricsFetcher(baseConf *global.BaseConfiguration, metricConf *metaserver.MetricConfiguration, ...) types.MetricsFetcher
- func NewMetricsNotifierManager(metricStore *utilmetric.MetricStore, emitter metrics.MetricEmitter) types.MetricsNotifierManager
- func RegisterProvisioners(name string, initFunc ProvisionerInitFunc)
- type CheckMetricDataExpireFunc
- type ExternalMetricManagerImpl
- type FakeMetricsFetcher
- func (f *FakeMetricsFetcher) AggregateCoreMetric(cpuset machine.CPUSet, metricName string, agg metric.Aggregator) metric.MetricData
- func (f *FakeMetricsFetcher) AggregatePodMetric(podList []*v1.Pod, metricName string, agg metric.Aggregator, ...) metric.MetricData
- func (f *FakeMetricsFetcher) AggregatePodNumaMetric(podList []*v1.Pod, numaID int, metricName string, agg metric.Aggregator, ...) metric.MetricData
- func (f *FakeMetricsFetcher) DeRegisterNotifier(_ types.MetricsScope, _ string)
- func (f *FakeMetricsFetcher) GetCPUMetric(coreID int, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetCgroupMetric(cgroupPath, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetContainerMetric(podUID, containerName, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetContainerNumaMetric(podUID, containerName string, numaID int, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetContainerNumaMetrics(podUID, containerName, metricName string) (map[int]metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetDeviceMetric(deviceName string, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetNodeMetric(metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetNumaMetric(numaID int, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) GetPodVolumeMetric(podUID, volumeName, metricName string) (metric.MetricData, error)
- func (f *FakeMetricsFetcher) HasSynced() bool
- func (f *FakeMetricsFetcher) RegisterExternalMetric(fu func(store *metric.MetricStore))
- func (f *FakeMetricsFetcher) RegisterNotifier(_ types.MetricsScope, _ types.NotifiedRequest, _ chan types.NotifiedResponse) string
- func (f *FakeMetricsFetcher) Run(_ context.Context)
- func (f *FakeMetricsFetcher) SetCPUMetric(cpu int, metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetCgroupMetric(cgroupPath, metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetContainerMetric(podUID, containerName, metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetContainerNumaMetric(podUID, containerName string, numaID int, metricName string, ...)
- func (f *FakeMetricsFetcher) SetDeviceMetric(deviceName string, metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetNodeMetric(metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetNumaMetric(numaID int, metricName string, data metric.MetricData)
- func (f *FakeMetricsFetcher) SetSynced(synced bool)
- type MetricsFetcherImpl
- func (f *MetricsFetcherImpl) AggregateCoreMetric(cpuset machine.CPUSet, metricName string, agg utilmetric.Aggregator) utilmetric.MetricData
- func (f *MetricsFetcherImpl) AggregatePodMetric(podList []*v1.Pod, metricName string, agg utilmetric.Aggregator, ...) utilmetric.MetricData
- func (f *MetricsFetcherImpl) AggregatePodNumaMetric(podList []*v1.Pod, numaID int, metricName string, agg utilmetric.Aggregator, ...) utilmetric.MetricData
- func (f *MetricsFetcherImpl) DeRegisterNotifier(scope types.MetricsScope, key string)
- func (f *MetricsFetcherImpl) GetCPUMetric(coreID int, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetCgroupMetric(cgroupPath, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetContainerMetric(podUID, containerName, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetContainerNumaMetric(podUID, containerName string, numaID int, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetContainerNumaMetrics(podUID, containerName, metricName string) (map[int]utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetDeviceMetric(deviceName string, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetNodeMetric(metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetNumaMetric(numaID int, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) GetPodVolumeMetric(podUID, volumeName, metricName string) (utilmetric.MetricData, error)
- func (f *MetricsFetcherImpl) HasSynced() bool
- func (f *MetricsFetcherImpl) RegisterExternalMetric(externalMetricFunc func(store *utilmetric.MetricStore))
- func (f *MetricsFetcherImpl) RegisterNotifier(scope types.MetricsScope, req types.NotifiedRequest, ...) string
- func (f *MetricsFetcherImpl) Run(ctx context.Context)
- type MetricsNotifierManagerImpl
- type ProvisionerInitFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMetricDataExpired ¶ added in v0.4.0
func NewExternalMetricManager ¶ added in v0.4.0
func NewExternalMetricManager(metricStore *utilmetric.MetricStore, emitter metrics.MetricEmitter) types.ExternalMetricManager
func NewFakeMetricsFetcher ¶
func NewFakeMetricsFetcher(emitter metrics.MetricEmitter) types.MetricsFetcher
NewFakeMetricsFetcher returns a fake MetricsFetcher.
func NewMetricsFetcher ¶ added in v0.4.0
func NewMetricsFetcher(baseConf *global.BaseConfiguration, metricConf *metaserver.MetricConfiguration, emitter metrics.MetricEmitter, podFetcher pod.PodFetcher) types.MetricsFetcher
func NewMetricsNotifierManager ¶ added in v0.4.0
func NewMetricsNotifierManager(metricStore *utilmetric.MetricStore, emitter metrics.MetricEmitter) types.MetricsNotifierManager
func RegisterProvisioners ¶ added in v0.4.1
func RegisterProvisioners(name string, initFunc ProvisionerInitFunc)
RegisterProvisioners registers user-defined resource plugin init functions
Types ¶
type CheckMetricDataExpireFunc ¶ added in v0.4.0
type CheckMetricDataExpireFunc func(utilmetric.MetricData, error) (utilmetric.MetricData, error)
type ExternalMetricManagerImpl ¶ added in v0.4.0
func (*ExternalMetricManagerImpl) RegisterExternalMetric ¶ added in v0.4.0
func (m *ExternalMetricManagerImpl) RegisterExternalMetric(f func(store *utilmetric.MetricStore))
func (*ExternalMetricManagerImpl) Sample ¶ added in v0.4.0
func (m *ExternalMetricManagerImpl) Sample()
type FakeMetricsFetcher ¶
func (*FakeMetricsFetcher) AggregateCoreMetric ¶ added in v0.2.0
func (f *FakeMetricsFetcher) AggregateCoreMetric(cpuset machine.CPUSet, metricName string, agg metric.Aggregator) metric.MetricData
func (*FakeMetricsFetcher) AggregatePodMetric ¶ added in v0.2.0
func (f *FakeMetricsFetcher) AggregatePodMetric(podList []*v1.Pod, metricName string, agg metric.Aggregator, filter metric.ContainerMetricFilter) metric.MetricData
func (*FakeMetricsFetcher) AggregatePodNumaMetric ¶ added in v0.2.0
func (f *FakeMetricsFetcher) AggregatePodNumaMetric(podList []*v1.Pod, numaID int, metricName string, agg metric.Aggregator, filter metric.ContainerMetricFilter) metric.MetricData
func (*FakeMetricsFetcher) DeRegisterNotifier ¶
func (f *FakeMetricsFetcher) DeRegisterNotifier(_ types.MetricsScope, _ string)
func (*FakeMetricsFetcher) GetCPUMetric ¶
func (f *FakeMetricsFetcher) GetCPUMetric(coreID int, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetCgroupMetric ¶ added in v0.3.0
func (f *FakeMetricsFetcher) GetCgroupMetric(cgroupPath, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetCgroupNumaMetric ¶ added in v0.3.0
func (f *FakeMetricsFetcher) GetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetContainerMetric ¶
func (f *FakeMetricsFetcher) GetContainerMetric(podUID, containerName, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetContainerNumaMetric ¶
func (f *FakeMetricsFetcher) GetContainerNumaMetric(podUID, containerName string, numaID int, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetContainerNumaMetrics ¶ added in v0.5.12
func (f *FakeMetricsFetcher) GetContainerNumaMetrics(podUID, containerName, metricName string) (map[int]metric.MetricData, error)
func (*FakeMetricsFetcher) GetDeviceMetric ¶
func (f *FakeMetricsFetcher) GetDeviceMetric(deviceName string, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetNodeMetric ¶
func (f *FakeMetricsFetcher) GetNodeMetric(metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetNumaMetric ¶
func (f *FakeMetricsFetcher) GetNumaMetric(numaID int, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) GetPodVolumeMetric ¶ added in v0.4.0
func (f *FakeMetricsFetcher) GetPodVolumeMetric(podUID, volumeName, metricName string) (metric.MetricData, error)
func (*FakeMetricsFetcher) HasSynced ¶ added in v0.4.0
func (f *FakeMetricsFetcher) HasSynced() bool
func (*FakeMetricsFetcher) RegisterExternalMetric ¶ added in v0.3.0
func (f *FakeMetricsFetcher) RegisterExternalMetric(fu func(store *metric.MetricStore))
func (*FakeMetricsFetcher) RegisterNotifier ¶
func (f *FakeMetricsFetcher) RegisterNotifier(_ types.MetricsScope, _ types.NotifiedRequest, _ chan types.NotifiedResponse) string
func (*FakeMetricsFetcher) Run ¶
func (f *FakeMetricsFetcher) Run(_ context.Context)
func (*FakeMetricsFetcher) SetCPUMetric ¶ added in v0.2.0
func (f *FakeMetricsFetcher) SetCPUMetric(cpu int, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetCgroupMetric ¶ added in v0.3.0
func (f *FakeMetricsFetcher) SetCgroupMetric(cgroupPath, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetCgroupNumaMetric ¶ added in v0.3.0
func (f *FakeMetricsFetcher) SetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetContainerMetric ¶
func (f *FakeMetricsFetcher) SetContainerMetric(podUID, containerName, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetContainerNumaMetric ¶
func (f *FakeMetricsFetcher) SetContainerNumaMetric(podUID, containerName string, numaID int, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetDeviceMetric ¶ added in v0.2.0
func (f *FakeMetricsFetcher) SetDeviceMetric(deviceName string, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetNodeMetric ¶
func (f *FakeMetricsFetcher) SetNodeMetric(metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetNumaMetric ¶
func (f *FakeMetricsFetcher) SetNumaMetric(numaID int, metricName string, data metric.MetricData)
func (*FakeMetricsFetcher) SetSynced ¶ added in v0.4.0
func (f *FakeMetricsFetcher) SetSynced(synced bool)
type MetricsFetcherImpl ¶ added in v0.4.0
type MetricsFetcherImpl struct {
// contains filtered or unexported fields
}
func (*MetricsFetcherImpl) AggregateCoreMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) AggregateCoreMetric(cpuset machine.CPUSet, metricName string, agg utilmetric.Aggregator) utilmetric.MetricData
func (*MetricsFetcherImpl) AggregatePodMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) AggregatePodMetric(podList []*v1.Pod, metricName string, agg utilmetric.Aggregator, filter utilmetric.ContainerMetricFilter, ) utilmetric.MetricData
func (*MetricsFetcherImpl) AggregatePodNumaMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) AggregatePodNumaMetric(podList []*v1.Pod, numaID int, metricName string, agg utilmetric.Aggregator, filter utilmetric.ContainerMetricFilter, ) utilmetric.MetricData
func (*MetricsFetcherImpl) DeRegisterNotifier ¶ added in v0.4.0
func (f *MetricsFetcherImpl) DeRegisterNotifier(scope types.MetricsScope, key string)
func (*MetricsFetcherImpl) GetCPUMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetCPUMetric(coreID int, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetCgroupMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetCgroupMetric(cgroupPath, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetCgroupNumaMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetContainerMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetContainerMetric(podUID, containerName, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetContainerNumaMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetContainerNumaMetric(podUID, containerName string, numaID int, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetContainerNumaMetrics ¶ added in v0.5.12
func (f *MetricsFetcherImpl) GetContainerNumaMetrics(podUID, containerName, metricName string) (map[int]utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetDeviceMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetDeviceMetric(deviceName string, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetNodeMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetNodeMetric(metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetNumaMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetNumaMetric(numaID int, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) GetPodVolumeMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) GetPodVolumeMetric(podUID, volumeName, metricName string) (utilmetric.MetricData, error)
func (*MetricsFetcherImpl) HasSynced ¶ added in v0.4.0
func (f *MetricsFetcherImpl) HasSynced() bool
func (*MetricsFetcherImpl) RegisterExternalMetric ¶ added in v0.4.0
func (f *MetricsFetcherImpl) RegisterExternalMetric(externalMetricFunc func(store *utilmetric.MetricStore))
func (*MetricsFetcherImpl) RegisterNotifier ¶ added in v0.4.0
func (f *MetricsFetcherImpl) RegisterNotifier(scope types.MetricsScope, req types.NotifiedRequest, response chan types.NotifiedResponse) string
func (*MetricsFetcherImpl) Run ¶ added in v0.4.0
func (f *MetricsFetcherImpl) Run(ctx context.Context)
type MetricsNotifierManagerImpl ¶ added in v0.4.0
type MetricsNotifierManagerImpl struct { *syntax.RWMutex // contains filtered or unexported fields }
func (*MetricsNotifierManagerImpl) DeRegisterNotifier ¶ added in v0.4.0
func (m *MetricsNotifierManagerImpl) DeRegisterNotifier(scope types.MetricsScope, key string)
func (*MetricsNotifierManagerImpl) Notify ¶ added in v0.4.0
func (m *MetricsNotifierManagerImpl) Notify()
func (*MetricsNotifierManagerImpl) RegisterNotifier ¶ added in v0.4.0
func (m *MetricsNotifierManagerImpl) RegisterNotifier(scope types.MetricsScope, req types.NotifiedRequest, response chan types.NotifiedResponse, ) string
type ProvisionerInitFunc ¶ added in v0.4.1
type ProvisionerInitFunc func(baseConf *global.BaseConfiguration, metricConf *metaserver.MetricConfiguration, emitter metrics.MetricEmitter, fetcher pod.PodFetcher, metricStore *utilmetric.MetricStore) types.MetricsProvisioner
Source Files ¶
Click to show internal directories.
Click to hide internal directories.