-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from hexfusion/maint
Bump version for release.
- Loading branch information
Showing
22 changed files
with
350 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
Revision history for Net::Etcd | ||
0.010 | ||
[ ENHANCEMENTS ] | ||
* Add intial support for snapshot | ||
|
||
0.009 | ||
[ ENHANCEMENTS ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ Net::Etcd::Auth | |
=cut | ||
|
||
our $VERSION = '0.009'; | ||
our $VERSION = '0.010'; | ||
|
||
=head1 DESCRIPTION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ Net::Etcd::Auth::Role | |
=cut | ||
|
||
our $VERSION = '0.009'; | ||
our $VERSION = '0.010'; | ||
|
||
=head1 DESCRIPTION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ Net::Etcd::Config | |
=cut | ||
|
||
our $VERSION = '0.009'; | ||
our $VERSION = '0.010'; | ||
|
||
=head1 ACCESSORS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
use utf8; | ||
package Net::Etcd::KV::Compare; | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Moo; | ||
use Types::Standard qw(Str Int Bool HashRef ArrayRef); | ||
use MIME::Base64; | ||
use Data::Dumper; | ||
use JSON; | ||
|
||
with 'Net::Etcd::Role::Actions'; | ||
|
||
use namespace::clean; | ||
|
||
=head1 NAME | ||
Net::Etcd::KV::Compare | ||
=cut | ||
|
||
our $VERSION = '0.009'; | ||
|
||
=head1 DESCRIPTION | ||
Op | ||
=head1 ACCESSORS | ||
=head2 result | ||
result is logical comparison operation for this comparison. | ||
=cut | ||
|
||
has result => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 target | ||
target is the key-value field to inspect for the comparison. | ||
=cut | ||
|
||
has target => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 key | ||
key is the subject key for the comparison operation. | ||
=cut | ||
|
||
has key => ( | ||
is => 'ro', | ||
coerce => sub { return encode_base64( $_[0], '' ) }, | ||
); | ||
|
||
|
||
=head2 version | ||
version is the version of the given key | ||
=cut | ||
|
||
has version => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 create_revision | ||
create_revision is the creation revision of the given key | ||
=cut | ||
|
||
has create_revision => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 mod_revision | ||
mod_revision is the last modified revision of the given key. | ||
=cut | ||
|
||
has mod_revision => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 value | ||
value is the value of the given key, in bytes. | ||
=cut | ||
|
||
has value => ( | ||
is => 'ro', | ||
); | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
use utf8; | ||
package Net::Etcd::KV::Op; | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Moo; | ||
use Types::Standard qw(InstanceOf Str Int Bool HashRef ArrayRef); | ||
use MIME::Base64; | ||
use Data::Dumper; | ||
use JSON; | ||
|
||
with 'Net::Etcd::Role::Actions'; | ||
|
||
use namespace::clean; | ||
|
||
=head1 NAME | ||
Net::Etcd::KV::Op | ||
=cut | ||
|
||
our $VERSION = '0.010'; | ||
|
||
=head1 DESCRIPTION | ||
Op | ||
=head1 ACCESSORS | ||
=head2 request_range | ||
=cut | ||
|
||
has request_range => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 request_put | ||
=cut | ||
|
||
has request_put => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 request_delete_range | ||
=cut | ||
|
||
has request_delete_range => ( | ||
is => 'ro', | ||
); | ||
|
||
=head2 create | ||
create op | ||
=cut | ||
|
||
sub create { | ||
my $self = shift; | ||
my @op; | ||
my $put = $self->request_put; | ||
my $range = $self->request_range; | ||
my $delete_range = $self->request_delete_range; | ||
push @op, '{"RequestPut":' . $put->json_args . '}' if defined $put; | ||
push @op, '{"RequestRange":' . $range->json_args . '}' if defined $range; | ||
push @op, '{"RequestDeleteRange":' . $delete_range->json_args . '}' if defined $delete_range; | ||
return @op; | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ Net::Etcd::Put | |
=cut | ||
|
||
our $VERSION = '0.009'; | ||
our $VERSION = '0.010'; | ||
|
||
=head1 DESCRIPTION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ Net::Etcd::Range | |
=cut | ||
|
||
our $VERSION = '0.009'; | ||
our $VERSION = '0.010'; | ||
|
||
=head1 DESCRIPTION | ||
|
Oops, something went wrong.