Documentation ¶
Index ¶
- Variables
- type ContainerProvider
- func GetSharedContainerProvider() (ContainerProvider, error)
- func InitSharedContainerProvider(wmeta workloadmeta.Component, tagger tagger.Component) ContainerProvider
- func NewContainerProvider(provider metrics.Provider, metadataStore workloadmeta.Component, ...) ContainerProvider
- func NewDefaultContainerProvider(wmeta workloadmeta.Component, tagger tagger.Component) ContainerProvider
- type ContainerRateMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var NullContainerRates = ContainerRateMetrics{
UserCPU: -1,
SystemCPU: -1,
TotalCPU: -1,
}
NullContainerRates can be safely used for containers that have no previous rate values stored (new containers)
Functions ¶
This section is empty.
Types ¶
type ContainerProvider ¶
type ContainerProvider interface { GetContainers(cacheValidity time.Duration, previousContainers map[string]*ContainerRateMetrics) ([]*model.Container, map[string]*ContainerRateMetrics, map[int]string, error) GetPidToCid(cacheValidity time.Duration) map[int]string }
ContainerProvider defines the interface for a container metrics provider
func GetSharedContainerProvider ¶
func GetSharedContainerProvider() (ContainerProvider, error)
GetSharedContainerProvider returns a shared ContainerProvider
func InitSharedContainerProvider ¶
func InitSharedContainerProvider(wmeta workloadmeta.Component, tagger tagger.Component) ContainerProvider
InitSharedContainerProvider init shared ContainerProvider
func NewContainerProvider ¶
func NewContainerProvider(provider metrics.Provider, metadataStore workloadmeta.Component, filter *containers.Filter, tagger tagger.Component) ContainerProvider
NewContainerProvider returns a ContainerProvider instance
func NewDefaultContainerProvider ¶
func NewDefaultContainerProvider(wmeta workloadmeta.Component, tagger tagger.Component) ContainerProvider
NewDefaultContainerProvider returns a ContainerProvider built with default metrics provider and metadata provider
type ContainerRateMetrics ¶
type ContainerRateMetrics struct { ContainerStatsTimestamp time.Time NetworkStatsTimestamp time.Time UserCPU float64 SystemCPU float64 TotalCPU float64 IOReadBytes float64 IOWriteBytes float64 NetworkRcvdBytes float64 NetworkSentBytes float64 NetworkRcvdPackets float64 NetworkSentPackets float64 }
ContainerRateMetrics holds previous values for a container, in order to compute rates
Click to show internal directories.
Click to hide internal directories.