1Redis::Sentinel(3pm)  User Contributed Perl Documentation Redis::Sentinel(3pm)
2
3
4

NAME

6       Redis::Sentinel - Redis Sentinel interface
7

VERSION

9       version 1.998
10

SYNOPSIS

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

DESCRIPTION

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

CONSTRUCTOR

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

METHODS

26       All the methods of the "Redis" package are supported, plus the
27       additional following methods:
28
29   get_service_address
30       Takes the name of a service as parameter, and returns either void
31       (emptly list) if the master couldn't be found, the string 'IDONTKNOW'
32       if the service is in the sentinel config but cannot be reached, or the
33       string "$ip:$port" if the service were found.
34
35   get_masters
36       Returns a list of HashRefs representing all the master redis instances
37       that this sentinel monitors.
38

AUTHORS

40       ·   Pedro Melo <melo@cpan.org>
41
42       ·   Damien Krotkine <dams@cpan.org>
43
45       This software is Copyright (c) 2015 by Pedro Melo, Damien Krotkine.
46
47       This is free software, licensed under:
48
49         The Artistic License 2.0 (GPL Compatible)
50
51
52
53perl v5.32.0                      2020-08-18              Redis::Sentinel(3pm)
Impressum