ziyyun

Results 9 comments of ziyyun

OK,我的工作暂时告一段落,等你反馈。

我建议还是采用同样的机制。但是我没测试过。 tri.AppendToOutgoingContext(ctx, k, val) tri.FromIncomingContext(ctx)

但是最好再封装一套顶层的接口。把内部AppendToOutgoingContext机制都封装掉。

如果需要我这边实现,可能要过两天我空点

我看内部的代码,context还有个attanchmentkey,感觉是不是一个重复性的东西?而且我没试过,dubbogo走其他协议,还是否经过triple的代码,triple这一层感觉不适合,正常来讲,这套机制应该和协议不相干,是否还有更上层的接口。可以你接手,没问题的。

因为我看过这段代码 ‘’‘ for key, valRaw := range dubbo3Resp.Attachments() { switch valRaw.(type) { case string: trailer[key] = []string{valRaw.(string)} case []string: trailer[key] = valRaw.([]string) default: panic(fmt.Sprintf("unsupported attachment value type %T", valRaw)) }...

> > 因为我看过这段代码 ‘’‘ for key, valRaw := range dubbo3Resp.Attachments() { switch valRaw.(type) { case string: trailer[key] = []string{valRaw.(string)} case []string: trailer[key] = valRaw.([]string) default: panic(fmt.Sprintf("unsupported attachment value type %T",...

发现开发分支有一个提交和这个问题相关 #2854 ,但无法保证新老版本一致性,无法满足https://github.com/apache/dubbo-go-samples/tree/main/compatibility/filter/custom ,使用上也偏复杂。