Get desktop application:
View/edit binary Protocol Buffers messages
Lock acquires a distributed shared lock on a given named lock.
name is the identifier for the distributed shared lock to be acquired.
lease is the ID of the lease that will be attached to ownership of the lock. If the lease expires or is revoked and currently holds the lock, the lock is automatically released. Calls to Lock with the same lease will be treated as a single acquisition; locking twice with the same lease is a no-op.
key is a key that will exist on etcd for the duration that the Lock caller owns the lock. Users should not modify this key or the lock may exhibit undefined behavior.
Unlock takes a key returned by Lock and releases the hold on lock.
key is the lock ownership key granted by Lock.