diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-06-19 00:23:13 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2015-06-22 15:17:09 +0800 |
commit | f20256377731097c9478ede750efffd46d83b494 (patch) | |
tree | 25ea2b0de5382ed25dde5ff2021214625f3e9865 /rpc/comms/inproc.go | |
parent | 36a6b16a3bec15131318ebed1c8c2f9204a5a328 (diff) | |
download | dexon-f20256377731097c9478ede750efffd46d83b494.tar dexon-f20256377731097c9478ede750efffd46d83b494.tar.gz dexon-f20256377731097c9478ede750efffd46d83b494.tar.bz2 dexon-f20256377731097c9478ede750efffd46d83b494.tar.lz dexon-f20256377731097c9478ede750efffd46d83b494.tar.xz dexon-f20256377731097c9478ede750efffd46d83b494.tar.zst dexon-f20256377731097c9478ede750efffd46d83b494.zip |
added attach over ipc command
Diffstat (limited to 'rpc/comms/inproc.go')
-rw-r--r-- | rpc/comms/inproc.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rpc/comms/inproc.go b/rpc/comms/inproc.go index 1fdbf8ace..b9c4e93d9 100644 --- a/rpc/comms/inproc.go +++ b/rpc/comms/inproc.go @@ -51,3 +51,21 @@ func (self *InProcClient) Send(req interface{}) error { func (self *InProcClient) Recv() (interface{}, error) { return self.lastRes, self.lastErr } + +func (self *InProcClient) SupportedModules() (map[string]string, error) { + req := shared.Request{ + Id: 1, + Jsonrpc: "2.0", + Method: "modules", + } + + if res, err := self.api.Execute(&req); err == nil { + if result, ok := res.(map[string]string); ok { + return result, nil + } + } else { + return nil, err + } + + return nil, fmt.Errorf("Invalid response") +} |