Comments (4)
config.OnDebug
可以实现你说的需求,每个节点的流入和流出都会触发一次该回调函数。
文档:https://rulego.cc/pages/d59341/#ondebug
示例:
config.OnDebug = func(chainId,flowType string, nodeId string, msg types.RuleMsg, relationType string, err error) {
//每个节点执行情况的回调,包括节点、所属规则链ID、输入msg、输出msg、和下一个节点的链接关系
}
ruleEngine, err = rulego.New("rule01", []byte(chainJsonFile1), rulego.WithConfig(config))
from rulego.
符合但不是完全符合,比如时间信息,要想从这个方法里面拿到时间信息就需要节点主动传递,我们设计上是允许用户自定义节点的,这样的情况下就没办法保证这个情况。
from rulego.
你说的是耗时吗?时间不需要主动传递。每个节点都会触发2次这个回调函数,分别是IN和OUT。同一个msg id IN 过程记录Start时间,OUT过程再记录End时间,这两个数之差就是这个节点该消息的执行耗时。
from rulego.
收到,谢谢
from rulego.
Related Issues (19)
- 是单机版的吗?未来路线图种有集群化发展的考虑吗? HOT 1
- hope more developers can contribute extension components to RuleGo
- What new features do you want RuleGo to add? Please leave a message here HOT 3
- 节点依赖未生效 HOT 4
- Python runtime支持 HOT 3
- 请教下规则链部分的架构**是什么? HOT 1
- fatal error: concurrent map writes
- 是否支持空链,目前初始化空链后,onMsg 程序会直接 panic HOT 1
- How does the restApiCall component add HTTP basic authentication credentials? HOT 2
- Does restApiCall or net support the grpc protocol HOT 1
- 如何保证流程中断后重启 HOT 5
- About using the native plugin pkg HOT 2
- OnAllNodeCompleted 似乎不太符合预期,所有节点未完成就触发了,进而导致OnMsgAndWait没有阻塞进程 HOT 6
- 数据流双向流动支持 HOT 1
- 【需求收集】 HOT 2
- Seeking Collaborators to Participate in the Diverse Development of the RuleGo Project/寻找共同开发者参与 RuleGo 项目的多元化发展
- Can first node in rule chain be a Server service? HOT 2
- Version 0.23.0 Feature Planning
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rulego.