|
OpenCBDC Transaction Processor
|
Namespaces | |
| namespace | rpc |
Data Structures | |
| class | console_logger |
| nuraft::logger implementation using logging::log. More... | |
| class | index_comparator |
| LevelDB comparator for ordering NuRaft log indices. More... | |
| class | log_store |
| NuRaft log_store implementation using LevelDB. More... | |
| class | node |
| A node in a raft cluster. More... | |
| class | state_manager |
| Implementation of nuraft::state_mgr using a file. More... | |
Typedefs | |
| using | data_slice = std::pair<leveldb::Slice, std::vector<char>> |
| using | result_type = nuraft::cmd_result<nuraft::ptr<nuraft::buffer>> |
| A NuRaft state machine execution result. | |
| using | callback_type |
| Function type for raft state machine execution result callbacks. | |
Enumerations | |
| enum class | log_level : int { trace = 6 , debug = 5 , info = 4 , warn = 3 , error = 2 , fatal = 1 } |
| Map from NuRaft-internal log levels to names. More... | |
Functions | |
| template<bool First> | |
| auto | get_first_or_last_index (leveldb::DB *db, const leveldb::ReadOptions &opt) -> uint64_t |
| auto | log_entry_from_slice (const leveldb::Slice &slice) -> nuraft::ptr< nuraft::log_entry > |
| auto | get_key_slice (uint64_t key) -> data_slice |
| auto | get_value_slice (nuraft::ptr< nuraft::log_entry > &entry) -> data_slice |
| template<typename T > | |
| void | save_object (const T &obj, const std::string &filename) |
| template<typename T > | |
| auto | load_object (const std::string &filename) -> nuraft::ptr< T > |
| using cbdc::raft::data_slice = std::pair<leveldb::Slice, std::vector<char>> |
Definition at line 107 of file log_store.cpp.
| using cbdc::raft::result_type = nuraft::cmd_result<nuraft::ptr<nuraft::buffer>> |
|
strong |
Map from NuRaft-internal log levels to names.
| Enumerator | |
|---|---|
| trace | |
| debug | |
| info | |
| warn | |
| error | |
| fatal | |
Definition at line 15 of file console_logger.hpp.
| auto cbdc::raft::get_first_or_last_index | ( | leveldb::DB * | db, |
| const leveldb::ReadOptions & | opt ) -> uint64_t |
Definition at line 15 of file log_store.cpp.
Referenced by cbdc::raft::log_store::apply_pack(), and cbdc::raft::log_store::load().
| auto cbdc::raft::get_key_slice | ( | uint64_t | key | ) | -> data_slice |
Definition at line 109 of file log_store.cpp.
Referenced by cbdc::raft::log_store::append(), cbdc::raft::log_store::apply_pack(), cbdc::raft::log_store::compact(), cbdc::raft::log_store::entry_at(), cbdc::raft::log_store::log_entries(), and cbdc::raft::log_store::write_at().
| auto cbdc::raft::get_value_slice | ( | nuraft::ptr< nuraft::log_entry > & | entry | ) | -> data_slice |
Definition at line 116 of file log_store.cpp.
Referenced by cbdc::raft::log_store::append(), cbdc::raft::log_store::apply_pack(), and cbdc::raft::log_store::write_at().
| auto cbdc::raft::load_object | ( | const std::string & | filename | ) | -> nuraft::ptr<T> |
Definition at line 47 of file state_manager.cpp.
Referenced by cbdc::raft::state_manager::load_config(), and cbdc::raft::state_manager::read_state().
| auto cbdc::raft::log_entry_from_slice | ( | const leveldb::Slice & | slice | ) | -> nuraft::ptr<nuraft::log_entry> |
Definition at line 76 of file log_store.cpp.
Referenced by cbdc::raft::log_store::entry_at(), cbdc::raft::log_store::last_entry(), and cbdc::raft::log_store::log_entries().
| void cbdc::raft::save_object | ( | const T & | obj, |
| const std::string & | filename ) |
Definition at line 29 of file state_manager.cpp.
Referenced by cbdc::raft::state_manager::save_config(), and cbdc::raft::state_manager::save_state().