datasource

package
v0.0.0-...-0c34cbd Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAllRawData

func ConvertAllRawData(rawData []*core.ContainerRawData) []*core.ContainerWorkloadData

func ConvertRawData

func ConvertRawData(rawData *core.ContainerRawData) *core.ContainerWorkloadData

Types

type ContainerMetric

type ContainerMetric struct {
	ContainerId string
	Cpu         float32
	Mem         float32
	Timestamp   uint64
}

type MetricDataSource

type MetricDataSource interface {
	// 读取一条容器监控数据。若读取完毕,则error设置为io.EOF。error为其他时表示读取出错
	Load() (*ContainerMetric, error)
}

type RawDataReader

type RawDataReader interface {
	Read() ([]*core.ContainerRawData, error)
}

func NewDataSourceRawDataReader

func NewDataSourceRawDataReader(source MetricDataSource) RawDataReader

Jump to

Keyboard shortcuts

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