# HG changeset patch # User František Kučera # Date 1658604961 -7200 # Node ID 3891db9e45b7df59081c258c0d73513d8a39e201 # Parent f724d805c34a550268293f1654c5445147bd77af rename --endpoint-url to --connection-string diff -r f724d805c34a -r 3891db9e45b7 bash-completion.sh --- a/bash-completion.sh Mon May 02 17:59:10 2022 +0200 +++ b/bash-completion.sh Sat Jul 23 21:36:01 2022 +0200 @@ -23,12 +23,12 @@ w3=${COMP_WORDS[COMP_CWORD-3]} if [[ "$w1" == "--relation" && "x$w0" == "x" ]]; then COMPREPLY=("''") - elif [[ "$w1" == "--endpoint-url" && "x$w0" == "x" ]]; then COMPREPLY=("'tcp://*:1234'") + elif [[ "$w1" == "--connection-string" && "x$w0" == "x" ]]; then COMPREPLY=("'tcp://*:1234'") elif [[ "$w1" == "--message-count" && "x$w0" == "x" ]]; then COMPREPLY=("1") else OPTIONS=( "--relation" - "--endpoint-url" + "--connection-string" "--message-count" ) COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0")) diff -r f724d805c34a -r 3891db9e45b7 src/CLIParser.h --- a/src/CLIParser.h Mon May 02 17:59:10 2022 +0200 +++ b/src/CLIParser.h Sat Jul 23 21:36:01 2022 +0200 @@ -40,7 +40,7 @@ public: static const relpipe::writer::string_t OPTION_RELATION; - static const relpipe::writer::string_t OPTION_ENDPOINT_URL; + static const relpipe::writer::string_t OPTION_CONNECTION_STRING; static const relpipe::writer::string_t OPTION_MESSAGE_COUNT; Configuration parse(const std::vector& arguments) { @@ -51,8 +51,8 @@ if (option == OPTION_RELATION) { c.relation = readNext(arguments, i); - } else if (option == OPTION_ENDPOINT_URL) { - c.endpointUrl = readNext(arguments, i); + } else if (option == OPTION_CONNECTION_STRING) { + c.connectionString = readNext(arguments, i); } else if (option == OPTION_MESSAGE_COUNT) { c.messageCount = std::stoull(readNext(arguments, i)); } else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS); @@ -66,7 +66,7 @@ }; const relpipe::writer::string_t CLIParser::OPTION_RELATION = L"--relation"; -const relpipe::writer::string_t CLIParser::OPTION_ENDPOINT_URL = L"--endpoint-url"; +const relpipe::writer::string_t CLIParser::OPTION_CONNECTION_STRING = L"--connection-string"; const relpipe::writer::string_t CLIParser::OPTION_MESSAGE_COUNT = L"--message-count"; } diff -r f724d805c34a -r 3891db9e45b7 src/Configuration.h --- a/src/Configuration.h Mon May 02 17:59:10 2022 +0200 +++ b/src/Configuration.h Sat Jul 23 21:36:01 2022 +0200 @@ -31,7 +31,7 @@ relpipe::common::type::StringX relation = L"message"; relpipe::common::type::Integer messageCount = 1; - relpipe::common::type::StringX endpointUrl = L"tcp://*:1234"; + relpipe::common::type::StringX connectionString = L"tcp://*:1234"; virtual ~Configuration() { } diff -r f724d805c34a -r 3891db9e45b7 src/ZeroMQCommand.cpp --- a/src/ZeroMQCommand.cpp Mon May 02 17:59:10 2022 +0200 +++ b/src/ZeroMQCommand.cpp Sat Jul 23 21:36:01 2022 +0200 @@ -47,7 +47,7 @@ void ZeroMQCommand::process(std::shared_ptr writer, Configuration& configuration) { zmq::context_t zmqContext; zmq::socket_t zmqSocket(zmqContext, zmq::socket_type::pull); - zmqSocket.bind(convertor.to_bytes(configuration.endpointUrl)); + zmqSocket.bind(convertor.to_bytes(configuration.connectionString)); if (false) {