gorilla/rpc

Add one more way to call RPC

LeKovr opened this issue · 0 comments

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:

  1. reinvent gorilla/rpc's map.go in another package without JSON decoding
  2. fork gorilla/rpc and make public all of service and serviceMethod structs
  3. 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?