status

package
v0.0.0-...-6111fc0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodSet

type PodSet map[types.UID]*v1.Pod

PodSet key:Pod.UID value:Pod

type SchedulingStatus

type SchedulingStatus int8
const (
	UnknownStatus SchedulingStatus = iota
	PendingStatus
	ScheduledStatus
	TimeoutStatus
)

func ParsePodGroupSchedulingStatus

func ParsePodGroupSchedulingStatus(pg *schedulingv1a1.PodGroup) SchedulingStatus

func ParseSinglePodSchedulingStatus

func ParseSinglePodSchedulingStatus(pod *v1.Pod) SchedulingStatus

func (SchedulingStatus) String

func (s SchedulingStatus) String() string

type UnitStatus

type UnitStatus interface {
	GetSchedulingStatus() SchedulingStatus
	GetRunningPods() []*v1.Pod
}

UnitStatus contains that the scheduling status, running pods and assumed pods. This will be used when we need all the unit's information.

type UnitStatusMap

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

UnitStatusMap store the scheduling status, running pods and assumed pods in cache. We need to control the lock of this data structure at the upper level.

func NewUnitStatusMap

func NewUnitStatusMap() *UnitStatusMap

NewUnitStatusMap return a pointer to UnitStatusMap. We need to control the lock of this data structure at the upper level.

func (*UnitStatusMap) AddUnitRunningPods

func (u *UnitStatusMap) AddUnitRunningPods(unitKey string, pods ...*v1.Pod)

func (*UnitStatusMap) DeleteUnitRunningPods

func (u *UnitStatusMap) DeleteUnitRunningPods(unitKey string, pods ...*v1.Pod)

func (*UnitStatusMap) DeleteUnitSchedulingStatus

func (u *UnitStatusMap) DeleteUnitSchedulingStatus(unitKey string)

func (*UnitStatusMap) GetUnitRunningPods

func (u *UnitStatusMap) GetUnitRunningPods(unitKey string) []*v1.Pod

func (*UnitStatusMap) GetUnitSchedulingStatus

func (u *UnitStatusMap) GetUnitSchedulingStatus(unitKey string) SchedulingStatus

func (*UnitStatusMap) GetUnitStatus

func (u *UnitStatusMap) GetUnitStatus(unitKey string) UnitStatus

func (*UnitStatusMap) SetUnitSchedulingStatus

func (u *UnitStatusMap) SetUnitSchedulingStatus(unitKey string, status SchedulingStatus)

Jump to

Keyboard shortcuts

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