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  struct InterPeerTls {
28  struct RootCert {
29  std::string path;
30  };
31  struct FromWsv {};
32  struct None {};
33  using PeerCertProvider = boost::variant<RootCert, FromWsv, None>;
34 
35  boost::optional<std::string> my_tls_creds_path;
37  };
38 
39  // TODO: block_store_path is now optional, change docs IR-576
40  // luckychess 29.06.2019
41  boost::optional<std::string> block_store_path;
42  uint16_t torii_port;
43  boost::optional<iroha::torii::TlsParams> torii_tls_params;
44  boost::optional<InterPeerTls> inter_peer_tls;
45  uint16_t internal_port;
46  boost::optional<std::string>
47  pg_opt; // TODO 2019.06.26 mboldyrev IR-556 remove
48  boost::optional<DbConfig>
49  database_config; // TODO 2019.06.26 mboldyrev IR-556 make required
51  uint32_t proposal_delay;
52  uint32_t vote_delay;
54  boost::optional<uint32_t> mst_expiration_time;
55  boost::optional<uint32_t> max_round_delay_ms;
56  boost::optional<uint32_t> stale_stream_max_rounds;
57  boost::optional<logger::LoggerManagerTreePtr> logger_manager;
58  boost::optional<shared_model::interface::types::PeerList> initial_peers;
59 };
60 
67  const std::string &conf_path,
68  std::shared_ptr<shared_model::interface::CommonObjectsFactory>
69  common_objects_factory);
70 
71 #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:55
IrohadConfig parse_iroha_config(const std::string &conf_path, std::shared_ptr< shared_model::interface::CommonObjectsFactory > common_objects_factory)
Definition: iroha_conf_loader.cpp:478
boost::variant< RootCert, FromWsv, None > PeerCertProvider
Definition: iroha_conf_loader.hpp:33
PeerCertProvider peer_certificates
Definition: iroha_conf_loader.hpp:36
boost::optional< iroha::torii::TlsParams > torii_tls_params
Definition: iroha_conf_loader.hpp:43
boost::optional< uint32_t > stale_stream_max_rounds
Definition: iroha_conf_loader.hpp:56
boost::optional< InterPeerTls > inter_peer_tls
Definition: iroha_conf_loader.hpp:44
std::string host
Definition: iroha_conf_loader.hpp:19
boost::optional< std::string > my_tls_creds_path
Definition: iroha_conf_loader.hpp:35
Definition: iroha_conf_loader.hpp:31
uint32_t proposal_delay
Definition: iroha_conf_loader.hpp:51
Definition: iroha_conf_loader.hpp:28
Definition: iroha_conf_loader.hpp:17
uint16_t internal_port
Definition: iroha_conf_loader.hpp:45
Definition: iroha_conf_loader.hpp:32
uint32_t max_proposal_size
Definition: iroha_conf_loader.hpp:50
boost::optional< std::string > pg_opt
Definition: iroha_conf_loader.hpp:47
boost::optional< shared_model::interface::types::PeerList > initial_peers
Definition: iroha_conf_loader.hpp:58
std::string password
Definition: iroha_conf_loader.hpp:22
boost::optional< uint32_t > mst_expiration_time
Definition: iroha_conf_loader.hpp:54
bool mst_support
Definition: iroha_conf_loader.hpp:53
std::string working_dbname
Definition: iroha_conf_loader.hpp:23
boost::optional< std::string > block_store_path
Definition: iroha_conf_loader.hpp:41
uint32_t vote_delay
Definition: iroha_conf_loader.hpp:52
std::string user
Definition: iroha_conf_loader.hpp:21
boost::optional< logger::LoggerManagerTreePtr > logger_manager
Definition: iroha_conf_loader.hpp:57
boost::optional< DbConfig > database_config
Definition: iroha_conf_loader.hpp:49
Definition: iroha_conf_loader.hpp:18
Definition: iroha_conf_loader.hpp:27
uint16_t torii_port
Definition: iroha_conf_loader.hpp:42
std::string path
Definition: iroha_conf_loader.hpp:29