mirror of
https://github.com/boostorg/redis.git
synced 2026-01-19 16:52:08 +00:00
0381ef605bf8be4e458d5fa17618fb6f67ab4113
Aedis
Aedis is a redis client designed for scalability and performance while providing an easy and intuitive interface.
Example
Lets us see some examples with increasing order of complexity.
See the examples directory for more examples.
Ping
A very simple example with illustrative purposes. The example above
will start writing the hello command and proceed reading its
response. After that users can add further commands to the queue. See
the example directory for a complete example.
net::awaitable<void> ping2()
{
auto socket = co_await make_connection();
resp3::stream<tcp_socket> stream{std::move(socket)};
resp3::request req;
req.push(command::hello, 3);
req.push(command::ping);
req.push(command::quit);
co_await stream.async_write(req);
while (!std::empty(req.commands)) {
resp3::response resp;
co_await stream.async_read(resp);
req.commands.pop();
std::cout << resp << std::endl;
}
}
Installation
This library is header only. To install it run
$ sudo make install
or copy the include folder to where you want. You will also need to include
the following header in one of your source files e.g. aedis.cpp
#include <aedis/impl/src.hpp>
Description
Languages
C++
95.9%
Python
1.5%
CMake
1.2%
Java
0.3%
Rust
0.3%
Other
0.7%