int main(int argc, char** argv) { dsn_app_registration_redis(); // specify what services and tools will run in config file, then run dsn_run(argc, argv, true); return 0; }
int main(int argc, char** argv) { // // run the system with arguments // config [-cargs k1=v1;k2=v2] [-app_list app_name1@index1;app_name2@index] // e.g., config.ini -app_list replica@1 to start the first replica as a new process // config.ini -app_list replica to start ALL replicas (count specified in config) as a new process // config.ini -app_list replica -cargs replica-port=34556 to start ALL replicas with given port variable specified in config.ini // config.ini to start ALL apps as a new process // dsn_run(argc, argv, true); return 0; }
int main(int argc, char** argv) { module_init(); // specify what services and tools will run in config file, then run dsn_run(argc, argv, true); // TODO: external echo lib test dsn_mimic_app("client", 1); dsn::rpc_address server_addr("localhost", 27001); dsn::example::echo_client client(server_addr); std::string resp; client.ping("hihihihihihii", resp); return 0; }
int main(int argc, char** argv) { // register replication application provider dsn::replication::register_replica_provider<::dsn::replication::application::simple_kv_service_impl>("simple_kv"); // register all possible services dsn::register_app<::dsn::replication::meta_service_app>("meta"); dsn::register_app<::dsn::replication::replication_service_app>("replica"); dsn::register_app<::dsn::replication::application::simple_kv_client_app>("client"); dsn::register_app<::dsn::replication::application::simple_kv_perf_test_client_app>("client.perf.test"); dsn::replication::install_checkers(); // specify what services and tools will run in config file, then run dsn_run(argc, argv, true); return 0; }
int main(int argc, char** argv) { if (argc != 3) { std::cerr << "USGAE: " << argv[0] << " <config-file> <case-input>" << std::endl; std::cerr << " e.g.: " << argv[0] << " case-000.ini case-000.act" << std::endl; return -1; } dsn::replication::test::g_case_input = argv[2]; dsn_app_registration(); dsn_core_init(); // specify what services and tools will run in config file, then run dsn_run(argc - 1, argv, false); while (!dsn::replication::test::g_done) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } ddebug("=== exiting ..."); dsn::replication::test::test_checker::instance().exit(); if (dsn::replication::test::g_fail) { #ifndef ENABLE_GCOV dsn_exit(-1); #endif return -1; } #ifndef ENABLE_GCOV dsn_exit(0); #endif return 0; }
DSN_PY_API void dsn_run_helper(int argc, char** argv, bool sleep_after_init) { dsn_run(argc, argv, sleep_after_init); }