Net-Etcd
view release on metacpan or search on metacpan
* Updated travis tests to use etcd v3.3.3
[ BREAKING ]
* Default value for api_version is now /v3beta.
[ ANNOUNCEMENT ]
* Default value for api_version will change to /v3 on the release of etcd v3.4
0.019
[ BUG FIX ]
* Resolved issue where chunked data was not properly handled in non streaming calls and would truncate data when buffer was full. Fixed By GH #40 - Thanks Ananth Kavuri (foobargeez)
0.018
[ ENHANCEMENTS ]
* Added Member class and tests.
* Added ENV defaults for name 'ETCD_CLIENT_USERNAME', password 'ETCD_CLIENT_PASSWORD' and cacert 'ETCD_CERT_FILE' accessors.
* Updated TLS example.
0.017
[ ENHANCEMENTS ]
* Add TLS support
# get range of keys
$range = $etcd->range({ key =>'test0', range_end => 'test100' });
# return array { key => value } pairs from range request.
my @users = $range->all
# delete single key
$etcd->deleterange({ key => 'test0' });
# watch key range, streaming.
$watch = $etcd->watch( { key => 'foo', range_end => 'fop'}, sub {
my ($result) = @_;
print STDERR Dumper($result);
})->create;
# create/grant 20 second lease
$etcd->lease( { ID => 7587821338341002662, TTL => 20 } )->grant;
# attach lease to put
$etcd->put( { key => 'foo2', value => 'bar2', lease => 7587821338341002662 } );
# get range of keys
$range = $etcd->range({ key =>'test0', range_end => 'test100' });
# return array { key => value } pairs from range request.
my @users = $range->all
# delete single key
$etcd->deleterange({ key => 'test0' });
# watch key range, streaming.
$watch = $etcd->watch( { key => 'foo', range_end => 'fop'}, sub {
my ($result) = @_;
print STDERR Dumper($result);
})->create;
# create/grant 20 second lease
$etcd->lease( { ID => 7587821338341002662, TTL => 20 } )->grant;
# attach lease to put
$etcd->put( { key => 'foo2', value => 'bar2', lease => 7587821338341002662 } );
lib/Net/Etcd.pm view on Meta::CPAN
# get range of keys
$range = $etcd->range({ key =>'test0', range_end => 'test100' });
# return array { key => value } pairs from range request.
my @users = $range->all
# delete single key
$etcd->deleterange({ key => 'test0' });
# watch key range, streaming.
$watch = $etcd->watch( { key => 'foo', range_end => 'fop'}, sub {
my ($result) = @_;
print STDERR Dumper($result);
})->create;
# create/grant 20 second lease
$etcd->lease( { ID => 7587821338341002662, TTL => 20 } )->grant;
# attach lease to put
$etcd->put( { key => 'foo2', value => 'bar2', lease => 7587821338341002662 } );
lib/Net/Etcd/Lease.pm view on Meta::CPAN
$self->{endpoint} = '/kv/lease/timetolive';
confess 'ID is required for ' . __PACKAGE__ . '->ttl'
unless $self->{ID};
$self->request;
return $self;
}
=head2 keepalive
LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client
to the server and streaming keep alive responses from the server to the client."
$etcd->lease({{ ID => 7587821338341002662 })->keepalive
=cut
sub keepalive {
my $self = shift;
$self->{endpoint} = '/lease/keepalive';
confess 'ID is required for ' . __PACKAGE__ . '->keepalive'
unless $self->{ID};
lib/Net/Etcd/Watch.pm view on Meta::CPAN
Net::Etcd::Watch
=cut
our $VERSION = '0.022';
=head1 DESCRIPTION
Watch watches for events happening or that have happened. Both input and output are streams;
the input stream is for creating and canceling watchers and the output stream sends events.
One watch RPC can watch on multiple key ranges, streaming events for several watches at once.
The entire event history can be watched starting from the last compaction revision.
=head1 ACCESSORS
=head2 endpoint
=cut
has endpoint => (
is => 'ro',
( run in 0.281 second using v1.01-cache-2.11-cpan-4d50c553e7e )