From fd25e304cfcbfff007f7aa34b9dbcc19cda32d40 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Mon, 7 Dec 2020 17:06:23 +0100 Subject: [PATCH] Release 0.5.0 --- CHANGELOG.md | 14 ++++++++++++++ COPYING | 3 +++ README.md | 30 ++++++++++++++++++++++++------ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd18d5..501769e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +### 0.5.0 - Dec 07, 2020 + +* Renamed to [hiredis-cluster](https://github.com/Nordix/hiredis-cluster) +* The C library `hiredis` is an external dependency rather than a builtin part + of the cluster client, meaning that `hiredis` v1.0.0 or later can be used. +* Support for SSL/TLS introduced in Redis 6 +* Support for IPv6 +* Support authentication using AUTH +* Handle variable number of keys in command EXISTS +* Improved CMake build +* Code style guide (using clang-format) +* Improved testing +* Memory leak corrections and allocation failure handling + ### 0.4.0 - Jan 24, 2019 * Updated underlying hiredis version to 0.14.0 diff --git a/COPYING b/COPYING index a5fc973..31f7c63 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,8 @@ Copyright (c) 2009-2011, Salvatore Sanfilippo Copyright (c) 2010-2011, Pieter Noordhuis +Copyright (c) 2020, Nick +Copyright (c) 2020, Bjorn Svensson +Copyright (c) 2020, Viktor Söderqvist All rights reserved. diff --git a/README.md b/README.md index 5f6fe84..dfb7414 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Hiredis-cluster is a fork of Hiredis-vip, with the following improvements: of the cluster client, meaning that the latest `hiredis` can be used. * Support for SSL/TLS introduced in Redis 6 * Support for IPv6 +* Support authentication using AUTH * Using CMake as build system * Code style guide (using clang-format) * Improved testing @@ -306,13 +307,30 @@ callbacks have been executed. After this, the disconnection callback is executed There are a few hooks that need to be set on the cluster context object after it is created. See the `adapters/` directory for bindings to *ae* and *libevent*. -## AUTHORS +### Allocator injection -This fork is based on the heronr fork (https://github.com/heronr/hiredis-vip) -and uses hiredis (https://github.com/redis/hiredis). +Hiredis-cluster uses hiredis allocation structure with configurable allocation and deallocation functions. By default they just point to libc (`malloc`, `calloc`, `realloc`, etc). -Hiredis-vip was originally created by vipshop (https://github.com/vipshop/hiredis-vip). +#### Overriding -The Redis Cluster client library part in hiredis-vip was written by deep (https://github.com/deep011). +If you have your own allocator or if you expect an abort in out-of-memory cases, +you can configure the used functions in the following way: -Hiredis-vip is released under the BSD license. +```c +hiredisAllocFuncs myfuncs = { + .mallocFn = my_malloc, + .callocFn = my_calloc, + .reallocFn = my_realloc, + .strdupFn = my_strdup, + .freeFn = my_free, +}; + +// Override allocators (function returns current allocators if needed) +hiredisAllocFuncs orig = hiredisSetAllocators(&myfuncs); +``` + +To reset the allocators to their default libc functions simply call: + +```c +hiredisResetAllocators(); +```