turnpike icon indicating copy to clipboard operation
turnpike copied to clipboard

Service feature

Open marshauf opened this issue 9 years ago • 4 comments

Add Service feature similar to net/rpc registration of service methods.

Adds "github.com/mitchellh/mapstructure" as dependency.

marshauf avatar Sep 04 '15 14:09 marshauf

I hope I did syncing dev with v2 correct. Looks funky with git rebase.

marshauf avatar Sep 18 '15 21:09 marshauf

The comment for RegisterService says that one of the requirements for a service method is "two arguments, both of exported type". What does that mean?

jcelliott avatar Sep 19 '15 21:09 jcelliott

That line is wrong. I am sorry, I fixed it.

marshauf avatar Sep 21 '15 11:09 marshauf

I run into a problem with mapstructure. You can't customize decoding of structs with methods. It requires hook functions which adds a lot of complexity to turnpike to enable customizing decoding. I prefer the way encoding/json works with methods on the types instead of hook functions. I would like to replace mapstructure with encoding/json.

marshauf avatar Sep 22 '15 08:09 marshauf