hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha_conf_loader.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CONF_LOADER_HPP
7 #define IROHA_CONF_LOADER_HPP
8 
9 #include <string>
10 #include <unordered_map>
11 
15 #include "torii/tls_params.hpp"
16 
17 struct IrohadConfig {
18  struct DbConfig {
19  std::string host;
20  uint16_t port;
21  std::string user;
22  std::string password;
23  std::string working_dbname;
24  std::string maintenance_dbname;
25  };
26 
27  // TODO: block_store_path is now optional, change docs IR-576
28  // luckychess 29.06.2019
29  boost::optional<std::string> block_store_path;
30  uint16_t torii_port;
31  boost::optional<iroha::torii::TlsParams> torii_tls_params;
32  uint16_t internal_port;
33  boost::optional<std::string>
34  pg_opt; // TODO 2019.06.26 mboldyrev IR-556 remove
35  boost::optional<DbConfig>
36  database_config; // TODO 2019.06.26 mboldyrev IR-556 make required
38  uint32_t proposal_delay;
39  uint32_t vote_delay;
41  boost::optional<uint32_t> mst_expiration_time;
42  boost::optional<uint32_t> max_round_delay_ms;
43  boost::optional<uint32_t> stale_stream_max_rounds;
44  boost::optional<logger::LoggerManagerTreePtr> logger_manager;
45  boost::optional<shared_model::interface::types::PeerList> initial_peers;
46 };
47 
54  const std::string &conf_path,
55  std::shared_ptr<shared_model::interface::CommonObjectsFactory>
56  common_objects_factory);
57 
58 #endif // IROHA_CONF_LOADER_HPP
std::string maintenance_dbname
Definition: iroha_conf_loader.hpp:24
uint16_t port
Definition: iroha_conf_loader.hpp:20
boost::optional< uint32_t > max_round_delay_ms
Definition: iroha_conf_loader.hpp:42
IrohadConfig parse_iroha_config(const std::string &conf_path, std::shared_ptr< shared_model::interface::CommonObjectsFactory > common_objects_factory)
Definition: iroha_conf_loader.cpp:425
boost::optional< iroha::torii::TlsParams > torii_tls_params
Definition: iroha_conf_loader.hpp:31
boost::optional< uint32_t > stale_stream_max_rounds
Definition: iroha_conf_loader.hpp:43
std::string host
Definition: iroha_conf_loader.hpp:19
uint32_t proposal_delay
Definition: iroha_conf_loader.hpp:38
Definition: iroha_conf_loader.hpp:17
uint16_t internal_port
Definition: iroha_conf_loader.hpp:32
uint32_t max_proposal_size
Definition: iroha_conf_loader.hpp:37
boost::optional< std::string > pg_opt
Definition: iroha_conf_loader.hpp:34
boost::optional< shared_model::interface::types::PeerList > initial_peers
Definition: iroha_conf_loader.hpp:45
std::string password
Definition: iroha_conf_loader.hpp:22
boost::optional< uint32_t > mst_expiration_time
Definition: iroha_conf_loader.hpp:41
bool mst_support
Definition: iroha_conf_loader.hpp:40
std::string working_dbname
Definition: iroha_conf_loader.hpp:23
boost::optional< std::string > block_store_path
Definition: iroha_conf_loader.hpp:29
uint32_t vote_delay
Definition: iroha_conf_loader.hpp:39
std::string user
Definition: iroha_conf_loader.hpp:21
boost::optional< logger::LoggerManagerTreePtr > logger_manager
Definition: iroha_conf_loader.hpp:44
boost::optional< DbConfig > database_config
Definition: iroha_conf_loader.hpp:36
Definition: iroha_conf_loader.hpp:18
uint16_t torii_port
Definition: iroha_conf_loader.hpp:30