#include "server_runner.hpp"

Public Member Functions | |
| ServerRunner (const std::string &address, logger::LoggerPtr log, bool reuse=true, const boost::optional< std::shared_ptr< const TlsCredentials >> &my_tls_creds=boost::none) | |
| ~ServerRunner () | |
| ServerRunner & | append (std::shared_ptr< grpc::Service > service) |
| iroha::expected::Result< int, std::string > | run () |
| void | waitForServersReady () |
| void | shutdown () |
| void | shutdown (const std::chrono::system_clock::time_point &deadline) |
Class runs Torii server for handling queries and commands.
|
explicit |
Constructor. Initialize a new instance of ServerRunner class.
| address | - the address the server will be bind to in URI form |
| log | to print progress to |
| reuse | - allow multiple sockets to bind to the same port |
| my_tls_creds | - TLS credentials_ for this server, if required |
| ServerRunner::~ServerRunner | ( | ) |

| ServerRunner & ServerRunner::append | ( | std::shared_ptr< grpc::Service > | service | ) |
Adds a new grpc service to be run.
| service | - service to append. |
| iroha::expected::Result< int, std::string > ServerRunner::run | ( | ) |
Initialize the server and run main loop.
| void ServerRunner::shutdown | ( | ) |
Ask grpc server to terminate.

| void ServerRunner::shutdown | ( | const std::chrono::system_clock::time_point & | deadline | ) |
Shutdown gRPC server with force on given deadline
| void ServerRunner::waitForServersReady | ( | ) |
Wait until the server is up.