hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
grpc_response_handler.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CLI_GRPC_RESPONSE_HANDLER_HPP
7 #define IROHA_CLI_GRPC_RESPONSE_HANDLER_HPP
8 
11 
12 namespace spdlog {
13  class logger;
14 }
15 
16 namespace iroha_cli {
18  public:
19  explicit GrpcResponseHandler(
20  logger::Logger log = logger::log("GrpcResponseHandler"));
25  void handle(CliClient::Response<CliClient::TxStatus> response);
31 
32  private:
33  TransactionResponseHandler tx_handler_;
34  QueryResponseHandler query_handler_;
35  void handleGrpcErrors(grpc::StatusCode code);
36  std::shared_ptr<spdlog::logger> log_;
37  std::unordered_map<int, std::string> handler_map_;
38  };
39 } // namespace iroha_cli
40 
41 #endif // IROHA_GRPC_RESPONSE_HANDLER_HPP
Definition: client.hpp:26
Definition: client.cpp:16
std::shared_ptr< spdlog::logger > Logger
Definition: logger.hpp:26
Definition: grpc_response_handler.hpp:12
Definition: logger.cpp:8
Logger log(const std::string &tag)
Definition: logger.cpp:48
Definition: grpc_response_handler.hpp:17
Definition: query_response_handler.hpp:31
Definition: transaction_response_handler.hpp:17