class Etcd::Lease

Defined in:

etcd/lease.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Etcd::Client = Etcd::Client.new) #

[View source]

Instance Method Detail

def grant(ttl : Int64 = @ttl, id = 0) #

Requests a lease ttl ttl of granted lease Int64 id id of 0 prompts etcd to assign any id to lease UInt64


[View source]
def keep_alive(id : Int64) : Int64 | Nil #

Requests persistence of lease. Must be invoked periodically to avoid key loss.


[View source]
def leases #

Queries for all existing leases in an etcd cluster


[View source]
def revoke(id : Int64) #

Revokes an etcd lease id Id of lease Int64


[View source]
def timetolive(id : Int64, query_keys = false) #

Queries the TTL of a lease id id of lease Int64 query_keys query all the lease's keys for ttl Bool


[View source]