hostInfo

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: Apache-2.0 Imports: 23 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() (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 CloudProviderCollector

type CloudProviderCollector struct{}

func (CloudProviderCollector) GetData

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

func (CloudProviderCollector) GetLabels

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

func (CloudProviderCollector) KeyName

func (c CloudProviderCollector) 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
	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 Info

type Info struct {
	Labels map[string]string `json:"label,omitempty"`
}

type InfoData

type InfoData struct {
	Info    types.Info
	Version types.Version
}
var DockerData InfoData

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

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

func (KeyCollector) GetData

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

func (KeyCollector) GetLabels

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

func (KeyCollector) KeyName

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{}

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