raft 0.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
raft::Client Class Referenceabstract

#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
 

Detailed Description

Client is an interface for a Raft client that can send AppendEntries and RequestVote requests.

Member Function Documentation

◆ appendEntries()

virtual void raft::Client::appendEntries ( data::AppendEntriesRequest  request,
RequestConfig  config,
std::function< void(tl::expected< data::AppendEntriesResponse, Error >)>  callback 
)
pure virtual

Send an AppendEntries request to the server.

Parameters
requestThe AppendEntries request to send.
configThe configuration for the request.
callbackThe callback to invoke with the response or error.

◆ requestVote()

virtual void raft::Client::requestVote ( data::RequestVoteRequest  request,
RequestConfig  config,
std::function< void(tl::expected< data::RequestVoteResponse, Error >)>  callback 
)
pure virtual

Send a RequestVote request to the server.

Parameters
requestThe RequestVote request to send.
configThe configuration for the request.
callbackThe callback to invoke with the response or error.

The documentation for this class was generated from the following file: