Documentation ¶
Index ¶
- func CloneEngine(engineID string, cloneRuleBase bool, cloneKnowledgeBase bool) (*ruleeng.RuleEngine, error)
- func GetEngine(engineID string) (*ruleeng.RuleEngine, bool)
- func GetSituationKnowledge(situationInstance SituationToEvaluate) (map[string]interface{}, error)
- func InitEngine(engineID string) error
- func UpdateEngine(engineID string) error
- type EvaluatedSituation
- type SituationToEvaluate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneEngine ¶
func CloneEngine(engineID string, cloneRuleBase bool, cloneKnowledgeBase bool) (*ruleeng.RuleEngine, error)
CloneEngine inits a new engine based on an existing one
func GetEngine ¶
func GetEngine(engineID string) (*ruleeng.RuleEngine, bool)
GetEngine return a specific engine
func GetSituationKnowledge ¶ added in v4.1.4
func GetSituationKnowledge(situationInstance SituationToEvaluate) (map[string]interface{}, error)
func InitEngine ¶
InitEngine inits an engine if it does not exist
func UpdateEngine ¶
UpdateEngine updates an engine if it exists
Types ¶
type EvaluatedSituation ¶
type EvaluatedSituation struct { ID int64 TS time.Time TemplateInstanceID int64 Agenda []ruleeng.Action }
EvaluatedSituation represents the evaluation of a situation
func EvaluateObjectSituations ¶
func EvaluateObjectSituations(situations []SituationToEvaluate, factObject engine.Fact, objects []map[string]interface{}, engineID string) ([]EvaluatedSituation, error)
EvaluateObjectSituations evaluates a slice of situations and return a slice with the evaluated situations
func EvaluateSituations ¶
func EvaluateSituations(situations []SituationToEvaluate, engineID string) ([]EvaluatedSituation, error)
EvaluateSituations evaluates a slice of situations and return a slice with the evaluated situations
Click to show internal directories.
Click to hide internal directories.