Net::Etcd::Lease
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
TTL is the advisory time-to-live in seconds.
ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.
keys is true to query all the keys attached to this lease.
$etcd->lease({ ID => 7587821338341002662, TTL => 20 })->grant
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
$etcd->lease({{ ID => 7587821338341002662 })->revoke
LeaseTimeToLive retrieves lease information.
$etcd->lease({{ ID => 7587821338341002662, keys => 1 })->ttl
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
To install Net::Etcd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Etcd
CPAN shell
perl -MCPAN -e shell install Net::Etcd
For more information on module installation, please visit the detailed CPAN module installation guide.