Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleBuilder ¶
type RuleBuilder struct { Kc *base.KnowledgeContext Dc *context.DataContext // contains filtered or unexported fields }
func NewRuleBuilder ¶
func NewRuleBuilder(dc *context.DataContext) *RuleBuilder
func (*RuleBuilder) BuildRuleFromString ¶
func (builder *RuleBuilder) BuildRuleFromString(ruleString string) error
chinese comment :全量更新 if update success, all old rules will be delete and you inject new rules will be in the gengine
func (*RuleBuilder) BuildRuleWithIncremental ¶
func (builder *RuleBuilder) BuildRuleWithIncremental(ruleString string) error
chinese comment:增量更新 if a rule already exists, this method will use the new rule to replace the old one if a rule doesn't exist, this method will add the new rule to the existed rules list in detail: copy from old -> update the copy -> use the updated copy to replace old
func (*RuleBuilder) IsExist ¶
func (builder *RuleBuilder) IsExist(ruleNames []string) []bool
func (*RuleBuilder) RemoveRules ¶
func (builder *RuleBuilder) RemoveRules(ruleNames []string) error
Click to show internal directories.
Click to hide internal directories.