Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatingHandler ¶
type CreatingHandler struct {
// contains filtered or unexported fields
}
CreatingHandler is used to handle task resource group which phase is creating.
func NewCreatingHandler ¶
func NewCreatingHandler(deps *Dependencies) *CreatingHandler
NewCreatingHandler returns a CreatingHandler instance.
func (*CreatingHandler) Handle ¶
func (h *CreatingHandler) Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (needUpdate bool, err error)
Handle is used to perform the real logic.
type Dependencies ¶
type Dependencies struct { KubeClient kubernetes.Interface KusciaClient kusciaclientset.Interface NamespaceLister listers.NamespaceLister PodLister listers.PodLister TrLister kuscialistersv1alpha1.TaskResourceLister }
Dependencies defines some parameter dependencies of functions.
type FailedHandler ¶
type FailedHandler struct {
// contains filtered or unexported fields
}
FailedHandler is used to handle task resource group which phase is failed.
func NewFailedHandler ¶
func NewFailedHandler(deps *Dependencies) *FailedHandler
NewFailedHandler returns a FailedHandler instance.
func (*FailedHandler) Handle ¶
func (h *FailedHandler) Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (needUpdate bool, err error)
Handle is used to perform the real logic.
type PendingHandler ¶
type PendingHandler struct {
// contains filtered or unexported fields
}
PendingHandler is used to handle task resource group which phase is pending.
func NewPendingHandler ¶
func NewPendingHandler(deps *Dependencies) *PendingHandler
NewPendingHandler returns a PendingHandler instance.
func (*PendingHandler) Handle ¶
func (h *PendingHandler) Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (bool, error)
Handle is used to perform the real logic.
type ReserveFailedHandler ¶
type ReserveFailedHandler struct {
// contains filtered or unexported fields
}
ReserveFailedHandler is used to handle task resource group which phase is reserve failed.
func NewReserveFailedHandler ¶
func NewReserveFailedHandler(deps *Dependencies) *ReserveFailedHandler
NewReserveFailedHandler returns a ReservedFailedHandler instance.
func (*ReserveFailedHandler) Handle ¶
func (h *ReserveFailedHandler) Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (needUpdate bool, err error)
Handle is used to perform the real logic.
type ReservedHandler ¶
type ReservedHandler struct {
// contains filtered or unexported fields
}
ReservedHandler is used to handle task resource group which phase is reserved.
func NewReservedHandler ¶
func NewReservedHandler(deps *Dependencies) *ReservedHandler
NewReservedHandler returns a ReservedHandler instance.
func (*ReservedHandler) Handle ¶
func (h *ReservedHandler) Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (needUpdate bool, err error)
Handle is used to perform the real logic.
type ReservingHandler ¶
type ReservingHandler struct {
// contains filtered or unexported fields
}
ReservingHandler is used to handle task resource group which phase is reserving.
func NewReservingHandler ¶
func NewReservingHandler(deps *Dependencies) *ReservingHandler
NewReservingHandler returns a ReservingHandler instance.
func (*ReservingHandler) Handle ¶
func (h *ReservingHandler) Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (needUpdate bool, err error)
Handle is used to perform the real logic.
type TaskResourceGroupPhaseHandler ¶
type TaskResourceGroupPhaseHandler interface {
Handle(trg *kusciaapisv1alpha1.TaskResourceGroup) (bool, error)
}
TaskResourceGroupPhaseHandler is an interface to handle task resource group.
type TaskResourceGroupPhaseHandlerFactory ¶
type TaskResourceGroupPhaseHandlerFactory struct {
TaskResourceGroupPhaseHandlerMap map[kusciaapisv1alpha1.TaskResourceGroupPhase]TaskResourceGroupPhaseHandler
}
TaskResourceGroupPhaseHandlerFactory is a factory to get phase handler by task resource group phase.
func NewTaskResourceGroupPhaseHandlerFactory ¶
func NewTaskResourceGroupPhaseHandlerFactory(deps *Dependencies) *TaskResourceGroupPhaseHandlerFactory
NewTaskResourceGroupPhaseHandlerFactory returns a TaskResourceGroupPhaseHandlerFactory instance.
func (*TaskResourceGroupPhaseHandlerFactory) GetTaskResourceGroupPhaseHandler ¶
func (f *TaskResourceGroupPhaseHandlerFactory) GetTaskResourceGroupPhaseHandler(phase kusciaapisv1alpha1.TaskResourceGroupPhase) TaskResourceGroupPhaseHandler
GetTaskResourceGroupPhaseHandler is used to get TaskResourceGroupPhaseHandler by TaskResourceGroupPhase.