raft 0.1.0
|
#include <client.hpp>
Public Member Functions | |
virtual void | appendEntries (data::AppendEntriesRequest request, RequestConfig config, std::function< void(tl::expected< data::AppendEntriesResponse, Error >)> callback)=0 |
virtual void | requestVote (data::RequestVoteRequest request, RequestConfig config, std::function< void(tl::expected< data::RequestVoteResponse, Error >)> callback)=0 |
Client is an interface for a Raft client that can send AppendEntries and RequestVote requests.
|
pure virtual |
Send an AppendEntries request to the server.
request | The AppendEntries request to send. |
config | The configuration for the request. |
callback | The callback to invoke with the response or error. |
|
pure virtual |
Send a RequestVote request to the server.
request | The RequestVote request to send. |
config | The configuration for the request. |
callback | The callback to invoke with the response or error. |