| 1 | 9 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | package Net::Etcd::Member; | ||||||||||
| 3 | |||||||||||
| 4 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | =encoding utf8 | ||||||||||
| 8 | |||||||||||
| 9 | =cut | ||||||||||
| 10 | |||||||||||
| 11 | 9 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 9 | ▶ | use Types::Standard qw(Str); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 9 | with 'Net::Etcd::Role::Actions'; | |||||||||
| 15 | 9 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | |||||||||||
| 17 | =head1 NAME | ||||||||||
| 18 | |||||||||||
| 19 | Net::Etcd::Maintenance | ||||||||||
| 20 | |||||||||||
| 21 | =cut | ||||||||||
| 22 | |||||||||||
| 23 | 9 | 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 | 9 | 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 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 55 | 0 | my ( $self, $options ) = @_; | |||||||||
| 56 | 0 | ▶ | my $cb = pop if ref $_[-1] eq 'CODE'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | 0 | $self->{endpoint} = '/cluster/member/list'; | |||||||||
| 58 | 0 | $self->{json_args} = '{}'; | |||||||||
| 59 | 0 | $self->request; | |||||||||
| 60 | 0 | return $self; | |||||||||
| 61 | } | ||||||||||
| 62 | |||||||||||
| 63 | 9 | 1; | |||||||||