hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
command_client.hpp
Go to the documentation of this file.
1 
6 #ifndef TORII_COMMAND_CLIENT_HPP
7 #define TORII_COMMAND_CLIENT_HPP
8 
9 #include <endpoint.grpc.pb.h>
10 #include <grpc++/grpc++.h>
11 #include <memory>
12 #include <thread>
13 
14 #include "logger/logger_fwd.hpp"
15 
16 namespace torii {
17 
22  public:
24  std::unique_ptr<iroha::protocol::CommandService_v1::StubInterface> stub,
25  logger::LoggerPtr log);
26 
32  grpc::Status Torii(const iroha::protocol::Transaction &tx) const;
33 
39  grpc::Status ListTorii(const iroha::protocol::TxList &tx_list) const;
40 
46  grpc::Status Status(const iroha::protocol::TxStatusRequest &tx,
47  iroha::protocol::ToriiResponse &response) const;
48 
55  void StatusStream(
56  const iroha::protocol::TxStatusRequest &tx,
57  std::vector<iroha::protocol::ToriiResponse> &response) const;
58 
59  private:
60  std::unique_ptr<iroha::protocol::CommandService_v1::StubInterface> stub_;
61  logger::LoggerPtr log_;
62  };
63 
64 } // namespace torii
65 
66 #endif // TORII_COMMAND_CLIENT_HPP
void StatusStream(const iroha::protocol::TxStatusRequest &tx, std::vector< iroha::protocol::ToriiResponse > &response) const
Definition: command_client.cpp:45
Definition: command_client.hpp:16
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
grpc::Status Status(const iroha::protocol::TxStatusRequest &tx, iroha::protocol::ToriiResponse &response) const
Definition: command_client.cpp:38
grpc::Status ListTorii(const iroha::protocol::TxList &tx_list) const
Definition: command_client.cpp:31
CommandSyncClient(std::unique_ptr< iroha::protocol::CommandService_v1::StubInterface > stub, logger::LoggerPtr log)
Definition: command_client.cpp:20
Definition: command_client.hpp:21
grpc::Status Torii(const iroha::protocol::Transaction &tx) const
Definition: command_client.cpp:25