hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
query_client.hpp
Go to the documentation of this file.
1 
6 #ifndef TORII_UTILS_QUERY_CLIENT_HPP
7 #define TORII_UTILS_QUERY_CLIENT_HPP
8 
9 #include <endpoint.grpc.pb.h>
10 #include <endpoint.pb.h>
11 #include <memory>
12 #include <thread>
13 
14 namespace torii_utils {
15 
20  public:
21  using Service = iroha::protocol::QueryService_v1;
22 
23  QuerySyncClient(std::shared_ptr<Service::StubInterface> stub);
24 
32  iroha::protocol::QueryResponse &response) const;
33 
34  std::vector<iroha::protocol::BlockQueryResponse> FetchCommits(
35  const iroha::protocol::BlocksQuery &blocks_query) const;
36 
37  private:
38  void swap(QuerySyncClient &lhs, QuerySyncClient &rhs);
39 
40  std::shared_ptr<Service::StubInterface> stub_;
41  };
42 
52 } // namespace torii_utils
53 
54 #endif // TORII_UTILS_QUERY_CLIENT_HPP
QuerySyncClient(std::shared_ptr< Service::StubInterface > stub)
Definition: query_client.cpp:16
iroha::protocol::QueryService_v1 Service
Definition: query_client.hpp:21
Definition: query_client.hpp:19
Definition: query_client.cpp:11
grpc::Status Find(const iroha::protocol::Query &query, iroha::protocol::QueryResponse &response) const
Definition: query_client.cpp:25
std::vector< iroha::protocol::BlockQueryResponse > FetchCommits(const iroha::protocol::BlocksQuery &blocks_query) const
Definition: query_client.cpp:32
Status
Definition: status.hpp:12