From 0b5c4cb5fbc183b810eae0cb99bcb6ab5c68a139 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 27 Apr 2026 16:42:11 +0200 Subject: [PATCH 1/4] Adds the extension --- doc/package-lock.json | 98 ++++++++++++++++++++++++++++++++++++++++++ doc/package.json | 3 +- doc/redis-playbook.yml | 3 ++ 3 files changed, 103 insertions(+), 1 deletion(-) diff --git a/doc/package-lock.json b/doc/package-lock.json index e4d51631..a02cb305 100644 --- a/doc/package-lock.json +++ b/doc/package-lock.json @@ -6,6 +6,7 @@ "": { "dependencies": { "@cppalliance/antora-cpp-reference-extension": "^0.1.0", + "@cppalliance/antora-cpp-tagfiles-extension": "^0.1.0", "antora": "^3.1.10" } }, @@ -325,12 +326,37 @@ "semver": "^7.7.3" } }, + "node_modules/@cppalliance/antora-cpp-tagfiles-extension": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.1.0.tgz", + "integrity": "sha512-YKCRpqv8srMhqwlUcY3704H6U5DHzQ8Q73JVUv1TF+MsGdUP60DDNR6v8+Xj6PLe93K/MAo6ZUgtJ+RN40YoZQ==", + "license": "BSL-1.0", + "dependencies": { + "@antora/expand-path-helper": "^3.0.0", + "cache-directory": "^2.0.0", + "fast-xml-parser": "^5.3.1", + "he": "^1.2.0", + "isomorphic-git": "^1.35.0" + } + }, "node_modules/@iarna/toml": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", "license": "ISC" }, + "node_modules/@nodable/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -871,6 +897,42 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", "license": "MIT" }, + "node_modules/fast-xml-builder": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.5.tgz", + "integrity": "sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.1.3" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.2.tgz", + "integrity": "sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "@nodable/entities": "^2.1.0", + "fast-xml-builder": "^1.1.5", + "path-expression-matcher": "^1.5.0", + "strnum": "^2.2.3" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", @@ -1109,6 +1171,15 @@ "node": ">= 0.4" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, "node_modules/help-me": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", @@ -1458,6 +1529,21 @@ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "license": "(MIT AND Zlib)" }, + "node_modules/path-expression-matcher": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", + "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1943,6 +2029,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/teex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", diff --git a/doc/package.json b/doc/package.json index 4384079f..7fc1572a 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,6 +1,7 @@ { "dependencies": { "@cppalliance/antora-cpp-reference-extension": "^0.1.0", + "@cppalliance/antora-cpp-tagfiles-extension": "^0.1.0", "antora": "^3.1.10" } -} \ No newline at end of file +} diff --git a/doc/redis-playbook.yml b/doc/redis-playbook.yml index 54a901e8..eb5d407e 100644 --- a/doc/redis-playbook.yml +++ b/doc/redis-playbook.yml @@ -20,6 +20,9 @@ antora: tag: 'develop' variable: 'BOOST_SRC_DIR' system-env: 'BOOST_SRC_DIR' + - require: '@cppalliance/antora-cpp-tagfiles-extension' + cpp-tagfiles: + missing-symbol-log-level: error asciidoc: attributes: From 40b54aafed48a1212256b0c6ccf7ac059d90dc1b Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 5 May 2026 11:13:08 +0200 Subject: [PATCH 2/4] using namespaces and log level --- doc/redis-playbook.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/redis-playbook.yml b/doc/redis-playbook.yml index db8bdc11..1b288b45 100644 --- a/doc/redis-playbook.yml +++ b/doc/redis-playbook.yml @@ -23,6 +23,8 @@ antora: - require: '@cppalliance/antora-cpp-tagfiles-extension' cpp-tagfiles: missing-symbol-log-level: error + using-namespaces: + - 'boost::redis::' - require: '@cppalliance/antora-downloads-extension' asciidoc: @@ -47,4 +49,5 @@ output: runtime: log: + level: info failure_level: error From 83f02193fbff4cb042ab760eef5294885a86ede0 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 5 May 2026 12:40:46 +0200 Subject: [PATCH 3/4] Update extension --- doc/package-lock.json | 6 +++--- doc/package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/package-lock.json b/doc/package-lock.json index abdf6a6f..389e1d7a 100644 --- a/doc/package-lock.json +++ b/doc/package-lock.json @@ -6,7 +6,7 @@ "": { "dependencies": { "@cppalliance/antora-cpp-reference-extension": "^0.1.0", - "@cppalliance/antora-cpp-tagfiles-extension": "^0.1.0", + "@cppalliance/antora-cpp-tagfiles-extension": "git://github.com/cppalliance/antora-cpp-tagfiles-extension#86317a5d3a5745db15a7cd8b15d643140a56aa5c", "@cppalliance/antora-downloads-extension": "^0.0.2", "antora": "^3.1.10" } @@ -329,8 +329,8 @@ }, "node_modules/@cppalliance/antora-cpp-tagfiles-extension": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.1.0.tgz", - "integrity": "sha512-YKCRpqv8srMhqwlUcY3704H6U5DHzQ8Q73JVUv1TF+MsGdUP60DDNR6v8+Xj6PLe93K/MAo6ZUgtJ+RN40YoZQ==", + "resolved": "git+https://git@github.com/cppalliance/antora-cpp-tagfiles-extension.git#86317a5d3a5745db15a7cd8b15d643140a56aa5c", + "integrity": "sha512-gx9ZWpuQmnO1gaRIZcTKeugj/iBZHb/qztTEicxstBytg8fu6knWelfq2IuJA4Uvv8dii5nrt3oP7YEjiPi6DQ==", "license": "BSL-1.0", "dependencies": { "@antora/expand-path-helper": "^3.0.0", diff --git a/doc/package.json b/doc/package.json index 2619e6b7..9a28100a 100644 --- a/doc/package.json +++ b/doc/package.json @@ -2,7 +2,7 @@ "dependencies": { "@cppalliance/antora-downloads-extension": "^0.0.2", "@cppalliance/antora-cpp-reference-extension": "^0.1.0", - "@cppalliance/antora-cpp-tagfiles-extension": "^0.1.0", + "@cppalliance/antora-cpp-tagfiles-extension": "git://github.com/cppalliance/antora-cpp-tagfiles-extension#86317a5d3a5745db15a7cd8b15d643140a56aa5c", "antora": "^3.1.10" } -} +} \ No newline at end of file From 0fd92be6ae02d8358122248ef4ea5246d655ed5d Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 5 May 2026 13:13:49 +0200 Subject: [PATCH 4/4] Replace references --- doc/modules/ROOT/pages/auth.adoc | 2 +- doc/modules/ROOT/pages/cancellation.adoc | 5 +- doc/modules/ROOT/pages/index.adoc | 4 +- doc/modules/ROOT/pages/logging.adoc | 6 +- doc/modules/ROOT/pages/pushes.adoc | 20 ++--- doc/modules/ROOT/pages/reference.adoc | 78 +++++++++---------- .../ROOT/pages/requests_responses.adoc | 21 +++-- doc/modules/ROOT/pages/sentinel.adoc | 14 ++-- 8 files changed, 74 insertions(+), 76 deletions(-) diff --git a/doc/modules/ROOT/pages/auth.adoc b/doc/modules/ROOT/pages/auth.adoc index 59e1644f..ad8941f5 100644 --- a/doc/modules/ROOT/pages/auth.adoc +++ b/doc/modules/ROOT/pages/auth.adoc @@ -16,7 +16,7 @@ to customize this handshake by using a _setup request_: a request that is run automatically before any other request, every time a physical connection to the server is established. -Configuration is done on xref:reference:boost/redis/config.adoc[`config`]. +Configuration is done on cpp:config[]. Set `use_setup` to `true` (required for backwards compatibility) and build the desired setup request in `config::setup`. By default, the library sends a plain `HELLO 3` (RESP3 diff --git a/doc/modules/ROOT/pages/cancellation.adoc b/doc/modules/ROOT/pages/cancellation.adoc index 78ed2007..9f660bf5 100644 --- a/doc/modules/ROOT/pages/cancellation.adoc +++ b/doc/modules/ROOT/pages/cancellation.adoc @@ -8,7 +8,7 @@ = Cancellation and timeouts -By default, running a request with xref:reference:boost/redis/basic_connection/async_exec-02.adoc[`async_exec`] +By default, running a request with cpp:basic_connection::async_exec[`async_exec`] will wait until a connection to the Redis server is established by `async_run`. This may take a very long time if the server is down. @@ -63,8 +63,7 @@ If you know that a `request` object contains only idempotent commands, you can instruct Boost.Redis to retry the request on failure, even if the library is unsure about the server having processed the request or not. You can do so by setting `cancel_if_unresponded` -in xref:reference:boost/redis/request/config.adoc[`request::config`] -to false: +in cpp:request::config[] to false: [source,cpp] ---- diff --git a/doc/modules/ROOT/pages/index.adoc b/doc/modules/ROOT/pages/index.adoc index 875ca9f9..c9973103 100644 --- a/doc/modules/ROOT/pages/index.adoc +++ b/doc/modules/ROOT/pages/index.adoc @@ -82,10 +82,10 @@ auto co_main(config const& cfg) -> net::awaitable The roles played by the `async_run` and `async_exec` functions are: -* xref:reference:boost/redis/basic_connection/async_exec-02.adoc[`connection::async_exec`]: executes the commands contained in the +* cpp:basic_connection::async_exec[`connection::async_exec`]: executes the commands contained in the request and stores the individual responses in the response object. Can be called from multiple places in your code concurrently. -* xref:reference:boost/redis/basic_connection/async_run-04.adoc[`connection::async_run`]: keeps the connection healthy. It takes care of hostname resolution, session establishment, health-checks, reconnection and coordination of low-level read and write operations. It should be called only once per connection, regardless of the number of requests to execute. +* cpp:basic_connection::async_run[`connection::async_run`]: keeps the connection healthy. It takes care of hostname resolution, session establishment, health-checks, reconnection and coordination of low-level read and write operations. It should be called only once per connection, regardless of the number of requests to execute. == Further reading diff --git a/doc/modules/ROOT/pages/logging.adoc b/doc/modules/ROOT/pages/logging.adoc index c77fa79c..54d58df6 100644 --- a/doc/modules/ROOT/pages/logging.adoc +++ b/doc/modules/ROOT/pages/logging.adoc @@ -8,7 +8,7 @@ = Logging -xref:reference:boost/redis/basic_connection/async_run-04.adoc[`connection::async_run`] +cpp:basic_connection::async_run[`connection::async_run`] is a complex algorithm, with features like built-in reconnection. This can make configuration problems, like a misconfigured hostname, difficult to debug - Boost.Redis will keep retrying to connect to the same hostname over and over. @@ -16,7 +16,7 @@ For this reason, Boost.Redis incorporates a lightweight logging solution, and *will log some status messages to stderr by default*. Logging can be customized by passing a -xref:reference:boost/redis/logger.adoc[`logger`] object to the connection's constructor. For example, logging can be disabled by writing: +cpp:logger[] object to the connection's constructor. For example, logging can be disabled by writing: [source,cpp] ---- @@ -26,7 +26,7 @@ connection conn {ioc, logger{logger::level::disabled}}; Every message logged by the library is attached a https://en.wikipedia.org/wiki/Syslog#Severity_level[syslog-like severity] -tag (a xref:reference:boost/redis/logger/level.adoc[`logger::level`]). +tag (a cpp:logger::level[]). You can filter messages by severity by creating a `logger` with a specific level: [source,cpp] diff --git a/doc/modules/ROOT/pages/pushes.adoc b/doc/modules/ROOT/pages/pushes.adoc index cae1187d..dbbf1b51 100644 --- a/doc/modules/ROOT/pages/pushes.adoc +++ b/doc/modules/ROOT/pages/pushes.adoc @@ -65,21 +65,21 @@ auto receiver(std::shared_ptr conn) -> asio::awaitable Summary of the steps: -* Call xref:reference:boost/redis/basic_connection.adoc[`connection::set_receive_response`] +* Call cpp:basic_connection::set_receive_response[`connection::set_receive_response`] before any other receive-related calls so that the connection stores incoming pushes in the given object. The library does not copy the response; you must keep it alive for the duration of the receive loop. -* Build a request with xref:reference:boost/redis/request.adoc[`request::subscribe`] +* Build a request with cpp:request::subscribe[] (or `psubscribe`) and execute it. If the connection drops and is re-established, an equivalent `SUBSCRIBE` is sent automatically. -* Loop while xref:reference:boost/redis/basic_connection.adoc[`connection::will_reconnect`] +* Loop while cpp:basic_connection::will_reconnect[`connection::will_reconnect`] is true (i.e. until the connection is cancelled). -* Call xref:reference:boost/redis/basic_connection.adoc[`connection::async_receive2`] +* Call cpp:basic_connection::async_receive2[`connection::async_receive2`] to wait until at least one push is available. This function also participates in push flow control (see <>). * After completion, `resp` holds the raw RESP3 nodes for the received pushes - (xref:reference:boost/redis/resp3/node_view.adoc[`resp3::node_view`]). - For Pub/Sub messages produced by `PUBLISH`, use xref:reference:boost/redis/push_parser.adoc[`push_parser`] + (cpp:resp3::node_view[]). + For Pub/Sub messages produced by `PUBLISH`, use cpp:push_parser[] to iterate over them. Each parsed message exposes the channel, the payload, and, for pattern subscriptions (`PSUBSCRIBE`), the matched pattern. * Call `resp.value().clear()` to discard the current push data and make room for the @@ -94,7 +94,7 @@ traffic. Boost.Redis relies on RESP3 to multiplex them on a single connection. == Dynamic Pub/Sub tracking -When you execute a request built with xref:reference:boost/redis/request.adoc[`request::subscribe`] +When you execute a request built with cpp:request::subscribe[] (or `psubscribe`, `unsubscribe`, `punsubscribe`), the connection tracks it. After a reconnect, it re-issues the subscribe commands to restore any subscriptions that were active before the reconnect. You can dynamically subscribe and unsubscribe to channels; tracking is fully dynamic. @@ -111,7 +111,7 @@ The pending count is reset each time `async_receive2` completes. You must still memory by calling `resp3::flat_tree::clear()` (or equivalent) on the response, as in the example. -WARNING: Do not call xref:reference:boost/redis/basic_connection/async_exec-02.adoc[`async_exec`] from within the receiver loop. The response to your request may be behind enough pushes might to trigger the flow control mechanism, causing a deadlock. +WARNING: Do not call cpp:basic_connection::async_exec[`async_exec`] from within the receiver loop. The response to your request may be behind enough pushes might to trigger the flow control mechanism, causing a deadlock. == Subscribe confirmations @@ -124,7 +124,7 @@ As a result, *`async_receive2` will complete while the `push_parser` range is em when only confirmations are received. Your code should handle an empty range correctly. To work with subscribe confirmations or other push shapes, use the raw nodes in -xref:reference:boost/redis/generic_flat_response.adoc[`generic_flat_response`] +cpp:generic_flat_response[] directly (see <>). [#suspending-the-receiver] @@ -166,7 +166,7 @@ co_await websocket.async_write(msg); `SUBSCRIBE` can fail (e.g. due to ACL rules). Because of how the protocol works, such errors may be delivered as push-like data. Using -xref:reference:boost/redis/generic_flat_response.adoc[`generic_flat_response`] +cpp:generic_flat_response[] (an alias for `adapter::result`, similar to `std::expected`) lets you detect them: check `resp.has_error()` and handle the error before iterating. See the example at the top of this page. diff --git a/doc/modules/ROOT/pages/reference.adoc b/doc/modules/ROOT/pages/reference.adoc index 085ea3cb..f3cc7512 100644 --- a/doc/modules/ROOT/pages/reference.adoc +++ b/doc/modules/ROOT/pages/reference.adoc @@ -19,90 +19,90 @@ | *Unstable low-level APIs* | -xref:reference:boost/redis/connection.adoc[`connection`] +cpp:connection[] -xref:reference:boost/redis/basic_connection.adoc[`basic_connection`] +cpp:basic_connection[] -xref:reference:boost/redis/address.adoc[`address`] +cpp:address[] -xref:reference:boost/redis/role.adoc[`role`] +cpp:role[] -xref:reference:boost/redis/config.adoc[`config`] +cpp:config[] -xref:reference:boost/redis/sentinel_config.adoc[`sentinel_config`] +cpp:sentinel_config[] -xref:reference:boost/redis/error.adoc[`error`] +cpp:error[] -xref:reference:boost/redis/logger.adoc[`logger`] +cpp:logger[] -xref:reference:boost/redis/logger/level.adoc[`logger::level`] +cpp:logger::level[] -xref:reference:boost/redis/operation.adoc[`operation`] +cpp:operation[] -xref:reference:boost/redis/usage.adoc[`usage`] +cpp:usage[] | -xref:reference:boost/redis/ignore_t.adoc[`ignore_t`] +cpp:ignore_t[] -xref:reference:boost/redis/ignore.adoc[`ignore`] +cpp:ignore[] -xref:reference:boost/redis/request.adoc[`request`] +cpp:request[] -xref:reference:boost/redis/request/config.adoc[`request::config`] +cpp:request::config[] -xref:reference:boost/redis/response.adoc[`response`] +cpp:response[] -xref:reference:boost/redis/generic_response.adoc[`generic_response`] +cpp:generic_response[] -xref:reference:boost/redis/generic_flat_response.adoc[`generic_flat_response`] +cpp:generic_flat_response[] -xref:reference:boost/redis/consume_one-08.adoc[`consume_one`] +cpp:consume_one[] -xref:reference:boost/redis/push_view.adoc[`push_view`] +cpp:push_view[] -xref:reference:boost/redis/push_parser.adoc[`push_parser`] +cpp:push_parser[] | -xref:reference:boost/redis/adapter/boost_redis_adapt.adoc[`boost_redis_adapt`] +cpp:adapter::boost_redis_adapt[`boost_redis_adapt`] -xref:reference:boost/redis/adapter/ignore.adoc[`adapter::ignore`] +cpp:adapter::ignore[] -xref:reference:boost/redis/adapter/error.adoc[`adapter::error`] +cpp:adapter::error[] -xref:reference:boost/redis/adapter/result.adoc[`adapter::result`] +cpp:adapter::result[] -xref:reference:boost/redis/any_adapter.adoc[`any_adapter`] +cpp:any_adapter[] | -xref:reference:boost/redis/resp3/basic_node.adoc[`resp3::basic_node`] +cpp:resp3::basic_node[] -xref:reference:boost/redis/resp3/node.adoc[`resp3::node`] +cpp:resp3::node[] -xref:reference:boost/redis/resp3/node_view.adoc[`resp3::node_view`] +cpp:resp3::node_view[] -xref:reference:boost/redis/resp3/basic_tree.adoc[`resp3::basic_tree`] +cpp:resp3::basic_tree[] -xref:reference:boost/redis/resp3/tree.adoc[`resp3::tree`] +cpp:resp3::tree[] -xref:reference:boost/redis/resp3/view_tree.adoc[`resp3::view_tree`] +cpp:resp3::view_tree[] -xref:reference:boost/redis/resp3/flat_tree.adoc[`resp3::flat_tree`] +cpp:resp3::flat_tree[] -xref:reference:boost/redis/resp3/boost_redis_to_bulk-08.adoc[`boost_redis_to_bulk`] +cpp:resp3::boost_redis_to_bulk[`boost_redis_to_bulk`] -xref:reference:boost/redis/resp3/type.adoc[`resp3::type`] +cpp:resp3::type[] -xref:reference:boost/redis/resp3/is_aggregate.adoc[`resp3::is_aggregate`] +cpp:resp3::is_aggregate[] | -xref:reference:boost/redis/adapter/adapt2.adoc[`adapter::adapt2`] +cpp:adapter::adapt2[] -xref:reference:boost/redis/resp3/parser.adoc[`resp3::parser`] +cpp:resp3::parser[] -xref:reference:boost/redis/resp3/parse.adoc[`resp3::parse`] +cpp:resp3::parse[] |=== \ No newline at end of file diff --git a/doc/modules/ROOT/pages/requests_responses.adoc b/doc/modules/ROOT/pages/requests_responses.adoc index 69728b63..082ab7d5 100644 --- a/doc/modules/ROOT/pages/requests_responses.adoc +++ b/doc/modules/ROOT/pages/requests_responses.adoc @@ -36,8 +36,8 @@ req.push_range("HSET", "key", map); ---- Sending a request to Redis is performed by -xref:reference:boost/redis/basic_connection/async_exec-02.adoc[`connection::async_exec`] -as already stated. Requests accept a xref:reference:boost/redis/request/config.adoc[`boost::redis::request::config`] +cpp:basic_connection::async_exec[`connection::async_exec`] +as already stated. Requests accept a cpp:request::config[] object when constructed that dictates how requests are handled in situations like reconnection. The reader is advised to read it carefully. @@ -45,9 +45,9 @@ reconnection. The reader is advised to read it carefully. Boost.Redis uses the following strategy to deal with Redis responses: -* xref:reference:boost/redis/response.adoc[`boost::redis::response`] should be used +* cpp:response[] should be used when the request's number of commands is known at compile-time. -* xref:reference:boost/redis/generic_response.adoc[`boost::redis::generic_response`] should be +* cpp:generic_response[] should be used when the number of commands is dynamic. For example, the request below has three commands: @@ -74,7 +74,7 @@ It is also necessary that each tuple element is capable of storing the response to the command it refers to, otherwise an error will occur. To ignore responses to individual commands in the request use the tag -xref:reference:boost/redis/ignore_t.adoc[`boost::redis::ignore_t`]. For example: +cpp:ignore_t[]. For example: [source,cpp] ---- @@ -148,7 +148,7 @@ response< ---- To execute the request and read the response use -xref:reference:boost/redis/basic_connection/async_exec-02.adoc[`async_exec`]: +cpp:basic_connection::async_exec[`async_exec`]: [source,cpp] ---- @@ -156,7 +156,7 @@ co_await conn->async_exec(req, resp); ---- If the intention is to ignore responses altogether, use -xref:reference:boost/redis/ignore.adoc[`ignore`]: +cpp:ignore[]: [source,cpp] ---- @@ -254,7 +254,7 @@ commands won't fit in the model presented above. Some examples are: * RESP3 aggregates that contain nested aggregates can't be read in STL containers. * Transactions with a dynamic number of commands can't be read in a `response`. -To deal with these cases Boost.Redis provides the xref:reference:boost/redis/resp3/node.adoc[`boost::redis::resp3::node`] type +To deal with these cases Boost.Redis provides the cpp:resp3::node[] type abstraction, that is the most general form of an element in a response, be it a simple RESP3 type or the element of an aggregate. It is defined like: @@ -277,9 +277,8 @@ struct basic_node { }; ---- -Any response to a Redis command can be parsed into a -xref:reference:boost/redis/generic_response.adoc[boost::redis::generic_response] -and its counterpart xref:reference:boost/redis/generic_flat_response.adoc[boost::redis::generic_flat_response]. +Any response to a Redis command can be parsed into a cpp:generic_response[] +and its counterpart cpp:generic_flat_response[]. The vector can be seen as a pre-order view of the response tree. Using it is not different than using other types: diff --git a/doc/modules/ROOT/pages/sentinel.adoc b/doc/modules/ROOT/pages/sentinel.adoc index bd03faff..c09db4f4 100644 --- a/doc/modules/ROOT/pages/sentinel.adoc +++ b/doc/modules/ROOT/pages/sentinel.adoc @@ -9,10 +9,10 @@ = Sentinel Boost.Redis supports Redis Sentinel deployments. Sentinel handling -in `connection` is built-in: xref:reference:boost/redis/basic_connection/async_run-04.adoc[`async_run`] +in `connection` is built-in: cpp:basic_connection::async_run[`async_run`] automatically connects to Sentinels, resolves the master's address, and connects to the master. -Configuration is done using xref:reference:boost/redis/sentinel_config.adoc[`config::sentinel`]: +Configuration is done using cpp:sentinel_config[`config::sentinel`]: [source,cpp] ---- @@ -39,7 +39,7 @@ for a full program. By default, the library connects to the Redis master. You can connect to one of its replicas by using -xref:reference:boost/redis/sentinel_config/server_role.adoc[`config::sentinel::server_role`]. +cpp:sentinel_config::server_role[`config::sentinel::server_role`]. This can be used to balance load, if all your commands read data from the server and never write to it. The particular replica will be chosen randomly. @@ -63,7 +63,7 @@ cfg.sentinel.server_role = role::replica; == Sentinel authentication If your Sentinels require authentication, -you can use xref:reference:boost/redis/sentinel_config/setup.adoc[`config::sentinel::setup`] +you can use cpp:sentinel_config::setup[`config::sentinel::setup`] to provide credentials. This request is executed immediately after connecting to Sentinels, and before any other command: @@ -94,8 +94,8 @@ cfg.setup.push("HELLO", 3, "AUTH", "master_user", "master_password"); == Using TLS with Sentinels You might use TLS with Sentinels only, masters/replicas only, or both by adjusting -xref:reference:boost/redis/sentinel_config/use_ssl.adoc[`config::sentinel::use_ssl`] -and xref:reference:boost/redis/config/use_ssl.adoc[`config::use_ssl`]: +cpp:sentinel_config::use_ssl[`config::sentinel::use_ssl`] +and cpp:config::use_ssl[]: [source,cpp] ---- @@ -121,7 +121,7 @@ https://redis.io/docs/latest/develop/reference/sentinel-clients/[the official Se Some of these details may vary between library versions. * Connections maintain an internal list of Sentinels, bootstrapped from - xref:reference:boost/redis/sentinel_config/addresses.adoc[`config::sentinel::addresses`]. + cpp:sentinel_config::addresses[`config::sentinel::addresses`]. * The first Sentinel in the list is contacted by performing the following: ** A physical connection is established. ** The setup request is executed.