Add one more way to call RPC
LeKovr opened this issue · 0 comments
LeKovr commented
I'm going to use RPC inside golang code without knowledge about method's argument structure at compile time (inside templates). It is based on method name in string and map[string]interface{} for request arguments.
I guess there are 3 ways to get wanted:
- reinvent gorilla/rpc's map.go in another package without JSON decoding
- fork gorilla/rpc and make public all of
service
andserviceMethod
structs - fork gorilla/rpc and add tiny (33 lines) function with signature like
func (s *Server) Call(r *http.Request, decoder func(input interface{}, output interface{}) error, method string, args *map[string]interface{}) (interface{}, error)
What would you advise?