Documentation
¶
Index ¶
- Variables
- type SchedulePlannerClient
- func (c *SchedulePlannerClient) CheckIfPodPresent(ctx context.Context, namespace, podset, podName string) (bool, *plannerv1alpha1.PlanSpec, error)
- func (c *SchedulePlannerClient) Delete(ctx context.Context, podName, namespace, podset string) (bool, error)
- func (c *SchedulePlannerClient) Get(ctx context.Context, namespace, podset string) (*plannerv1alpha1.SchedulePlan, error)
- func (c *SchedulePlannerClient) List(ctx context.Context, namespace string, labels map[string]string) (*plannerv1alpha1.SchedulePlanList, error)
- func (c *SchedulePlannerClient) Update(ctx context.Context, namespace, podset string, assignments map[string]string) error
- func (c *SchedulePlannerClient) UpdateAssignment(ctx context.Context, namespace, podset string, podName, nodeName string) error
- type ScheduleTriggerClient
- func (c *ScheduleTriggerClient) Get(ctx context.Context, namespace, podset string) (*plannerv1alpha1.ScheduleTrigger, error)
- func (c *ScheduleTriggerClient) List(ctx context.Context, namespace string, labels map[string]string) (*plannerv1alpha1.ScheduleTriggerList, error)
- func (c *ScheduleTriggerClient) Update(ctx context.Context, namespace, podset, state string) error
Constants ¶
This section is empty.
Variables ¶
var ErrNoTriggersFound = errors.New("no triggers found")
ErrNoTriggersFound is returned when no triggers are found.
Functions ¶
This section is empty.
Types ¶
type SchedulePlannerClient ¶
SchedulePlannerClient stores schedule planner client info.
func NewPlannerClient ¶
func NewPlannerClient(c client.Client, log logr.Logger) *SchedulePlannerClient
NewPlannerClient creates a new schedule planner client instance.
func NewSchedulePlannerClient ¶
NewSchedulePlannerClient creates a new client for schedule planner resource.
func (*SchedulePlannerClient) CheckIfPodPresent ¶
func (c *SchedulePlannerClient) CheckIfPodPresent(ctx context.Context, namespace, podset, podName string, ) (bool, *plannerv1alpha1.PlanSpec, error)
CheckIfPodPresent checks if podname is present in the plan spec.
func (*SchedulePlannerClient) Delete ¶
func (c *SchedulePlannerClient) Delete(ctx context.Context, podName, namespace, podset string) (bool, error)
Delete deletes schedule planner spec by podname, namespace and podset.
func (*SchedulePlannerClient) Get ¶
func (c *SchedulePlannerClient) Get(ctx context.Context, namespace, podset string) (*plannerv1alpha1.SchedulePlan, error)
Get gets the schedule planner resource by namespace and podset.
func (*SchedulePlannerClient) List ¶
func (c *SchedulePlannerClient) List(ctx context.Context, namespace string, labels map[string]string) (*plannerv1alpha1.SchedulePlanList, error)
List lists the schedule planner resources by namespace and labels.
func (*SchedulePlannerClient) Update ¶
func (c *SchedulePlannerClient) Update(ctx context.Context, namespace, podset string, assignments map[string]string, ) error
Update updates or creates planner spec assignments by namespace and podset.
func (*SchedulePlannerClient) UpdateAssignment ¶
func (c *SchedulePlannerClient) UpdateAssignment(ctx context.Context, namespace, podset string, podName, nodeName string, ) error
UpdateAssignment updates or creates planner spec assignment for the pod with the nodename.
type ScheduleTriggerClient ¶
ScheduleTriggerClient saves schedule trigger client specific info.
func NewScheduleTriggerClient ¶
NewScheduleTriggerClient creates a new client for schedule trigger resource.
func NewTriggerClient ¶
func NewTriggerClient(c client.Client, log logr.Logger) *ScheduleTriggerClient
NewTriggerClient creates a schedule trigger client instance.
func (*ScheduleTriggerClient) Get ¶
func (c *ScheduleTriggerClient) Get(ctx context.Context, namespace, podset string, ) (*plannerv1alpha1.ScheduleTrigger, error)
Get is used to get the schedule trigger instance by namespace and podset.
func (*ScheduleTriggerClient) List ¶
func (c *ScheduleTriggerClient) List(ctx context.Context, namespace string, labels map[string]string) (*plannerv1alpha1.ScheduleTriggerList, error)
List lists the schedule trigger instances by namespace and labels.