hostInfo

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectData

func CollectData(collectors []Collector) map[string]interface{}

func GetDefaultDisk

func GetDefaultDisk(infoData model.InfoData) (string, error)

func HostLabels

func HostLabels(prefix string, collectors []Collector) (map[string]string, error)

Types

type CPUCollector

type CPUCollector struct {
}

func (CPUCollector) GetData

func (c CPUCollector) GetData() (map[string]interface{}, error)

func (CPUCollector) GetLabels

func (c CPUCollector) GetLabels(prefix string) (map[string]string, error)

func (CPUCollector) KeyName

func (c CPUCollector) KeyName() string

type Collector

type Collector interface {
	GetData() (map[string]interface{}, error)
	KeyName() string
	GetLabels(string) (map[string]string, error)
}

type DiskCollector

type DiskCollector struct {
	Unit                uint64
	InfoData            model.InfoData
	DockerStorageDriver string
}

func (DiskCollector) GetData

func (d DiskCollector) GetData() (map[string]interface{}, error)

func (DiskCollector) GetLabels

func (d DiskCollector) GetLabels(prefix string) (map[string]string, error)

func (DiskCollector) KeyName

func (d DiskCollector) KeyName() string

type IopsCollector

type IopsCollector struct {
}

func (IopsCollector) GetData

func (i IopsCollector) GetData() (map[string]interface{}, error)

func (IopsCollector) GetLabels

func (i IopsCollector) GetLabels(prefix string) (map[string]string, error)

func (IopsCollector) KeyName

func (i IopsCollector) KeyName() string

type KeyCollector added in v0.8.2

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

func (KeyCollector) GetData added in v0.8.2

func (k KeyCollector) GetData() (map[string]interface{}, error)

func (KeyCollector) GetLabels added in v0.8.2

func (k KeyCollector) GetLabels(prefix string) (map[string]string, error)

func (KeyCollector) KeyName added in v0.8.2

func (k KeyCollector) KeyName() string

type MemoryCollector

type MemoryCollector struct {
	Unit float64
}

func (MemoryCollector) GetData

func (m MemoryCollector) GetData() (map[string]interface{}, error)

func (MemoryCollector) GetLabels

func (m MemoryCollector) GetLabels(prefix string) (map[string]string, error)

func (MemoryCollector) KeyName

func (m MemoryCollector) KeyName() string

type OSCollector

type OSCollector struct {
	InfoData model.InfoData
}

func (OSCollector) GetData

func (o OSCollector) GetData() (map[string]interface{}, error)

func (OSCollector) GetLabels

func (o OSCollector) GetLabels(prefix string) (map[string]string, error)

func (OSCollector) KeyName

func (o OSCollector) KeyName() string

Jump to

Keyboard shortcuts

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