line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
9
|
|
|
9
|
|
54
|
use utf8; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
48
|
|
2
|
|
|
|
|
|
|
package Net::Etcd::Member; |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
325
|
use strict; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
155
|
|
5
|
9
|
|
|
9
|
|
45
|
use warnings; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
196
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=encoding utf8 |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
9
|
|
|
9
|
|
37
|
use Moo; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
43
|
|
12
|
9
|
|
|
9
|
|
2743
|
use Types::Standard qw(Str); |
|
9
|
|
|
|
|
24
|
|
|
9
|
|
|
|
|
54
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'Net::Etcd::Role::Actions'; |
15
|
9
|
|
|
9
|
|
4719
|
use namespace::clean; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
48
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Net::Etcd::Maintenance |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '0.020'; |
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# list members |
27
|
|
|
|
|
|
|
$defrag = $etcd->member()->list; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Provides support for cluster member related actions. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 ACCESSORS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 endpoint |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has endpoint => ( |
42
|
|
|
|
|
|
|
is => 'rwp', |
43
|
|
|
|
|
|
|
isa => Str, |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 PUBLIC METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 list |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
lists all the members in the cluster. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub list { |
55
|
0
|
|
|
0
|
1
|
|
my ( $self, $options ) = @_; |
56
|
0
|
0
|
|
|
|
|
my $cb = pop if ref $_[-1] eq 'CODE'; |
57
|
0
|
|
|
|
|
|
$self->{endpoint} = '/cluster/member/list'; |
58
|
0
|
|
|
|
|
|
$self->{json_args} = '{}'; |
59
|
0
|
|
|
|
|
|
$self->request; |
60
|
0
|
|
|
|
|
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |