Documentation ¶
Index ¶
- Constants
- func NewCacheNotShareStorage() (*storage, error)
- func NewStorage() (*storage, error)
- type AggregateInfo
- type AggregateParam
- type AggregationType
- type BECPUResourceMetric
- type BECPUResourceQueryResult
- type CPUMetric
- type CPUThrottledMetric
- type Config
- type ContainerResourceMetric
- type ContainerResourceQueryResult
- type ContainerThrottledMetric
- type ContainerThrottledQueryResult
- type MemoryMetric
- type MetricCache
- type NodeCPUInfo
- type NodeResourceMetric
- type NodeResourceQueryResult
- type PodResourceMetric
- type PodResourceQueryResult
- type PodThrottledMetric
- type PodThrottledQueryResult
- type QueryParam
- type QueryResult
Constants ¶
View Source
const (
NodeCPUInfoRecordType = "NodeCPUInfo"
)
Variables ¶
This section is empty.
Functions ¶
func NewCacheNotShareStorage ¶
func NewCacheNotShareStorage() (*storage, error)
func NewStorage ¶
func NewStorage() (*storage, error)
Types ¶
type AggregateInfo ¶
type AggregateInfo struct {
MetricsCount int64
}
type AggregateParam ¶
type AggregationType ¶
type AggregationType string
const ( AggregationTypeAVG AggregationType = "AVG" AggregationTypeP90 AggregationType = "P90" AggregationTypeLast AggregationType = "last" AggregationTypeCount AggregationType = "count" )
type BECPUResourceMetric ¶
type BECPUResourceMetric struct { CPUUsed resource.Quantity // cpuUsed cores for BestEffort Cgroup CPURealLimit resource.Quantity // suppressCPUQuantity: if suppress by cfs_quota then this value is cfs_quota/cfs_period CPURequest resource.Quantity // sum(extendResources_Cpu:request) by all qos:BE pod }
type BECPUResourceQueryResult ¶
type BECPUResourceQueryResult struct { QueryResult Metric *BECPUResourceMetric }
type CPUThrottledMetric ¶
type CPUThrottledMetric struct {
ThrottledRatio float64
}
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type ContainerResourceMetric ¶
type ContainerResourceMetric struct { ContainerID string CPUUsed CPUMetric MemoryUsed MemoryMetric }
type ContainerResourceQueryResult ¶
type ContainerResourceQueryResult struct { QueryResult Metric *ContainerResourceMetric }
type ContainerThrottledMetric ¶
type ContainerThrottledMetric struct { ContainerID string CPUThrottledMetric *CPUThrottledMetric }
type ContainerThrottledQueryResult ¶
type ContainerThrottledQueryResult struct { QueryResult Metric *ContainerThrottledMetric }
type MemoryMetric ¶
type MetricCache ¶
type MetricCache interface { Run(stopCh <-chan struct{}) error GetNodeResourceMetric(param *QueryParam) NodeResourceQueryResult GetPodResourceMetric(podUID *string, param *QueryParam) PodResourceQueryResult GetContainerResourceMetric(containerID *string, param *QueryParam) ContainerResourceQueryResult GetNodeCPUInfo(param *QueryParam) (*NodeCPUInfo, error) GetBECPUResourceMetric(param *QueryParam) BECPUResourceQueryResult GetPodThrottledMetric(podUID *string, param *QueryParam) PodThrottledQueryResult GetContainerThrottledMetric(containerID *string, param *QueryParam) ContainerThrottledQueryResult InsertNodeResourceMetric(t time.Time, nodeResUsed *NodeResourceMetric) error InsertPodResourceMetric(t time.Time, podResUsed *PodResourceMetric) error InsertContainerResourceMetric(t time.Time, containerResUsed *ContainerResourceMetric) error InsertNodeCPUInfo(info *NodeCPUInfo) error InsertBECPUResourceMetric(t time.Time, metric *BECPUResourceMetric) error InsertPodThrottledMetrics(t time.Time, metric *PodThrottledMetric) error InsertContainerThrottledMetrics(t time.Time, metric *ContainerThrottledMetric) error }
func NewCacheNotShareMetricCache ¶
func NewCacheNotShareMetricCache(cfg *Config) (MetricCache, error)
func NewMetricCache ¶
func NewMetricCache(cfg *Config) (MetricCache, error)
type NodeCPUInfo ¶
type NodeCPUInfo util.LocalCPUInfo
type NodeResourceMetric ¶
type NodeResourceMetric struct { CPUUsed CPUMetric MemoryUsed MemoryMetric }
type NodeResourceQueryResult ¶
type NodeResourceQueryResult struct { QueryResult Metric *NodeResourceMetric }
type PodResourceMetric ¶
type PodResourceMetric struct { PodUID string CPUUsed CPUMetric MemoryUsed MemoryMetric }
type PodResourceQueryResult ¶
type PodResourceQueryResult struct { QueryResult Metric *PodResourceMetric }
type PodThrottledMetric ¶
type PodThrottledMetric struct { PodUID string CPUThrottledMetric *CPUThrottledMetric }
type PodThrottledQueryResult ¶
type PodThrottledQueryResult struct { QueryResult Metric *PodThrottledMetric }
type QueryParam ¶
type QueryParam struct { Aggregate AggregationType Start *time.Time End *time.Time }
func (*QueryParam) FillDefaultValue ¶
func (q *QueryParam) FillDefaultValue()
type QueryResult ¶
type QueryResult struct { AggregateInfo *AggregateInfo Error error }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_metriccache is a generated GoMock package.
|
Package mock_metriccache is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.