2
0
mirror of https://github.com/boostorg/redis.git synced 2026-01-19 16:52:08 +00:00
2022-01-18 03:20:33 +01:00
2022-01-13 03:07:53 +01:00
2021-06-19 18:37:22 +02:00
2022-01-17 00:50:37 +01:00
2022-01-17 00:50:37 +01:00
2022-01-14 03:34:05 +01:00
2022-01-14 03:34:05 +01:00
2019-11-19 22:19:03 +01:00
2022-01-17 00:50:37 +01:00
2022-01-10 23:55:57 +01:00

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
Mirrored via gitea-mirror
Readme 6.4 MiB
Languages
C++ 95.9%
Python 1.5%
CMake 1.2%
Java 0.3%
Rust 0.3%
Other 0.7%