added RPC start/stop support

This commit is contained in:
Bas van Kervel
2015-06-22 12:47:32 +02:00
parent 2737baa657
commit 2e0b56a72b
31 changed files with 224 additions and 130 deletions

View File

@ -7,6 +7,21 @@ import (
"github.com/ethereum/go-ethereum/logger/glog"
)
// Ethereum RPC API interface
type EthereumApi interface {
// API identifier
Name() string
// API version
ApiVersion() string
// Execute the given request and returns the response or an error
Execute(*Request) (interface{}, error)
// List of supported RCP methods this API provides
Methods() []string
}
// RPC request
type Request struct {
Id interface{} `json:"id"`