Documentation ¶
Index ¶
- Variables
- func NewHttpClient(cfg HttpConfig, c codec.Codec) *httpClient
- func NewIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error)
- func StartHttp(cfg HttpConfig, codec codec.Codec, api shared.EthereumApi) error
- func StartIpc(cfg IpcConfig, codec codec.Codec, ...) error
- func StopHttp()
- type EthereumClient
- type HttpConfig
- type InProcClient
- type IpcConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // List with all API's which are offered over the in proc interface by default DefaultInProcApis = shared.AllApis // List with all API's which are offered over the IPC interface by default DefaultIpcApis = shared.AllApis // List with API's which are offered over thr HTTP/RPC interface by default DefaultHttpRpcApis = strings.Join([]string{ shared.DbApiName, shared.EthApiName, shared.NetApiName, shared.Web3ApiName, }, ",") )
Functions ¶
func NewHttpClient ¶ added in v0.9.32
func NewHttpClient(cfg HttpConfig, c codec.Codec) *httpClient
Create a new in process client
func NewIpcClient ¶
Create a new IPC client, UNIX domain socket on posix, named pipe on Windows
func StartHttp ¶ added in v0.9.32
func StartHttp(cfg HttpConfig, codec codec.Codec, api shared.EthereumApi) error
StartHTTP starts listening for RPC requests sent via HTTP.
Types ¶
type EthereumClient ¶
type EthereumClient interface { // Close underlying connection Close() // Send request Send(interface{}) error // Receive response Recv() (interface{}, error) // List with modules this client supports SupportedModules() (map[string]string, error) }
func ClientFromEndpoint ¶ added in v0.9.32
func ClientFromEndpoint(endpoint string, c codec.Codec) (EthereumClient, error)
Endpoint must be in the form of: ${protocol}:${path} e.g. ipc:/tmp/geth.ipc
rpc:localhost:8545
type HttpConfig ¶ added in v0.9.32
type InProcClient ¶ added in v0.9.32
type InProcClient struct {
// contains filtered or unexported fields
}
func NewInProcClient ¶ added in v0.9.32
func NewInProcClient(codec codec.Codec) *InProcClient
Create a new in process client
func (*InProcClient) Close ¶ added in v0.9.32
func (self *InProcClient) Close()
func (*InProcClient) Initialize ¶ added in v0.9.32
func (self *InProcClient) Initialize(offeredApi shared.EthereumApi)
Need to setup api support
func (*InProcClient) Recv ¶ added in v0.9.32
func (self *InProcClient) Recv() (interface{}, error)
func (*InProcClient) Send ¶ added in v0.9.32
func (self *InProcClient) Send(req interface{}) error
func (*InProcClient) SupportedModules ¶ added in v0.9.32
func (self *InProcClient) SupportedModules() (map[string]string, error)
Click to show internal directories.
Click to hide internal directories.