Skip to content

Commit

Permalink
Added 'How to create locks' page under tutorials section and updated …
Browse files Browse the repository at this point in the history
…demo page accordingly (etcd-io#521)
  • Loading branch information
Somoshree authored Oct 18, 2021
1 parent 064b125 commit fe549e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
14 changes: 0 additions & 14 deletions content/en/docs/v3.5/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,6 @@ etcdctl --endpoints=$ENDPOINTS lease revoke 2be7547fbc6a5afa
etcdctl --endpoints=$ENDPOINTS get sample
```


## Distributed locks

`lock` for distributed lock:

![08_etcdctl_lock_2016050501](https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif)

```shell
etcdctl --endpoints=$ENDPOINTS lock mutex1

# another client with the same name blocks
etcdctl --endpoints=$ENDPOINTS lock mutex1
```

## Cluster status

Specify the initial cluster configuration for each machine:
Expand Down
15 changes: 15 additions & 0 deletions content/en/docs/v3.5/tutorials/how-to-create-locks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: How to create locks
description: Guide to creating distributed locks in etcd
---

`lock` for distributed lock:

![08_etcdctl_lock_2016050501](https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif)

```shell
etcdctl --endpoints=$ENDPOINTS lock mutex1

# another client with the same name blocks
etcdctl --endpoints=$ENDPOINTS lock mutex1
```

0 comments on commit fe549e0

Please sign in to comment.