aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/README.md b/README.md
index 1a43f5ac..888ae668 100644
--- a/README.md
+++ b/README.md
@@ -52,17 +52,17 @@
``` python
from infini import Handler, Result
- class MyRule(Rule):
- """自设规则包"""
+ __handlers__ = ["HandlerRule"]
- name = "MyRule"
- priority: int = 0
- def __init__(self) -> None:
- """初始化你的规则包"""
+ class HandlerRule(Handler):
+ """自设业务函数"""
+
+ name = "MyRule" # 规则包名
+ priority: int = 0 # 规则包权重
def process(self, **kwargs) -> Result:
- """声明规则包运行方式"""
+ """声明规则包检定方式"""
return Result("event1", True)
```