Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) AddNode(node *Node) *Node
- func (c *Cluster) AddPod(pod *Pod) (totalPods int)
- func (c *Cluster) DeleteNode(name string)
- func (c *Cluster) DeletePod(namespace, name string) (totalPods int)
- func (c *Cluster) ForEachNode(f func(n *Node))
- func (c *Cluster) GetNode(name string) (*Node, bool)
- func (c *Cluster) GetPod(namespace string, name string) (*Pod, bool)
- func (c *Cluster) Populate(ctx context.Context, cs *kubernetes.Clientset) error
- func (c *Cluster) Stats() Stats
- type Node
- func (n *Node) Allocatable() v1.ResourceList
- func (n *Node) BindPod(pod *Pod)
- func (n *Node) CapacityType() NodeCapacityType
- 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) IsFargate() bool
- func (n *Node) IsOnDemand() bool
- func (n *Node) IsSpot() bool
- func (n *Node) Name() string
- func (n *Node) NumPods() int
- func (n *Node) Pods() []*Pod
- func (n *Node) Ready() bool
- func (n *Node) Region() string
- func (n *Node) Show()
- func (n *Node) Status() NodeStatus
- func (n *Node) Update(node *v1.Node)
- func (n *Node) UpdatePrice(pricingRepository *pricing.Repository)
- func (n *Node) Used() v1.ResourceList
- func (n *Node) Visible() bool
- func (n *Node) Zone() string
- type NodeCapacityType
- type NodeStatus
- 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
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 (*Node) Allocatable ¶
func (n *Node) Allocatable() v1.ResourceList
func (*Node) CapacityType ¶
func (n *Node) CapacityType() NodeCapacityType
func (*Node) InstanceType ¶
func (*Node) IsOnDemand ¶
func (*Node) Status ¶ added in v0.2.0
func (n *Node) Status() NodeStatus
func (*Node) UpdatePrice ¶
func (n *Node) UpdatePrice(pricingRepository *pricing.Repository)
func (*Node) Used ¶
func (n *Node) Used() v1.ResourceList
type NodeCapacityType ¶
type NodeCapacityType string
const ( NodeUnknownCapacityType NodeCapacityType = "" NodeOnDemand NodeCapacityType = "on-demand" NodeSpot NodeCapacityType = "spot" NodeFargate NodeCapacityType = "fargate" )
func (NodeCapacityType) String ¶
func (nct NodeCapacityType) String() string
type NodeStatus ¶ added in v0.2.0
type NodeStatus string
const ( NodeStatusUnknown NodeStatus = "Unknown" NodeCordonedDeleting NodeStatus = "Cordoned/Deleting" NodeDeleting NodeStatus = "Deleting" NodeCordoned NodeStatus = "Cordoned" NodeReady NodeStatus = "Ready" )
func (NodeStatus) String ¶ added in v0.2.0
func (ns NodeStatus) String() string
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.
Click to show internal directories.
Click to hide internal directories.