Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type Cluster
- func (c *Cluster) AddNode(node *Node) *Node
- func (c *Cluster) AddPod(pod *Pod) (totalPods int)
- func (c *Cluster) DeleteNode(providerID string)
- func (c *Cluster) DeletePod(namespace, name string) (totalPods int)
- func (c *Cluster) ForEachNode(f func(n *Node))
- func (c *Cluster) GetNode(providerID string) (*Node, bool)
- func (c *Cluster) GetNodeByName(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) ComputeLabel(labelName string) string
- 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) InstanceID() string
- func (n *Node) InstanceType() string
- func (n *Node) IsFargate() bool
- func (n *Node) IsOnDemand() bool
- func (n *Node) IsSpot() bool
- func (n *Node) Name() string
- func (n *Node) NotReadyTime() time.Time
- func (n *Node) NumPods() int
- func (n *Node) Pods() []*Pod
- func (n *Node) ProviderID() string
- 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
- func (p *Pod) FargateCapacityProvisioned() (float64, float64, bool)
- func (p *Pod) IsScheduled() bool
- func (p *Pod) Name() string
- func (p *Pod) Namespace() string
- func (p *Pod) NodeName() string
- func (p *Pod) Phase() v1.PodPhase
- func (p *Pod) Requested() v1.ResourceList
- func (p *Pod) Update(pod *v1.Pod)
- type Stats
- type Style
- 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 ¶
func (*Cluster) ForEachNode ¶
type Node ¶
type Node struct { Price float64 // contains filtered or unexported fields }
func NewNodeFromNodeClaim ¶
func (*Node) Allocatable ¶
func (n *Node) Allocatable() v1.ResourceList
func (*Node) ComputeLabel ¶
ComputeLabel computes dynamic labels
func (*Node) InstanceID ¶
func (*Node) InstanceType ¶
func (*Node) IsOnDemand ¶
func (*Node) NotReadyTime ¶
NotReadyTime is the time that the node went NotReady, or when it was created if it hasn't been marked as NotReady.
func (*Node) ProviderID ¶
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) FargateCapacityProvisioned ¶
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
}