Commit 4ff82e2f authored by 黄刚's avatar 黄刚

change TraceTask to TaskDictionary

parent c1e66a6a
# trace组件工作流程 # trace组件工作流程
...@@ -68,7 +68,7 @@ func QueryTraceList(ctx context.Context, taskId string) *ReplyTraceList ...@@ -68,7 +68,7 @@ func QueryTraceList(ctx context.Context, taskId string) *ReplyTraceList
#### Trace Plugin #### Trace Plugin
```go ```go
type TraceTask struct { type TaskDictionary struct {
hashMap map[int64]string hashMap map[int64]string
} }
//开始任务 //开始任务
...@@ -78,7 +78,7 @@ func StopTask(ctx context.Context, taskId string) error ...@@ -78,7 +78,7 @@ func StopTask(ctx context.Context, taskId string) error
//删除任务 //删除任务
func DeleteTask(ctx context.Context, taskId string) error func DeleteTask(ctx context.Context, taskId string) error
//查询任务,返回该任务对应的字典 //查询任务,返回该任务对应的字典
func QueryTask(ctx context.Context, taskId string) TraceTask func QueryTask(ctx context.Context, taskId string) TaskDictionary
``` ```
map参数为过滤条件,比如只需要某个交易hash的信息,参数就可以是("Txhash",“xxxxxxxxx”);或者只要打印mempool模块的信息,参数就可以是(“module”,“mempool”);两个条件同时满足("Txhash",“xxxxxxxxx”,“module”,“mempool”);目前一个任务的条件是"与"的关系,如果要创建"或"关系的条件,需要创建新任务。 map参数为过滤条件,比如只需要某个交易hash的信息,参数就可以是("Txhash",“xxxxxxxxx”);或者只要打印mempool模块的信息,参数就可以是(“module”,“mempool”);两个条件同时满足("Txhash",“xxxxxxxxx”,“module”,“mempool”);目前一个任务的条件是"与"的关系,如果要创建"或"关系的条件,需要创建新任务。
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment