RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

    • AOP Overview
    • Before Advice
    • After Advice
    • Around Advice
    • Start Advice
      • Interface
    • End Advice
    • Completed Advice
    • OnChainBeforeInit Advice
    • OnNodeBeforeInit 增强点
    • OnCreated Advice
    • OnReload Advice
    • OnDestroy Advice
    • builtin aspect

  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

目录

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, error)
1
2
3
4
5
6
7
8
9
10
Edit this page on GitHub (opens new window)
Last Updated: 2025/04/02, 01:29:50
Around Advice
End Advice

← Around Advice End Advice→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式