MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / main

Function main

src/DocLayer.actor.cpp:702–1102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702int main(int argc, char** argv) {
703 CSimpleOpt args(argc, argv, g_rgOptions, SO_O_EXACT);
704
705 std::string commandLine;
706 Optional<uint16_t> proxyfrom, proxyto;
707 char* endptr;
708 char** proxyports;
709 std::string logFolder = ".";
710 std::string logGroup = "default";
711 std::string connFile;
712 std::string listenAddr;
713 std::string unitTestPattern;
714 NetworkAddress na = NetworkAddress::parse("127.0.0.1:27016");
715 uint64_t rollsize = 10 << 20;
716 uint64_t maxLogsSize = rollsize * 10;
717 bool pipelineCompatMode = false;
718 int retryLimit = 3;
719 int timeoutMillies = 7000;
720 const char* rootDirectory = "document";
721 std::vector<std::pair<std::string, std::string>> knobs, client_knobs;
722 NetworkOptionsT client_network_options;
723 std::string metricReporterConfig;
724 char* metricPluginPath = nullptr;
725 std::string fdbDatacenterID;
726#ifndef TLS_DISABLED
727 Reference<TLSOptions> tlsOptions = Reference<TLSOptions>(new TLSOptions);
728#endif
729 std::string tlsCertPath, tlsKeyPath, tlsCAPath, tlsPassword;
730 std::vector<std::string> tlsVerifyPeers;
731
732 for (int a = 0; a < argc; a++) {
733 if (a)
734 commandLine += ' ';
735 commandLine += argv[a];
736 }
737
738 while (args.Next()) {
739 if (args.LastError() == SO_ARG_INVALID_DATA) {
740 fprintf(stderr, "ERROR: invalid argument to option `%s'\n", args.OptionText());
741 printHelp(argv[0]);
742 return -1;
743 }
744 if (args.LastError() == SO_ARG_INVALID) {
745 fprintf(stderr, "ERROR: argument given for option `%s'\n", args.OptionText());
746 printHelp(argv[0]);
747 return -1;
748 }
749 if (args.LastError() == SO_ARG_MISSING) {
750 fprintf(stderr, "ERROR: missing argument for option `%s'\n", args.OptionText());
751 printHelp(argv[0]);
752 return -1;
753 }
754 if (args.LastError() == SO_OPT_INVALID) {
755 fprintf(stderr, "ERROR: unknown option: `%s'\n", args.OptionText());
756 printHelp(argv[0]);
757 return -1;
758 }
759 if (args.LastError() != SO_SUCCESS) {

Callers

nothing calls this directly

Calls 14

printHelpFunction · 0.85
printHelpTeaserFunction · 0.85
printVersionFunction · 0.85
init_document_errorFunction · 0.85
setThreadNameFunction · 0.85
getGitVersionFunction · 0.85
getFlowGitVersionFunction · 0.85
setupFunction · 0.85
startsWithMethod · 0.80
emptyMethod · 0.80
findMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected