Repository: qpid-proton Updated Branches: refs/heads/master 5595c41c5 -> e7930c058
NO-JIRA: Rename docs/connect_config.md -> connect-config.md Keep in line with file naming conventions. Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/e7930c05 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/e7930c05 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/e7930c05 Branch: refs/heads/master Commit: e7930c0580bd3e975bab2195edb68deced2afe19 Parents: 5595c41 Author: Alan Conway <acon...@redhat.com> Authored: Fri Sep 21 15:59:31 2018 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Fri Sep 21 17:01:00 2018 -0400 ---------------------------------------------------------------------- cpp/docs/CMakeLists.txt | 2 +- cpp/docs/user.doxygen.in | 2 +- cpp/include/proton/connect_config.hpp | 9 ++++--- cpp/include/proton/container.hpp | 3 +-- docs/connect-config.md | 42 ++++++++++++++++++++++++++++++ docs/connect_config.md | 42 ------------------------------ 6 files changed, 51 insertions(+), 49 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e7930c05/cpp/docs/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/cpp/docs/CMakeLists.txt b/cpp/docs/CMakeLists.txt index 690230d..ff329aa 100644 --- a/cpp/docs/CMakeLists.txt +++ b/cpp/docs/CMakeLists.txt @@ -24,7 +24,7 @@ if (DOXYGEN_FOUND) ${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen) - file(GLOB_RECURSE sources ../include/proton/*.hpp ../../connect_config.md) + file(GLOB_RECURSE sources ../include/proton/*.hpp ../../connect-config.md) add_custom_target (docs-cpp COMMAND ${CMAKE_COMMAND} -E remove_directory html # get rid of old files COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e7930c05/cpp/docs/user.doxygen.in ---------------------------------------------------------------------- diff --git a/cpp/docs/user.doxygen.in b/cpp/docs/user.doxygen.in index 84375d8..9810991 100644 --- a/cpp/docs/user.doxygen.in +++ b/cpp/docs/user.doxygen.in @@ -56,7 +56,7 @@ WARNINGS = YES INPUT = @CMAKE_SOURCE_DIR@/cpp/include \ @CMAKE_SOURCE_DIR@/cpp/docs \ @CMAKE_SOURCE_DIR@/cpp/examples \ - @CMAKE_SOURCE_DIR@/docs/connect_config.md + @CMAKE_SOURCE_DIR@/docs/connect-config.md FILE_PATTERNS = *.hpp *.md *.dox EXCLUDE_PATTERNS = @CMAKE_SOURCE_DIR@/cpp/examples/*.?pp \ @CMAKE_SOURCE_DIR@/cpp/include/proton/internal/*.hpp http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e7930c05/cpp/include/proton/connect_config.hpp ---------------------------------------------------------------------- diff --git a/cpp/include/proton/connect_config.hpp b/cpp/include/proton/connect_config.hpp index be5c7ac..d9d2c0f 100644 --- a/cpp/include/proton/connect_config.hpp +++ b/cpp/include/proton/connect_config.hpp @@ -27,19 +27,22 @@ namespace proton { class connection_options; /// *Unsettled API* +/// +/// Functions for locating and using a @ref connect-config file, or a +/// configuration string to set @ref connection_options namespace connect_config { -/// @return name of the default connection configuration file +/// @return name of the default @ref connect-config file. /// @throw proton::error if no default file is found PN_CPP_EXTERN std::string default_file(); -/// Parse configuration from @p is and update @p opts +/// Parse @ref connect-config from @p is and update @p opts /// @param is input stream for configuration file/string /// @param opts [out] connection options to update /// @return address suitable for container::connect() from configuration PN_CPP_EXTERN std::string parse(std::istream& is, connection_options& opts); -/// Parse configuration from default_file() and update @p opts +/// Parse @ref connect-config from default_file() and update @p opts /// @param opts [out] connection options to update /// @return address suitable for container::connect() from configuration PN_CPP_EXTERN std::string parse_default(connection_options& opts); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e7930c05/cpp/include/proton/container.hpp ---------------------------------------------------------------------- diff --git a/cpp/include/proton/container.hpp b/cpp/include/proton/container.hpp index 362dba0..aa735f4 100644 --- a/cpp/include/proton/container.hpp +++ b/cpp/include/proton/container.hpp @@ -113,8 +113,7 @@ class PN_CPP_CLASS_EXTERN container { /// @copydetails returned PN_CPP_EXTERN returned<connection> connect(const std::string& conn_url); - /// Connect using the default @ref connect_config - /// FIXME aconway 2018-08-07: cmake - copy connect_config.md into C++ doc + /// Connect using the default @ref connect-config file. /// /// @copydetails returned PN_CPP_EXTERN returned<connection> connect(); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e7930c05/docs/connect-config.md ---------------------------------------------------------------------- diff --git a/docs/connect-config.md b/docs/connect-config.md new file mode 100644 index 0000000..eeaea4e --- /dev/null +++ b/docs/connect-config.md @@ -0,0 +1,42 @@ +# Connection Configuration {#connect-config} + +Proton clients can read default connection configuration from a +configuration file. + +If the environment variable `MESSAGING_CONNECT_FILE` is set, it is the +path to the file. Otherwise the client looks for a file named +`connect.json` in the following locations, using the first one found: + +* Current working directory of client process. +* `$HOME/.config/messaging/` - $HOME is user's home directory. +* `$PREFIX/etc/messaging/` - $PREFIX is the prefix where the proton library is installed +* `/etc/messaging/` + +The configuration file is in JSON object format. Comments are allowed, +as defined by the [JavaScript Minifier](https://www.crockford.com/javascript/jsmin.html) + +The file format is as follows. Properties are shown with their default +values, all properties are optional. + + { + "scheme": "amqps", // [string] "amqp" (no TLS) or "amqps" + "host": "localhost", // [string] DNS or IP address for connection. Defaults to local host. + "port": "amqps", // [string] "amqp", "amqps" or port number. Defaults to value of 'scheme'. + "user": null, // [string] Authentication user name + "password": null, // [string] Authentication password + + "sasl": { + "enable": true, // [bool] Enable or disable SASL + "mechanisms": null, // [list] List of allowed SASL mechanism names. + // If null the library determines the default list. + "allow_insecure": false // [boolean] Allow mechanisms that send unencrypted clear-text passwords + }, + + // Note: it is an error to have a "tls" object unless scheme="amqps" + "tls": { + "cert": null, // [string] name of client certificate or database + "key": null // [string] private key or identity for client certificate + "ca": null, // [string] name of CA certificate or database + "verify": true, // [bool] if true, require a valid cert with matching host name + } + } http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e7930c05/docs/connect_config.md ---------------------------------------------------------------------- diff --git a/docs/connect_config.md b/docs/connect_config.md deleted file mode 100644 index 63044be..0000000 --- a/docs/connect_config.md +++ /dev/null @@ -1,42 +0,0 @@ -# Connection Configuration - -Proton clients can read default connection information from a -configuration file. - -If the environment variable `MESSAGING_CONNECT_FILE` is set, it is the -path to the file. Otherwise the client looks for a file named -`connect.json` in the following locations, using the first one found: - -* Current working directory of client process. -* `$HOME/.config/messaging/` - $HOME is user's home directory. -* `$PREFIX/etc/messaging/` - $PREFIX is the prefix where the proton library is installed -* `/etc/messaging/` - -The configuration file is in JSON object format. Comments are allowed, -as defined by the [JavaScript Minifier](https://www.crockford.com/javascript/jsmin.html) - -The file format is as follows. Properties are shown with their default -values, all properties are optional. - - { - "scheme": "amqps", // [string] "amqp" (no TLS) or "amqps" - "host": "", // [string] DNS or IP address for connection. Defaults to local host. - "port": "amqps", // [string] "amqp", "amqps" or port number. Defaults to value of 'scheme'. - "user": null, // [string] Authentication user name - "password": null, // [string] Authentication password - - "sasl": { - "enable": true, // [bool] Enable or disable SASL - "mechanisms": null, // [list] List of allowed SASL mechanism names. - // If null the library determines the default list. - "allow_insecure": false // [boolean] Allow mechanisms that send unencrypted clear-text passwords - }, - - // Note: it is an error to have a "tls" object unless scheme="amqps" - "tls": { - "cert": null, // [string] name of client certificate or database - "key": null // [string] private key or identity for client certificate - "ca": null, // [string] name of CA certificate or database - "verify": true, // [bool] if true, require a valid cert with matching host name - } - } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org