Documentation ¶
Index ¶
- func BuildUndirectedGraph(ctx solution.Solution) (construct.Graph, error)
- func EvaluateIfCondition(tmplString string, sol solution.Solution, data knowledgebase.DynamicValueData) (bool, error)
- func ForceRemoveDependency(res1, res2 construct.ResourceId, sol solution.Solution) error
- type ClosestPlacer
- type ClusterPlacer
- type OpRuleHandler
- type OperationalRuleContext
- func (ctx OperationalRuleContext) CleanProperty(step knowledgebase.OperationalStep) error
- func (ctx OperationalRuleContext) HandleConfigurationRule(config knowledgebase.ConfigurationRule, ...) error
- func (ctx *OperationalRuleContext) HandleOperationalRule(rule knowledgebase.OperationalRule, ...) error
- func (ctx OperationalRuleContext) HandleOperationalStep(step knowledgebase.OperationalStep) error
- func (ctx *OperationalRuleContext) HandlePropertyRule(rule knowledgebase.PropertyRule) error
- func (ctx *OperationalRuleContext) SetData(data knowledgebase.DynamicValueData)
- func (ctx OperationalRuleContext) SetField(resource, fieldResource *construct.Resource, ...) error
- type ResourcePlacer
- type SpreadPlacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildUndirectedGraph ¶
func EvaluateIfCondition ¶
func EvaluateIfCondition( tmplString string, sol solution.Solution, data knowledgebase.DynamicValueData, ) (bool, error)
func ForceRemoveDependency ¶
func ForceRemoveDependency( res1, res2 construct.ResourceId, sol solution.Solution, ) error
Types ¶
type ClosestPlacer ¶
type ClosestPlacer struct {
// contains filtered or unexported fields
}
func (ClosestPlacer) PlaceResources ¶
func (p ClosestPlacer) PlaceResources( resource *construct.Resource, step knowledgebase.OperationalStep, availableResources []*construct.Resource, numNeeded *int, ) error
func (*ClosestPlacer) SetCtx ¶
func (p *ClosestPlacer) SetCtx(ctx OperationalRuleContext)
type ClusterPlacer ¶
type ClusterPlacer struct {
// contains filtered or unexported fields
}
func (*ClusterPlacer) PlaceResources ¶
func (p *ClusterPlacer) PlaceResources( resource *construct.Resource, step knowledgebase.OperationalStep, availableResources []*construct.Resource, numNeeded *int, ) error
func (*ClusterPlacer) SetCtx ¶
func (p *ClusterPlacer) SetCtx(ctx OperationalRuleContext)
type OpRuleHandler ¶
type OpRuleHandler interface { HandleOperationalRule(rule knowledgebase.OperationalRule, configurationOperator constraints.ConstraintOperator) error HandlePropertyRule(rule knowledgebase.PropertyRule) error SetData(data knowledgebase.DynamicValueData) }
type OperationalRuleContext ¶
type OperationalRuleContext struct { Solution solution.Solution Property knowledgebase.Property Data knowledgebase.DynamicValueData }
func (OperationalRuleContext) CleanProperty ¶
func (ctx OperationalRuleContext) CleanProperty(step knowledgebase.OperationalStep) error
CleanProperty clears the property associated with the rule if it no longer matches the rule. For array properties, each element must match at least one step selector and non-matching elements will be removed.
func (OperationalRuleContext) HandleConfigurationRule ¶
func (ctx OperationalRuleContext) HandleConfigurationRule( config knowledgebase.ConfigurationRule, configurationOperator constraints.ConstraintOperator, ) error
func (*OperationalRuleContext) HandleOperationalRule ¶
func (ctx *OperationalRuleContext) HandleOperationalRule( rule knowledgebase.OperationalRule, configurationOperator constraints.ConstraintOperator, ) error
func (OperationalRuleContext) HandleOperationalStep ¶
func (ctx OperationalRuleContext) HandleOperationalStep(step knowledgebase.OperationalStep) error
func (*OperationalRuleContext) HandlePropertyRule ¶
func (ctx *OperationalRuleContext) HandlePropertyRule(rule knowledgebase.PropertyRule) error
func (*OperationalRuleContext) SetData ¶
func (ctx *OperationalRuleContext) SetData(data knowledgebase.DynamicValueData)
func (OperationalRuleContext) SetField ¶
func (ctx OperationalRuleContext) SetField(resource, fieldResource *construct.Resource, step knowledgebase.OperationalStep) error
type ResourcePlacer ¶
type ResourcePlacer interface { PlaceResources( resource *construct.Resource, step knowledgebase.OperationalStep, availableResources []*construct.Resource, numNeeded *int, ) error SetCtx(ctx OperationalRuleContext) }
type SpreadPlacer ¶
type SpreadPlacer struct {
// contains filtered or unexported fields
}
func (*SpreadPlacer) PlaceResources ¶
func (p *SpreadPlacer) PlaceResources( resource *construct.Resource, step knowledgebase.OperationalStep, availableResources []*construct.Resource, numNeeded *int, ) error
func (*SpreadPlacer) SetCtx ¶
func (p *SpreadPlacer) SetCtx(ctx OperationalRuleContext)
Click to show internal directories.
Click to hide internal directories.