Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRuleObjectsForRule ¶
func GetRuleObjectsForRule(autopilotRule *v1alpha1.AutopilotRule) (map[string]Rule, error)
GetRuleObjectsForRule returns a list of Rule interfaces for every individual object for which the input autopilot rule is configured for.
func GetUUIDFromRule ¶
func GetUUIDFromRule(r *v1alpha1.AutopilotRule) string
GetUUIDFromRule is a helper function to get the uuid from the k8s autopilot rule object
Types ¶
type Rule ¶
type Rule interface {
// Check performs a check on all the conditions for the rule and returns the
// conditions that have been met
Check() ([]*v1alpha1.LabelSelectorRequirement, error)
// UUID returns the unique ID for the rule
UUID() string
// DoAction performs the actions for the rule
DoActions() error
// Name returns a name of the rule
ParentRuleName() string
}
Rule interface represents a rule inside the RuleEngine
Click to show internal directories.
Click to hide internal directories.