schedulercache

package
v1.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNodeNameToInfoMap

func CreateNodeNameToInfoMap(pods []*api.Pod) map[string]*NodeInfo

CreateNodeNameToInfoMap obtains a list of pods and pivots that list into a map where the keys are node names and the values are the aggregated information for that node.

Types

type NodeInfo

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

NodeInfo is node level aggregated information.

func NewNodeInfo

func NewNodeInfo(pods ...*api.Pod) *NodeInfo

NewNodeInfo returns a ready to use empty NodeInfo object. If any pods are given in arguments, their information will be aggregated in the returned object.

func (*NodeInfo) Pods

func (n *NodeInfo) Pods() []*api.Pod

Pods return all pods scheduled (including assumed to be) on this node.

func (*NodeInfo) RequestedResource

func (n *NodeInfo) RequestedResource() Resource

RequestedResource returns aggregated resource request of pods on this node.

func (*NodeInfo) String

func (n *NodeInfo) String() string

String returns representation of human readable format of this NodeInfo.

type Resource

type Resource struct {
	MilliCPU int64
	Memory   int64
}

Resource is a collection of compute resource.

Jump to

Keyboard shortcuts

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