Documentation ¶
Index ¶
- Variables
- type RPCClient
- func (c *RPCClient) Address() string
- func (c *RPCClient) Close() error
- func (c *RPCClient) GetInfo() (*appmessage.GetInfoResponseMessage, error)
- func (c *RPCClient) Reconnect() error
- func (c *RPCClient) SetLogger(backend *logger.Backend, level logger.Level)
- func (c *RPCClient) SetTimeout(timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRPC = errors.New("rpc error")
ErrRPC is an error in the RPC protocol
Functions ¶
This section is empty.
Types ¶
type RPCClient ¶
type RPCClient struct { *grpcclient.GRPCClient // contains filtered or unexported fields }
RPCClient is an RPC client
func NewRPCClient ¶
сreates a new RPC client with a default call timeout value
func (*RPCClient) GetInfo ¶
func (c *RPCClient) GetInfo() (*appmessage.GetInfoResponseMessage, error)
GetInfo sends an RPC request respective to the function's name and returns the RPC server's response
func (*RPCClient) Reconnect ¶
Reconnect forces the client to attempt to reconnect to the address this client initially was connected to
func (*RPCClient) SetTimeout ¶
SetTimeout sets the timeout by which to wait for RPC responses
Click to show internal directories.
Click to hide internal directories.