extractors

package
v1.247346.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Metrics      = "Metrics"
	Dimensions   = "Dimensions"
	CleanInteval = 5 * time.Minute
)
View Source
const (
	CurInfo = `` /* 5043-byte string literal not displayed */

	PreInfo = `` /* 5039-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func AssertContainsTaggedField

func AssertContainsTaggedField(
	t *testing.T,
	cadvisorMetric *CAdvisorMetric,
	expectedFields map[string]interface{},
	expectedTags map[string]string,
)

func AssertContainsTaggedFloat

func AssertContainsTaggedFloat(
	t *testing.T,
	cadvisorMetric *CAdvisorMetric,
	field string,
	expectedValue float64,
	delta float64,
)

func GetStats

func GetStats(info *cinfo.ContainerInfo) *cinfo.ContainerStats

Types

type CAdvisorMetric

type CAdvisorMetric struct {
	// contains filtered or unexported fields
}

func (*CAdvisorMetric) AddTags

func (c *CAdvisorMetric) AddTags(tags map[string]string)

func (*CAdvisorMetric) GetAllTags

func (c *CAdvisorMetric) GetAllTags() map[string]string

func (*CAdvisorMetric) GetFields

func (c *CAdvisorMetric) GetFields() map[string]interface{}

func (*CAdvisorMetric) GetMetricType

func (c *CAdvisorMetric) GetMetricType() string

func (*CAdvisorMetric) GetTags

func (c *CAdvisorMetric) GetTags() map[string]string

func (*CAdvisorMetric) Merge

func (c *CAdvisorMetric) Merge(src *CAdvisorMetric)

type CpuMetricExtractor

type CpuMetricExtractor struct {
	// contains filtered or unexported fields
}

func NewCpuMetricExtractor

func NewCpuMetricExtractor() *CpuMetricExtractor

func (*CpuMetricExtractor) CleanUp

func (c *CpuMetricExtractor) CleanUp(now time.Time)

func (*CpuMetricExtractor) GetValue

func (c *CpuMetricExtractor) GetValue(info *cInfo.ContainerInfo, containerType string) []*CAdvisorMetric

func (*CpuMetricExtractor) HasValue

func (c *CpuMetricExtractor) HasValue(info *cInfo.ContainerInfo) bool

type DiskIOMetricExtractor

type DiskIOMetricExtractor struct {
	// contains filtered or unexported fields
}

func NewDiskIOMetricExtractor

func NewDiskIOMetricExtractor() *DiskIOMetricExtractor

func (*DiskIOMetricExtractor) CleanUp

func (d *DiskIOMetricExtractor) CleanUp(now time.Time)

func (*DiskIOMetricExtractor) GetValue

func (d *DiskIOMetricExtractor) GetValue(info *cinfo.ContainerInfo, containerType string) []*CAdvisorMetric

func (*DiskIOMetricExtractor) HasValue

func (d *DiskIOMetricExtractor) HasValue(info *cinfo.ContainerInfo) bool

type FileSystemMetricExtractor

type FileSystemMetricExtractor struct {
	// contains filtered or unexported fields
}

func NewFileSystemMetricExtractor

func NewFileSystemMetricExtractor() *FileSystemMetricExtractor

func (*FileSystemMetricExtractor) CleanUp

func (f *FileSystemMetricExtractor) CleanUp(now time.Time)

func (*FileSystemMetricExtractor) GetValue

func (f *FileSystemMetricExtractor) GetValue(info *cinfo.ContainerInfo, containerType string) []*CAdvisorMetric

func (*FileSystemMetricExtractor) HasValue

type MemMetricExtractor

type MemMetricExtractor struct {
	// contains filtered or unexported fields
}

func NewMemMetricExtractor

func NewMemMetricExtractor() *MemMetricExtractor

func (*MemMetricExtractor) CleanUp

func (m *MemMetricExtractor) CleanUp(now time.Time)

func (*MemMetricExtractor) GetValue

func (m *MemMetricExtractor) GetValue(info *cinfo.ContainerInfo, containerType string) []*CAdvisorMetric

func (*MemMetricExtractor) HasValue

func (m *MemMetricExtractor) HasValue(info *cinfo.ContainerInfo) bool

type MetricExtractor

type MetricExtractor interface {
	HasValue(*cinfo.ContainerInfo) bool
	GetValue(*cinfo.ContainerInfo, string) []*CAdvisorMetric
	CleanUp(time.Time)
}

type NetMetricExtractor

type NetMetricExtractor struct {
	// contains filtered or unexported fields
}

func NewNetMetricExtractor

func NewNetMetricExtractor() *NetMetricExtractor

func (*NetMetricExtractor) CleanUp

func (n *NetMetricExtractor) CleanUp(now time.Time)

func (*NetMetricExtractor) GetValue

func (n *NetMetricExtractor) GetValue(info *cinfo.ContainerInfo, containerType string) []*CAdvisorMetric

func (*NetMetricExtractor) HasValue

func (n *NetMetricExtractor) HasValue(info *cinfo.ContainerInfo) bool

Jump to

Keyboard shortcuts

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