volkerp / qredisclient

:key: Asynchronous Qt-based Redis client with TLS support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qredisclient

API documenation | Examples

Build Status Build status Coverage Status

Asynchronous Qt-based Redis client with TLS support. This client is developed for RedisDesktopManager by Igor Malinovskiy

#include "qredisclient/redisclient.h"

int main(int argc, char *argv[])
{
  // Init qredisclient
  initRedisClient();

  // Create connection to local redis
  RedisClient::ConnectionConfig config("127.0.0.1");
  RedisClient::Connection connection(config);

  // Run command and wait for result
  connection.commandSync({"PING"});

  // Run command in async mode
  connection.command({"PING"});

  // Run command in db #2
  connection.command({"PING"}, 2);

  // Run async command with callback
  connection.command({"PING"}, [](RedisClient::Response r) {
    QVariant val = r.getValue(); // get value from response
    // do stuff
  });

  // See more usage examples in examples folder
}

Supported Qt versions: 5.6-5.9

Installation

Pull in third party git submodules

git submodule update --init --recursive

Install static library and include files in /usr/local

qmake
make install

To choose a different install location

qmake PREFIX=<path>

Specific locations for static library and include files

qmake LIB_DIR=<path> INCLUDE_DIR=<path

About

:key: Asynchronous Qt-based Redis client with TLS support.

License:Other


Languages

Language:C++ 94.9%Language:QMake 2.1%Language:Shell 1.0%Language:Python 0.8%Language:Lua 0.8%Language:C 0.5%