Skip to content

Commit

Permalink
Bump version to 1.6.0 and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiderkwast committed Jul 11, 2022
1 parent 63a4af9 commit 483505d
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 17 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# CHANGELOG

## v1.6.0

July 2022.

* Adds sentinel support.

* Obfuscates username and password in the state, to prevent them from appearing
verbatim in logs and stack traces. They can be provided as 0-ary functions
returning the actual secret when applied.

* Fix a crash that happens when reconnect fails twice with two different
reasons. This bug was introduced in v1.5.0.

## v1.5.1

May 2022.
Expand All @@ -13,7 +26,7 @@ May 2022.
The option `reconnect_sleep` now applies to the time between a
successful connect and the first reconnect attemt, if the connection is lost
just after connecting. However, there is no delay before reconnecting
if the connection has been up for at least `reconnect_sleep' milliseconds.
if the connection has been up for at least `reconnect_sleep` milliseconds.

## v1.5.0

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Non-blocking Redis client with focus on performance and robustness.

This fork is the official continuation of `wooga/eredis`.
It includes several improvements, such as
TLS support and TCP error handling corrections. See [CHANGELOG.md](CHANGELOG.md)
for details.
TLS support, Sentinel support and TCP error handling corrections.
See [CHANGELOG.md](CHANGELOG.md) for details.

Note: This client connects to a standalone Redis node/sentinel cluster.
Note: This client connects to a standalone Redis node, optionally using Sentinel.
For *Redis Cluster*, you need
[eredis_cluster](https://github.com/Nordix/eredis_cluster) or
[ecredis](https://github.com/HalloAppInc/ecredis).
Expand All @@ -23,6 +23,7 @@ Supported Redis features:
* Pipelining
* Authentication & multiple DBs
* Pubsub
* TLS
* Sentinel support

Generated API documentation: [doc/eredis.md](doc/eredis.md)
Expand Down
12 changes: 9 additions & 3 deletions doc/eredis.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ host() = string() | {local, string()}


<pre><code>
option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {password, string()} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} | {sentinel, list()}
option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {username, iodata() | fun(() -&gt; iodata()) | undefined} | {password, iodata() | fun(() -&gt; iodata()) | undefined} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} | {sentinel, list()}
</code>
</pre>

Expand Down Expand Up @@ -278,7 +278,10 @@ start_link(Options::<a href="#type-options">options()</a>) -&gt; {ok, pid()} | {



<dd>String; default: no username
<dd>A 0-ary function that returns the username
(the preferred way to provide username as it prevents the actual secret from
appearing in logs and stacktraces), a string or iodata or the
atom <code>undefined</code> for no username; default <code>undefined</code>
</dd>


Expand All @@ -287,7 +290,10 @@ start_link(Options::<a href="#type-options">options()</a>) -&gt; {ok, pid()} | {



<dd>String; default: no password
<dd>A 0-ary function that returns the password
(the preferred way to provide password as it prevents the actual secret from
appearing in logs and stacktraces), a string or iodata or the
atom <code>undefined</code> for no username; default <code>undefined</code>
</dd>


Expand Down
10 changes: 7 additions & 3 deletions doc/eredis_sub.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ channel() = binary()


<pre><code>
option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {password, string()} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} | {sentinel, list()}
option() = {host, string() | {local, string()}} | {port, <a href="inet.md#type-port_number">inet:port_number()</a>} | {database, integer()} | {username, iodata() | fun(() -&gt; iodata()) | undefined} | {password, iodata() | fun(() -&gt; iodata()) | undefined} | {reconnect_sleep, <a href="#type-reconnect_sleep">reconnect_sleep()</a>} | {connect_timeout, integer()} | {socket_options, list()} | {tls, [<a href="ssl.md#type-tls_client_option">ssl:tls_client_option()</a>]} | {name, <a href="#type-registered_name">registered_name()</a>} | {sentinel, list()}
</code>
</pre>

Expand Down Expand Up @@ -259,7 +259,9 @@ start_link(Options::<a href="#type-sub_options">sub_options()</a>) -&gt; {ok, Pi



<dd>String; default: no username
<dd>A 0-ary function that returns the username
(the preferred way to provide username as it prevents the actual secret from
appearing in logs and stacktraces), a string or iodata or the atom<code>undefined</code> for no username; default <code>undefined</code>
</dd>


Expand All @@ -268,7 +270,9 @@ start_link(Options::<a href="#type-sub_options">sub_options()</a>) -&gt; {ok, Pi



<dd>String; default: no password
<dd>A 0-ary function that returns the password
(the preferred way to provide password as it prevents the actual secret from
appearing in logs and stacktraces), a string or iodata or the atom<code>undefined</code> for no username; default <code>undefined</code>
</dd>


Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Eredis.Mixfile do
use Mix.Project

@source_url "https://github.com/Nordix/eredis/"
@version "1.5.1"
@version "1.6.0"

def project do
[
Expand Down
4 changes: 2 additions & 2 deletions src/eredis.app.src
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{application,eredis,
[{description,"Erlang Redis Client"},
{vsn,"1.5.1"},
{vsn,"1.6.0"},
{modules,[eredis,eredis_client,eredis_parser,eredis_sub,
eredis_sub_client]},
eredis_sub_client, eredis_sentinel]},
{registered,[]},
{applications,[kernel,stdlib]},
{maintainers,["Bjorn Svensson", "Viktor Soderqvist"]},
Expand Down
8 changes: 4 additions & 4 deletions src/eredis.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ start_link() ->
%% <dt>`{database, Database}'</dt><dd>Integer; 0 for the default database</dd>
%% <dt>`{username, Username}'</dt><dd>A 0-ary function that returns the username
%% (the preferred way to provide username as it prevents the actual secret from
%% appearing in logs and stacktraces), a string or iodata or the atom
%% `undefined' for no username; default `undefined'</dd>
%% appearing in logs and stacktraces), a string or iodata or the
%% atom `undefined' for no username; default `undefined'</dd>
%% <dt>`{password, Password}'</dt><dd>A 0-ary function that returns the password
%% (the preferred way to provide password as it prevents the actual secret from
%% appearing in logs and stacktraces), a string or iodata or the atom
%% `undefined' for no username; default `undefined'</dd>
%% appearing in logs and stacktraces), a string or iodata or the
%% atom `undefined' for no username; default `undefined'</dd>
%% <dt>`{reconnect_sleep, ReconnectSleep}'</dt><dd>Integer of milliseconds to
%% sleep between reconnect attempts; default: 100</dd>
%% <dt>`{connect_timeout, Timeout}'</dt><dd>Timeout value in milliseconds to use
Expand Down

0 comments on commit 483505d

Please sign in to comment.