Skip to content
Snippets Groups Projects
Commit d6977bc4 authored by pantianying's avatar pantianying
Browse files

user can add attachment

parent fd4b2977
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,14 @@ func (p *Proxy) Implement(v common.RPCService) {
inv.SetAttachments(k, value)
}
// add user setAttachment
atm := invCtx.Value("attachment")
if m, ok := atm.(map[string]string); ok {
for k, value := range m {
inv.SetAttachments(k, value)
}
}
result := p.invoke.Invoke(invCtx, inv)
err = result.Error()
......
......@@ -17,9 +17,11 @@
package config
import "context"
// GenericService ...
type GenericService struct {
Invoke func(req []interface{}) (interface{}, error) `dubbo:"$invoke"`
Invoke func(ctx context.Context, req []interface{}) (interface{}, error) `dubbo:"$invoke"`
referenceStr string
}
......
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