Skip to content

Commit

Permalink
Merge pull request #156 from boostorg/prepare_for_first_boost_release
Browse files Browse the repository at this point in the history
Prepare for first boost release
  • Loading branch information
mzimbres authored Oct 7, 2023
2 parents 11c9c1b + 548e3d4 commit ff73469
Show file tree
Hide file tree
Showing 41 changed files with 52 additions and 50 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

Boost.Redis is a high-level [Redis](https://redis.io/) client library built on top of
[Boost.Asio](https://www.boost.org/doc/libs/release/doc/html/boost_asio.html)
that implements Redis plain text protocol
that implements the Redis protocol
[RESP3](https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md).
It can multiplex any number of client
requests, responses, and server pushes onto a single active socket
connection to the Redis server. The requirements for using Boost.Redis are:
The requirements for using Boost.Redis are:

* Boost. The library is included in Boost distributions starting with 1.84.
* C++17 or higher.
Expand Down Expand Up @@ -82,8 +80,9 @@ them are
* [Client-side caching](https://redis.io/docs/manual/client-side-caching/)
The connection class supports server pushes by means of the
`boost::redis::connection::async_receive` function, the coroutine shows how
to used it
`boost::redis::connection::async_receive` function, which can be
called in the same connection that is being used to execute commands.
The coroutine below shows how to used it
```cpp
auto
Expand All @@ -92,14 +91,17 @@ receiver(std::shared_ptr<connection> conn) -> net::awaitable<void>
request req;
req.push("SUBSCRIBE", "channel");
generic_response resp;
conn->set_receive_response(resp);
// Loop while reconnection is enabled
while (conn->will_reconnect()) {
// Reconnect to channels.
co_await conn->async_exec(req, ignore, net::deferred);
// Loop reading Redis pushes.
for (generic_response resp;;) {
for (;;) {
error_code ec;
co_await conn->async_receive(resp, net::redirect_error(net::use_awaitable, ec));
if (ec)
Expand All @@ -108,7 +110,7 @@ receiver(std::shared_ptr<connection> conn) -> net::awaitable<void>
// Use the response resp in some way and then clear it.
...
resp.value().clear();
consume_one(resp);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/sync_connection.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/adapter/adapt.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/adapter/detail/adapters.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/adapter/detail/response_traits.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/adapter/detail/result_traits.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/adapter/ignore.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/adapter/result.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/config.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/connection.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/connection_base.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/connector.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/handshaker.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/health_checker.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/helper.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/resolver.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/runner.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/detail/write.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/error.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/ignore.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/impl/connection.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/impl/error.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/impl/ignore.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/impl/logger.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/impl/request.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/impl/response.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/logger.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/operation.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/request.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/impl/parser.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/impl/serialization.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/impl/type.ipp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/node.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/parser.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/serialization.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/resp3/type.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/response.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/src.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/redis/usage.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022 Marcelo Zimbres Silva ([email protected])
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected])
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE.txt)
Expand Down
6 changes: 3 additions & 3 deletions meta/libraries.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"key": "redis",
"name": "Redis",
"authors": [
"Marcelo Zimbres"
"Marcelo Zimbres Silva"
],
"description": "Redis async client library built on top of Boost.Asio.",
"category": [
"Concurrent",
"IO"
],
"maintainers": [
"Marcelo Zimbres <[email protected]>"
"Marcelo Zimbres Silva <[email protected]>"
],
"cxxstd": "17"
}
}

0 comments on commit ff73469

Please sign in to comment.