// Execute given request func (self *ethApi) Execute(req *shared.Request) (interface{}, error) { if callback, ok := self.methods[req.Method]; ok { return callback(self, req) } return nil, shared.NewNotImplementedError(req.Method) }
// Call the correct API's Execute method for the given request func (self *MergedApi) Execute(req *shared.Request) (interface{}, error) { glog.V(logger.Detail).Infof("%s %s", req.Method, req.Params) if res, _ := self.handle(req); res != nil { return res, nil } if api, found := self.methods[req.Method]; found { return api.Execute(req) } return nil, shared.NewNotImplementedError(req.Method) }
func (self *ethApi) Flush(req *shared.Request) (interface{}, error) { return nil, shared.NewNotImplementedError(req.Method) }