Skip to content
Snippets Groups Projects
Unverified Commit 068f7ba1 authored by panty's avatar panty Committed by GitHub
Browse files

Merge pull request #398 from pantianying/user_add_attachment

user can add attachment
parents e31ac1df d99e9b32
Branches
Tags
No related merge requests found
...@@ -140,6 +140,14 @@ func (p *Proxy) Implement(v common.RPCService) { ...@@ -140,6 +140,14 @@ func (p *Proxy) Implement(v common.RPCService) {
inv.SetAttachments(k, value) 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) result := p.invoke.Invoke(invCtx, inv)
err = result.Error() err = result.Error()
......
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
package config package config
import "context"
// GenericService ... // GenericService ...
type GenericService struct { type GenericService struct {
Invoke func(req []interface{}) (interface{}, error) `dubbo:"$invoke"` Invoke func(ctx context.Context, req []interface{}) (interface{}, error) `dubbo:"$invoke"`
referenceStr string referenceStr string
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment