The network interface for the Raft server.
More...
#include <network.hpp>
|
virtual tl::expected< std::string, Error > | start (std::string const &address)=0 |
|
virtual tl::expected< void, Error > | stop ()=0 |
|
The network interface for the Raft server.
◆ start()
virtual tl::expected< std::string, Error > raft::Network::start |
( |
std::string const & |
address | ) |
|
|
pure virtual |
Starts the Raft server.
- Parameters
-
address | The 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: