Start Advice
Start Advice: Executed before executing the rule engine OnMsg method. It can be used to initialize some data.
# Interface
// Order returns the execution order, the smaller the value, the higher the priority
Order() int
// New creates a new instance
New() Aspect
// PointCut declares a cut point, used to determine whether to execute the advice
// For example: specify some component types or relationType to execute the aspect logic; return ctx.Self().Type()=="mqttClient"
PointCut(ctx RuleContext, msg RuleMsg, relationType string) bool
// Start is the advice before the rule engine OnMsg method is executed. The returned Msg will be used as the input parameter for the next advice and the next node OnMsg method.
Start(ctx RuleContext, msg RuleMsg) RuleMsg
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Edit this page on GitHub (opens new window)
Last Updated: 2024/10/23, 10:13:01