sources

package
v0.0.0-...-b5eed52 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2014 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const HostsFile = "/var/run/heapster/hosts"

While updating this, also update heapster/deploy/Dockerfile.

Variables

This section is empty.

Functions

func PostRequestAndGetValue

func PostRequestAndGetValue(client *http.Client, req *http.Request, value interface{}) error

Types

type AnonContainer

type AnonContainer struct {
	Hostname string `json:"hostname,omitempty"`
	*Container
}

type CadvisorHosts

type CadvisorHosts struct {
	Port  int               `json:"port"`
	Hosts map[string]string `json:"hosts"`
}

type Container

type Container struct {
	ID    string                     `json:"id,omitempty"`
	Name  string                     `json:"name,omitempty"`
	Stats []*cadvisor.ContainerStats `json:"stats,omitempty"`
}

type ExternalSource

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

func (*ExternalSource) GetContainerStats

func (self *ExternalSource) GetContainerStats() (HostnameContainersMap, error)

func (*ExternalSource) GetPods

func (self *ExternalSource) GetPods() ([]Pod, error)

type HostnameContainersMap

type HostnameContainersMap map[string]IdToContainerMap

type IdToContainerMap

type IdToContainerMap map[string]*Container

type KubeSource

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

func (*KubeSource) GetContainerStats

func (self *KubeSource) GetContainerStats() (HostnameContainersMap, error)

func (*KubeSource) GetPods

func (self *KubeSource) GetPods() ([]Pod, error)

Returns a map of minion hostnames to the Pods running in them.

type Pod

type Pod struct {
	Name       string            `json:"name,omitempty"`
	Hostname   string            `json:"hostname,omitempty"`
	Containers []*Container      `json:"containers"`
	Status     string            `json:"status,omitempty"`
	PodIP      string            `json:"podIP,omitempty"`
	Labels     map[string]string `json:"labels,omitempty"`
}

PodState is the state of a pod, used as either input (desired state) or output (current state)

type Source

type Source interface {
	GetPods() ([]Pod, error)
	GetContainerStats() (HostnameContainersMap, error)
}

func NewSource

func NewSource() (Source, error)

Jump to

Keyboard shortcuts

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