7#include <boost/redis/config.hpp>
8#include <boost/redis/connection.hpp>
10#include <boost/asio/co_spawn.hpp>
11#include <boost/asio/io_context.hpp>
12#include <boost/asio/use_awaitable.hpp>
16namespace asio = boost::asio;
20#if defined(BOOST_ASIO_HAS_CO_AWAIT)
22extern asio::awaitable<void> co_main(
config);
24auto main(
int argc,
char* argv[]) ->
int
35 asio::co_spawn(ioc, co_main(cfg), [](std::exception_ptr p) {
37 std::rethrow_exception(p);
41 }
catch (std::exception
const& e) {
42 std::cerr <<
"(main) " << e.what() << std::endl;
51 std::cout <<
"Requires coroutine support." << std::endl;
address addr
Address of the Redis server.
std::string port
Redis port.
std::string host
Redis host.
Configure parameters used by the connection classes.
Defines logging configuration.