基础的插件注册+获取+调度能力, 待完善

This commit is contained in:
2024-11-13 18:26:47 +08:00
parent 942cd1dfed
commit 507f1f5090
4 changed files with 161 additions and 3 deletions

View File

@ -47,6 +47,24 @@ func (rc *RequestContext) SetPluginResult(r *PluginResult) {
rc.pluginResultTable[r.ID] = append(rc.pluginResultTable[r.ID], r)
}
// TraceID 获取traceID
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 18:22 2024/11/13
func (rc *RequestContext) TraceID() string {
return rc.traceID
}
// Trace 追踪实例
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 18:24 2024/11/13
func (rc *RequestContext) Trace() *trace.Runtime {
return rc.runtimeInstance
}
func (rc *RequestContext) Lock() {
rc.lock.Lock()
}