Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyClient ¶
type DummyClient struct {
// contains filtered or unexported fields
}
func NewDummyClient ¶
func (*DummyClient) Connect ¶
Connect establishes (in parallel) network connections to all nodes in the system. The nodes' RequestReceivers must be running. Only after Connect() returns, sending requests through this DummyClient is possible. TODO: Deal with errors, e.g. when the connection times out (make sure the RPC call in connectToNode() has a timeout).
func (*DummyClient) Disconnect ¶
func (dc *DummyClient) Disconnect()
Disconnect closes all open connections to MirBFT nodes.
func (*DummyClient) SubmitRequest ¶
func (dc *DummyClient) SubmitRequest(data []byte) error
SubmitRequest submits a request by sending it to all nodes (as configured when creating the DummyClient). It automatically appends meta-info like client ID and request number. SubmitRequest must not be called concurrently. If an error occurs, SubmitRequest returns immediately, even if sending of the request was not attempted for all nodes.