line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
9
|
|
|
9
|
|
46
|
use utf8; |
|
9
|
|
|
|
|
14
|
|
|
9
|
|
|
|
|
40
|
|
2
|
|
|
|
|
|
|
package Net::Etcd::Member; |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
274
|
use strict; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
133
|
|
5
|
9
|
|
|
9
|
|
29
|
use warnings; |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
162
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=encoding utf8 |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
9
|
|
|
9
|
|
33
|
use Moo; |
|
9
|
|
|
|
|
12
|
|
|
9
|
|
|
|
|
38
|
|
12
|
9
|
|
|
9
|
|
2297
|
use Types::Standard qw(Str); |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
46
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'Net::Etcd::Role::Actions'; |
15
|
9
|
|
|
9
|
|
3802
|
use namespace::clean; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
42
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Net::Etcd::Maintenance |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '0.022'; |
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# list members |
27
|
|
|
|
|
|
|
$members = $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; |