metric

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMetricDataExpired added in v0.4.0

func IsMetricDataExpired(err error) bool

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

type ExternalMetricManagerImpl struct {
	*syntax.RWMutex
	// contains filtered or unexported fields
}

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

type FakeMetricsFetcher struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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 (*FakeMetricsFetcher) Run

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

Directories

Path Synopsis
provisioner

Jump to

Keyboard shortcuts

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