hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
storage_init.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_STORAGE_INIT_HPP
7 #define IROHA_STORAGE_INIT_HPP
8 
9 #include <functional>
10 #include <memory>
11 #include <optional>
12 #include <string>
13 
14 #include <boost/optional/optional_fwd.hpp>
15 #include "common/result_fwd.hpp"
16 #include "logger/logger_fwd.hpp"
18 
19 namespace shared_model::interface {
20  class Block;
21  class QueryResponseFactory;
22 } // namespace shared_model::interface
23 
24 namespace iroha {
25  class PendingTransactionStorage;
26 
27  namespace ametsuchi {
28  struct PoolWrapper;
29  class PostgresOptions;
30  class RocksDbOptions;
31  class Storage;
32  class VmCaller;
33  struct RocksDBContext;
34  } // namespace ametsuchi
35 
36  expected::Result<std::shared_ptr<iroha::ametsuchi::Storage>, std::string>
38  std::shared_ptr<ametsuchi::RocksDBContext> db_context,
39  std::shared_ptr<iroha::PendingTransactionStorage> pending_txs_storage,
40  std::shared_ptr<shared_model::interface::QueryResponseFactory>
41  query_response_factory,
42  boost::optional<std::string> block_storage_dir,
43  std::optional<std::reference_wrapper<const iroha::ametsuchi::VmCaller>>
44  vm_caller_ref,
45  std::function<void(std::shared_ptr<shared_model::interface::Block const>)>
46  callback,
47  logger::LoggerManagerTreePtr log_manager);
48 
49  expected::Result<std::shared_ptr<iroha::ametsuchi::Storage>, std::string>
52  std::shared_ptr<iroha::ametsuchi::PoolWrapper> pool_wrapper,
53  std::shared_ptr<iroha::PendingTransactionStorage> pending_txs_storage,
54  std::shared_ptr<shared_model::interface::QueryResponseFactory>
55  query_response_factory,
56  boost::optional<std::string> block_storage_dir,
57  std::optional<std::reference_wrapper<const iroha::ametsuchi::VmCaller>>
58  vm_caller_ref,
59  std::function<void(std::shared_ptr<shared_model::interface::Block const>)>
60  callback,
61  logger::LoggerManagerTreePtr log_manager);
62 } // namespace iroha
63 
64 #endif
Definition: block_query.hpp:17
Definition: postgres_options.hpp:19
expected::Result< std::shared_ptr< iroha::ametsuchi::Storage >, std::string > initStorage(iroha::ametsuchi::PostgresOptions const &pg_opt, std::shared_ptr< iroha::ametsuchi::PoolWrapper > pool_wrapper, std::shared_ptr< iroha::PendingTransactionStorage > pending_txs_storage, std::shared_ptr< shared_model::interface::QueryResponseFactory > query_response_factory, boost::optional< std::string > block_storage_dir, std::optional< std::reference_wrapper< const iroha::ametsuchi::VmCaller >> vm_caller_ref, std::function< void(std::shared_ptr< shared_model::interface::Block const >)> callback, logger::LoggerManagerTreePtr log_manager)
Definition: storage_init.cpp:131
Definition: block_query.hpp:15
Definition: command_executor.hpp:14
std::shared_ptr< LoggerManagerTree > LoggerManagerTreePtr
Definition: logger_manager_fwd.hpp:14