You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dubbo rpc attachments belongs to the Variable Part, but u can't get where it starts from, u must skip the parts before it, include Dubbo version, Service name, Service version, Method name, Method parameter types, Method arguments.
But for hessian2 serialization protocol , u must decode the data to find where it ends with. There is't a length to tell the length of the data. So it costs a lot for the sidecar of mesh to update the attachments.
And I'm not sure whether the MOSN has already implemented this feature.
背景
在
service mesh
环境下,需要在sidecar
中解析dubbo
的attachment
,并根据需求添加一些自定义的参数进去,就像SetHeader
一样,然后重新构建dubbo
包问题
如果使用
hessian.NewDecoder
,传递的参数没有对象是可以的,如果参数中有对象会报错,参考 #163 的解决办法,使用hessian.NewDecoderWithSkip
可以解决,但是重新构建的时候arg
类型是interface{}
,值是nil
解决
能否多提供一个
Decode
方法,直接返回[]byte
内容,重新构建的时候直接encode.Append(arg)
就可以重新构建dubbo
包The text was updated successfully, but these errors were encountered: