Redis::Sentinel(3pm)

Redis::Sentinel3pm

Redis sentinel interface

Usage

    my $sentinel = Redis::Sentinel->new( ... );
    my $service_address = $sentinel->get_service_address('mymaster');
    my @masters = $sentinel->get_masters;

Version

version 2.000

Overview

This is a subclass of the Redis module, specialized into connecting to a Sentinel instance. Inherits from the "Redis" package;

Constructor

new

See "new" in Redis.pm. All parameters are supported, except "sentinels" and "service", which are silently ignored.

Methods

All the methods of the "Redis" package are supported, plus the additional following methods:

get_service_address

Takes the name of a service as parameter, and returns either void (emptly list) if the master couldn't be found, the string 'IDONTKNOW' if the service is in the sentinel config but cannot be reached, or the string "$ip:$port" if the service were found.

get_masters

Returns a list of HashRefs representing all the master redis instances that this sentinel monitors.

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12–13

Authors

•

Pedro Melo <[email protected]>

•

Damien Krotkine <[email protected]>

From libredis-perl 2:2.000-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.