Namespaces | |
| namespace | coin |
| namespace | contract |
| namespace | storage |
| namespace | testing |
| namespace | utils |
| namespace | utxo |
Typedefs | |
| typedef std::function< std::unique_ptr< ResDBConfig >(const ResConfigData &config_data, const ReplicaInfo &self_info, const KeyInfo &private_key, const CertificateInfo &public_key_cert_info)> | ConfigGenFunc |
Enumerations | |
| enum | TransactionStatue { None = 0 , Prepare = -999 , READY_PREPARE = 1 , READY_COMMIT = 2 , READY_EXECUTE = 3 , EXECUTED = 4 } |
| enum | CollectorResultCode { INVALID = -2 , OK = 0 , STATE_CHANGED = 1 } |
| enum | ViewChangeTimerType { TYPE_COMPLAINT , TYPE_VIEWCHANGE , TYPE_NEWVIEW } |
| enum | TableName { GENERAL , WORKER_THREAD , IO_THREAD , CLIENT , CONFIGURATION , SERVER , CONSENSUS } |
| enum | MetricName { SERVER_CALL_NAME , SERVER_PROCESS , CLIENT_CALL , CLIENT_REQ , SOCKET_RECV , BROAD_CAST , PROPOSE , PREPARE , COMMIT , EXECUTE , NUM_EXECUTE_TX } |
Functions | |
| uint64_t | GetCurrentTime () |
| std::string | GetDNSName (const std::string &ip, int port, NetworkType type) |
| std::string | GetTcpUrl (const std::string &ip, int port) |
| TEST (NetworkUtilsTest, GetDNSName) | |
| TEST (NetworkUtilsTest, GetTcpUrl) | |
| TEST (TcpSocket, SendAndRecv) | |
| TEST (TcpSocket, SendAfterClose) | |
| ReplicaInfo | GenerateReplicaInfo (int id, const std::string &ip, int port) |
| ResConfigData | ReadConfigFromFile (const std::string &file_name) |
| std::vector< ReplicaInfo > | ReadConfig (const std::string &file_name) |
| std::unique_ptr< ResDBConfig > | GenerateResDBConfig (const std::string &config_file, const std::string &private_key_file, const std::string &cert_file, std::optional< ReplicaInfo > self_info, std::optional< ConfigGenFunc > gen_func) |
| ResDBConfig | GenerateResDBConfig (const std::string &config_file) |
| std::unique_ptr< Request > | NewRequest (Request::Type type, const Request &request, int sender_id) |
| std::unique_ptr< Request > | NewRequest (Request::Type type, const Request &request, int sender_id, int region_id) |
| std::string | GetHash (const std::string &h1, const std::string &h2) |
| ResDBConfig | GenerateDBConfig () |
| void | SendData (const std::string &data) |
| TEST (ServiceNetworkTest, RecvData) | |
| TEST (ServiceNetworkTest, RunningDone) | |
| TEST_F (ResDBTest, TestPBFTService) | |
| std::unique_ptr< ServiceNetwork > | GenerateResDBServer (char *config_file, char *private_key_file, char *cert_file, std::unique_ptr< TransactionManager > executor, char *logging_dir, std::function< void(ResDBConfig *config)> config_handler) |
| template<typename ConsensusProtocol > | |
| std::unique_ptr< ServiceNetwork > | CustomGenerateResDBServer (char *config_file, char *private_key_file, char *cert_file, std::unique_ptr< TransactionManager > executor, char *logging_dir=nullptr, std::function< void(ResDBConfig *config)> config_handler=nullptr) |
| template<typename ConsensusProtocol > | |
| std::unique_ptr< ServiceNetwork > | CustomGenerateResDBServer (char *config_file, char *private_key_file, char *cert_file, std::unique_ptr< TransactionManager > executor, std::unique_ptr< CustomQuery > query_executor, std::function< void(ResDBConfig *config)> config_handler=nullptr) |
Variables | |
| std::map< TableName, std::string > | table_names |
| std::map< MetricName, std::pair< TableName, std::string > > | metric_names |
| std::mutex | g_mutex |
| const std::string | test_dir |
| typedef std::function<std::unique_ptr<ResDBConfig>( const ResConfigData& config_data, const ReplicaInfo& self_info, const KeyInfo& private_key, const CertificateInfo& public_key_cert_info)> resdb::ConfigGenFunc |
Definition at line 34 of file resdb_config_utils.h.
| Enumerator | |
|---|---|
| INVALID | |
| OK | |
| STATE_CHANGED | |
Definition at line 26 of file transaction_utils.h.
| enum resdb::MetricName |
| Enumerator | |
|---|---|
| SERVER_CALL_NAME | |
| SERVER_PROCESS | |
| CLIENT_CALL | |
| CLIENT_REQ | |
| SOCKET_RECV | |
| BROAD_CAST | |
| PROPOSE | |
| PREPARE | |
| COMMIT | |
| EXECUTE | |
| NUM_EXECUTE_TX | |
Definition at line 39 of file prometheus_handler.h.
| enum resdb::TableName |
| Enumerator | |
|---|---|
| GENERAL | |
| WORKER_THREAD | |
| IO_THREAD | |
| CLIENT | |
| CONFIGURATION | |
| SERVER | |
| CONSENSUS | |
Definition at line 29 of file prometheus_handler.h.
| Enumerator | |
|---|---|
| None | |
| Prepare | |
| READY_PREPARE | |
| READY_COMMIT | |
| READY_EXECUTE | |
| EXECUTED | |
Definition at line 31 of file transaction_collector.h.
| Enumerator | |
|---|---|
| TYPE_COMPLAINT | |
| TYPE_VIEWCHANGE | |
| TYPE_NEWVIEW | |
Definition at line 34 of file viewchange_manager.h.
| std::unique_ptr< ServiceNetwork > resdb::CustomGenerateResDBServer | ( | char * | config_file, |
| char * | private_key_file, | ||
| char * | cert_file, | ||
| std::unique_ptr< TransactionManager > | executor, | ||
| char * | logging_dir = nullptr, |
||
| std::function< void(ResDBConfig *config)> | config_handler = nullptr |
||
| ) |
Definition at line 104 of file server_factory.h.
| std::unique_ptr< ServiceNetwork > resdb::CustomGenerateResDBServer | ( | char * | config_file, |
| char * | private_key_file, | ||
| char * | cert_file, | ||
| std::unique_ptr< TransactionManager > | executor, | ||
| std::unique_ptr< CustomQuery > | query_executor, | ||
| std::function< void(ResDBConfig *config)> | config_handler = nullptr |
||
| ) |
Definition at line 114 of file server_factory.h.
| ResDBConfig resdb::GenerateDBConfig | ( | ) |
Definition at line 36 of file service_network_test.cpp.
| ReplicaInfo resdb::GenerateReplicaInfo | ( | int | id, |
| const std::string & | ip, | ||
| int | port | ||
| ) |
Definition at line 85 of file resdb_config_utils.cpp.
| ResDBConfig resdb::GenerateResDBConfig | ( | const std::string & | config_file | ) |
Definition at line 152 of file resdb_config_utils.cpp.
| std::unique_ptr< ResDBConfig > resdb::GenerateResDBConfig | ( | const std::string & | config_file, |
| const std::string & | private_key_file, | ||
| const std::string & | cert_file, | ||
| std::optional< ReplicaInfo > | self_info, | ||
| std::optional< ConfigGenFunc > | gen_func | ||
| ) |
Definition at line 125 of file resdb_config_utils.cpp.
| std::unique_ptr< ServiceNetwork > resdb::GenerateResDBServer | ( | char * | config_file, |
| char * | private_key_file, | ||
| char * | cert_file, | ||
| std::unique_ptr< TransactionManager > | executor, | ||
| char * | logging_dir, | ||
| std::function< void(ResDBConfig *config)> | config_handler | ||
| ) |
Definition at line 39 of file server_factory.cpp.
| std::string resdb::GetDNSName | ( | const std::string & | ip, |
| int | port, | ||
| NetworkType | type | ||
| ) |
Definition at line 24 of file network_utils.cpp.
| std::string resdb::GetHash | ( | const std::string & | h1, |
| const std::string & | h2 | ||
| ) |
Definition at line 64 of file checkpoint_manager.cpp.
| std::string resdb::GetTcpUrl | ( | const std::string & | ip, |
| int | port | ||
| ) |
Definition at line 40 of file network_utils.cpp.
| std::unique_ptr< Request > resdb::NewRequest | ( | Request::Type | type, |
| const Request & | request, | ||
| int | sender_id | ||
| ) |
Definition at line 24 of file transaction_utils.cpp.
| std::unique_ptr< Request > resdb::NewRequest | ( | Request::Type | type, |
| const Request & | request, | ||
| int | sender_id, | ||
| int | region_id | ||
| ) |
Definition at line 32 of file transaction_utils.cpp.
| std::vector< ReplicaInfo > resdb::ReadConfig | ( | const std::string & | file_name | ) |
Definition at line 108 of file resdb_config_utils.cpp.
| ResConfigData resdb::ReadConfigFromFile | ( | const std::string & | file_name | ) |
Definition at line 93 of file resdb_config_utils.cpp.
| void resdb::SendData | ( | const std::string & | data | ) |
Definition at line 49 of file service_network_test.cpp.
| resdb::TEST | ( | NetworkUtilsTest | , |
| GetDNSName | |||
| ) |
Definition at line 30 of file network_utils_test.cpp.
| resdb::TEST | ( | NetworkUtilsTest | , |
| GetTcpUrl | |||
| ) |
Definition at line 39 of file network_utils_test.cpp.
| resdb::TEST | ( | ServiceNetworkTest | , |
| RecvData | |||
| ) |
Definition at line 57 of file service_network_test.cpp.
| resdb::TEST | ( | ServiceNetworkTest | , |
| RunningDone | |||
| ) |
Definition at line 93 of file service_network_test.cpp.
| resdb::TEST | ( | TcpSocket | , |
| SendAfterClose | |||
| ) |
Definition at line 73 of file tcp_socket_test.cpp.
| resdb::TEST | ( | TcpSocket | , |
| SendAndRecv | |||
| ) |
Definition at line 30 of file tcp_socket_test.cpp.
| resdb::TEST_F | ( | ResDBTest | , |
| TestPBFTService | |||
| ) |
Definition at line 148 of file resdb_test.cpp.
| std::map<MetricName, std::pair<TableName, std::string> > resdb::metric_names |
Definition at line 35 of file prometheus_handler.cpp.
| std::map<TableName, std::string> resdb::table_names |
Definition at line 26 of file prometheus_handler.cpp.
| const std::string resdb::test_dir |
Definition at line 38 of file resdb_test.cpp.