.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Redis::Fast::Sentinel 3pm" .TH Redis::Fast::Sentinel 3pm 2024-03-24 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME .Vb 1 \& Redis::Fast::Sentinel \- connect to a Sentinel instance .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& my $sentinel = Redis::Fast::Sentinel\->new( ... ); \& my $service_address = $sentinel\->get_service_address(\*(Aqmymaster\*(Aq); \& my @masters = $sentinel\->get_masters; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This is a subclass of the Redis::Fast module, specialized into connecting to a Sentinel instance. Inherits from the \f(CW\*(C`Redis::Fast\*(C'\fR package; .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" .SS new .IX Subsection "new" See \f(CW\*(C`new\*(C'\fR in Redis::Fast. All parameters are supported, except \f(CW\*(C`sentinels\*(C'\fR and \f(CW\*(C`service\*(C'\fR, which are silently ignored. .SH METHODS .IX Header "METHODS" All the methods of the \f(CW\*(C`Redis::Fast\*(C'\fR package are supported, plus the additional following methods: .SS get_service_address .IX Subsection "get_service_address" Takes the name of a service as parameter, and returns either void (empty 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 \f(CW"$ip:$port"\fR if the service were found. .SS get_masters .IX Subsection "get_masters" Returns a list of HashRefs representing all the master redis instances that this sentinel monitors.