Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 669 Bytes

how-to-create-locks.md

File metadata and controls

25 lines (17 loc) · 669 Bytes
title description weight
How to create locks
Guide to creating distributed locks in etcd
800

LOCK acquires a distributed mutex with a given name. Once the lock is acquired, it will be held until etcdctl is terminated.

Prerequisites

Creating a lock

lock for distributed lock:

08_etcdctl_lock_2016050501

etcdctl --endpoints=$ENDPOINTS lock mutex1

Options

  • endpoints - defines a comma-delimited list of machine addresses in the cluster.
  • ttl - time out in seconds of lock session.