GithubHelp home page GithubHelp logo

wangtengchuan / cpp_redis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cylix/cpp_redis

0.0 0.0 0.0 2.04 MB

C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform - NO LONGER MAINTAINED - Please check https://github.com/cpp-redis/cpp_redis

License: MIT License

Shell 0.04% C++ 96.77% Python 1.18% CMake 2.01%

cpp_redis's Introduction

Important

Please be advised that this library is no longer maintained.

For new updates, please refer to the following fork https://github.com/cpp-redis/cpp_redis

I have maintained this library for over 3 years, but I do not have enough time to provide a reliable support and continuous development for any longer.

Any existing or new issues will not be treated and I do not guarantee to merge any new pull request.

If anyone is willing to take over this project, feel free to fork this project and message me to add a link to your fork in this README.

cpp_redis Build Status Build status

cpp_redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations, pipelining, sentinels and high availability.

Requirement

cpp_redis has no dependency. Its only requirement is C++11.

It comes with no network module, so you are free to configure your own, or to use the default one (tacopie)

Example

cpp_redis::client

cpp_redis::client client;

client.connect();

client.set("hello", "42");
client.get("hello", [](cpp_redis::reply& reply) {
  std::cout << reply << std::endl;
});
//! also support std::future
//! std::future<cpp_redis::reply> get_reply = client.get("hello");

client.sync_commit();
//! or client.commit(); for asynchronous call

cpp_redis::client full documentation and detailed example. More about cpp_redis::reply.

cpp_redis::subscriber

cpp_redis::subscriber sub;

sub.connect();

sub.subscribe("some_chan", [](const std::string& chan, const std::string& msg) {
  std::cout << "MESSAGE " << chan << ": " << msg << std::endl;
});
sub.psubscribe("*", [](const std::string& chan, const std::string& msg) {
  std::cout << "PMESSAGE " << chan << ": " << msg << std::endl;
});

sub.commit();

cpp_redis::subscriber full documentation and detailed example.

Wiki

A Wiki is available and provides full documentation for the library as well as installation explanations.

Doxygen

A Doxygen documentation is available and provides full API documentation for the library.

License

cpp_redis is under MIT License.

Contributing

Please refer to CONTRIBUTING.md.

Special Thanks

Mike Moening for his unexpected and incredible great work aiming to port cpp_redis on Windows, provides sentinel support and high availability support!

Author

Simon Ninon

cpp_redis's People

Contributors

cylix avatar mikesaracade avatar steple avatar aardvarkk avatar wujunjenny avatar zodiac403 avatar whoshuu avatar m-harnish avatar navossoc avatar panaali avatar turanic avatar cmorse avatar nerdneilsfield avatar fpagliughi avatar konijnendijk avatar yiurule avatar knowledge4igor avatar krojew avatar lucasterra avatar mugglewei avatar thedrow avatar pfultz2 avatar ppietrasa avatar rfortunatov avatar thequantumphysicist avatar tobbe303 avatar cblauvelt avatar costypetrisor avatar fengzhuye avatar njwhite avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.