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

The network interface for the Raft server. More...

#include <network.hpp>

Public Member Functions

virtual tl::expected< std::string, Error > start (std::string const &address)=0
 
virtual tl::expected< void, Error > stop ()=0
 

Detailed Description

The network interface for the Raft server.

Member Function Documentation

◆ start()

virtual tl::expected< std::string, Error > raft::Network::start ( std::string const &  address)
pure virtual

Starts the Raft server.

Parameters
addressThe address to listen on. For a TCP server, this would be "127.0.0.1:8080" for localhost on port 8080 or "127.0.0.1:0" to listen on any available port.
Returns
The address of the server

◆ stop()

virtual tl::expected< void, Error > raft::Network::stop ( )
pure virtual

Stops the Raft server.

Returns
Success or an error.

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