Documentation
¶
Index ¶
- type Cluster
- func (c *Cluster) AddNode(node *Node) *Node
- func (c *Cluster) AddPod(pod *Pod, pprov *pricing.Provider) (totalPods int)
- func (c *Cluster) DeleteNode(name string)
- func (c *Cluster) DeletePod(namespace, name string) (totalPods int)
- func (c *Cluster) GetNode(name string) (*Node, bool)
- func (c *Cluster) GetPod(namespace string, name string) (*Pod, bool)
- func (c *Cluster) Stats() Stats
- type Node
- func (n *Node) Allocatable() v1.ResourceList
- func (n *Node) BindPod(pod *Pod)
- func (n *Node) Cordoned() bool
- func (n *Node) Created() time.Time
- func (n *Node) DeletePod(namespace string, name string)
- func (n *Node) Deleting() bool
- func (n *Node) HasPrice() bool
- func (n *Node) Hide()
- func (n *Node) InstanceType() string
- func (n *Node) IsOnDemand() bool
- func (n *Node) IsSpot() bool
- func (n *Node) Name() string
- func (n *Node) NumPods() int
- func (n *Node) Ready() bool
- func (n *Node) Show()
- func (n *Node) Update(node *v1.Node)
- func (n *Node) UpdatePrice(pricing *pricing.Provider)
- func (n *Node) Used() v1.ResourceList
- func (n *Node) Visible() bool
- func (n *Node) Zone() string
- type Pod
- type Stats
- type UIModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func NewCluster() *Cluster
func (*Cluster) DeleteNode ¶
type Node ¶
type Node struct {
Price float64
// contains filtered or unexported fields
}
func (*Node) Allocatable ¶
func (n *Node) Allocatable() v1.ResourceList
func (*Node) InstanceType ¶
func (*Node) IsOnDemand ¶
func (*Node) UpdatePrice ¶
func (*Node) Used ¶
func (n *Node) Used() v1.ResourceList
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod is our pod model used for internal storage and display
func (*Pod) IsScheduled ¶
IsScheduled returns true if the pod has been scheduled to a node
func (*Pod) NodeName ¶
NodeName returns the node that the pod is scheduled against, or an empty string
func (*Pod) Requested ¶
func (p *Pod) Requested() v1.ResourceList
Requested returns the sum of the resources requested by the pod. This doesn't include any init containers as we are interested in the steady state usage of the pod
type Stats ¶
type Stats struct {
NumNodes int
AllocatableResources v1.ResourceList
UsedResources v1.ResourceList
PercentUsedResoruces map[v1.ResourceName]float64
Nodes []*Node
TotalPods int
PodsByPhase map[v1.PodPhase]int
BoundPodCount int
TotalPrice float64
}
type UIModel ¶
type UIModel struct {
// contains filtered or unexported fields
}
func NewUIModel ¶
func (*UIModel) SetResources ¶
Click to show internal directories.
Click to hide internal directories.