api

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateData

type AggregateData struct {
	Pods       []Pod
	Containers []Container
	// TODO: Add node metadata.
	Machine []Container
	Events  []kubeapi.Event
}

func (*AggregateData) Merge added in v0.12.0

func (a *AggregateData) Merge(b *AggregateData)

type Container

type Container struct {
	Hostname   string
	ExternalID string
	Name       string
	Image      string
	Spec       ContainerSpec
	Stats      []*ContainerStats
}

func NewContainer

func NewContainer() *Container

type ContainerSpec added in v0.18.0

type ContainerSpec struct {
	// TODO(piosz): Consider defining an internal Spec API to guard against changes to cadvisor API.
	cadvisor.ContainerSpec
	CpuRequest    int64
	MemoryRequest int64
}

type ContainerStats added in v0.18.0

type ContainerStats struct {
	// TODO(piosz): Consider defining an internal Stats API (see above).
	cadvisor.ContainerStats
}

type ExternalNode

type ExternalNode struct {
	Name string `json:"name,omitempty"`
	IP   string `json:"ip,omitempty"`
}

An external node represents a host which is running cadvisor. Heapster will expect data in this format via its external files API.

type ExternalNodeList

type ExternalNodeList struct {
	Items []ExternalNode `json:"items,omitempty"`
}

ExternalNodeList represents a list of all hosts that are running cadvisor which heapster will monitor.

type Pod

type Pod struct {
	PodMetadata `json:",inline"`
	Containers  []Container `json:"containers"`
}

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

type PodMetadata added in v0.14.0

type PodMetadata struct {
	Name         string `json:"name,omitempty"`
	Namespace    string `json:"namespace,omitempty"`
	NamespaceUID string
	// TODO(vishh): Rename to UID.
	ID             string
	Hostname       string
	Status         string
	PodIP          string
	Labels         map[string]string
	HostPublicIP   string
	HostInternalIP string
	ExternalID     string
}

type Source added in v0.11.0

type Source interface {
	// GetInfo Fetches information about pods or containers.
	// start, end: Represents the time range for stats
	// Returns:
	// AggregateData
	GetInfo(start, end time.Time) (AggregateData, error)
	// Returns debug information for the source.
	DebugInfo() string
	// Returns a user friendly string that describes the source.
	Name() string
}

Source represents a plugin that generates data. Each Source needs to implement a Register

Jump to

Keyboard shortcuts

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