line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
9
|
|
|
9
|
|
64
|
use utf8; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
61
|
|
2
|
|
|
|
|
|
|
package Net::Etcd::Member; |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
372
|
use strict; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
201
|
|
5
|
9
|
|
|
9
|
|
48
|
use warnings; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
239
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=encoding utf8 |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
9
|
|
|
9
|
|
48
|
use Moo; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
48
|
|
12
|
9
|
|
|
9
|
|
3251
|
use Types::Standard qw(Str); |
|
9
|
|
|
|
|
22
|
|
|
9
|
|
|
|
|
74
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'Net::Etcd::Role::Actions'; |
15
|
9
|
|
|
9
|
|
5319
|
use namespace::clean; |
|
9
|
|
|
|
|
25
|
|
|
9
|
|
|
|
|
62
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Net::Etcd::Maintenance |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '0.021'; |
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; |