| 9 | #include "CommonOptions.hpp" |
| 10 | |
| 11 | static bool parseCDCOptions(CommandLineArgs& args, CDCOptions& options) { |
| 12 | while(!args.done()) { |
| 13 | if (parseLogOptions(args, options.logOptions) || |
| 14 | parseXmonOptions(args, options.xmonOptions) || |
| 15 | parseMetricsOptions(args, options.metricsOptions) || |
| 16 | parseRegistryClientOptions(args, options.registryClientOptions) || |
| 17 | parseLogsDBOptions(args, options.logsDBOptions) || |
| 18 | parseServerOptions(args, options.serverOptions) |
| 19 | ) { |
| 20 | continue; |
| 21 | } |
| 22 | std::string arg = args.peekArg(); |
| 23 | if (arg == "-shard-timeout") { |
| 24 | options.shardTimeout = parseDuration(args.next()); |
| 25 | continue; |
| 26 | } |
| 27 | fprintf(stderr, "unknown argument %s\n", args.peekArg().c_str()); |
| 28 | return false; |
| 29 | } |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | static void printCDCOptionsUsage() { |
| 34 | printLogOptionsUsage(); |
no test coverage detected