Documentation ¶
Index ¶
- func FindOriginCosts(originList []ntv1alpha1.OriginInfo, origin string) []ntv1alpha1.CostInfo
- func FindPodOrder(t agv1alpha1.AppGroupTopologyList, selector string) int32
- func FindTopologyKey(topologyList []ntv1alpha1.TopologyInfo, key ntv1alpha1.TopologyKey) ntv1alpha1.OriginList
- func GetDependencyList(pod *v1.Pod, ag *agv1alpha1.AppGroup) []agv1alpha1.DependenciesInfo
- func GetNodeRegion(node *v1.Node) string
- func GetNodeZone(node *v1.Node) string
- func GetPodAppGroupLabel(pod *v1.Pod) string
- func GetPodAppGroupSelector(pod *v1.Pod) string
- type ByDestination
- type ByOrigin
- type ByTopologyKey
- type ByWorkloadSelector
- type CostKey
- type ScheduledInfo
- type ScheduledList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindOriginCosts ¶
func FindOriginCosts(originList []ntv1alpha1.OriginInfo, origin string) []ntv1alpha1.CostInfo
FindOriginCosts : return the costList for a certain origin
func FindPodOrder ¶
func FindPodOrder(t agv1alpha1.AppGroupTopologyList, selector string) int32
FindPodOrder : return the order index of the given pod
func FindTopologyKey ¶
func FindTopologyKey(topologyList []ntv1alpha1.TopologyInfo, key ntv1alpha1.TopologyKey) ntv1alpha1.OriginList
FindTopologyKey : return the originList for a certain key
func GetDependencyList ¶
func GetDependencyList(pod *v1.Pod, ag *agv1alpha1.AppGroup) []agv1alpha1.DependenciesInfo
GetDependencyList : get workload dependencies established in the AppGroup CR
func GetNodeRegion ¶
GetNodeRegion : return the region of the node
func GetPodAppGroupLabel ¶
GetPodAppGroupLabel : get AppGroup from pod annotations
func GetPodAppGroupSelector ¶
GetPodAppGroupSelector : get Workload Selector from pod annotations
Types ¶
type ByDestination ¶
type ByDestination ntv1alpha1.CostList
ByDestination : Sort CostList by Destination (e.g., Region Name, Zone Name)
func (ByDestination) Len ¶
func (s ByDestination) Len() int
func (ByDestination) Less ¶
func (s ByDestination) Less(i, j int) bool
func (ByDestination) Swap ¶
func (s ByDestination) Swap(i, j int)
type ByOrigin ¶
type ByOrigin ntv1alpha1.OriginList
ByOrigin : Sort OriginList by Origin (e.g., Region Name, Zone Name)
type ByTopologyKey ¶
type ByTopologyKey ntv1alpha1.TopologyList
ByTopologyKey : Sort TopologyList by TopologyKey
func (ByTopologyKey) Len ¶
func (s ByTopologyKey) Len() int
func (ByTopologyKey) Less ¶
func (s ByTopologyKey) Less(i, j int) bool
func (ByTopologyKey) Swap ¶
func (s ByTopologyKey) Swap(i, j int)
type ByWorkloadSelector ¶
type ByWorkloadSelector agv1alpha1.AppGroupTopologyList
ByWorkloadSelector : Sort AppGroupTopologyList by Workload.Selector
func (ByWorkloadSelector) Len ¶
func (s ByWorkloadSelector) Len() int
func (ByWorkloadSelector) Less ¶
func (s ByWorkloadSelector) Less(i, j int) bool
func (ByWorkloadSelector) Swap ¶
func (s ByWorkloadSelector) Swap(i, j int)
type ScheduledInfo ¶
type ScheduledInfo struct { // Pod Name Name string // Pod AppGroup Selector Selector string // Replica ID ReplicaID string // Hostname Hostname string }
ScheduledInfo : struct for scheduled pods
type ScheduledList ¶
type ScheduledList []ScheduledInfo
func GetScheduledList ¶
func GetScheduledList(pods []*v1.Pod) ScheduledList
GetScheduledList : get Pods already scheduled in the cluster for that specific AppGroup