Browse Source

Merge pull request #11249 from spzala/issue9726

doc: add lease time
Sahdev Zala 6 years ago
parent
commit
1b041a5783
2 changed files with 14 additions and 14 deletions
  1. 10 10
      Documentation/dev-guide/interacting_v3.md
  2. 4 4
      etcdctl/README.md

+ 10 - 10
Documentation/dev-guide/interacting_v3.md

@@ -408,9 +408,9 @@ Applications can grant leases for keys from an etcd cluster. When a key is attac
 Here is the command to grant a lease:
 Here is the command to grant a lease:
 
 
 ```bash
 ```bash
-# grant a lease with 10 second TTL
-$ etcdctl lease grant 10
-lease 32695410dcc0ca06 granted with TTL(10s)
+# grant a lease with 60 second TTL
+$ etcdctl lease grant 60
+lease 32695410dcc0ca06 granted with TTL(60s)
 
 
 # attach key foo to lease 32695410dcc0ca06
 # attach key foo to lease 32695410dcc0ca06
 $ etcdctl put --lease=32695410dcc0ca06 foo bar
 $ etcdctl put --lease=32695410dcc0ca06 foo bar
@@ -424,8 +424,8 @@ Applications revoke leases by lease ID. Revoking a lease deletes all of its atta
 Suppose we finished the following sequence of operations:
 Suppose we finished the following sequence of operations:
 
 
 ```bash
 ```bash
-$ etcdctl lease grant 10
-lease 32695410dcc0ca06 granted with TTL(10s)
+$ etcdctl lease grant 60
+lease 32695410dcc0ca06 granted with TTL(60s)
 $ etcdctl put --lease=32695410dcc0ca06 foo bar
 $ etcdctl put --lease=32695410dcc0ca06 foo bar
 OK
 OK
 ```
 ```
@@ -447,17 +447,17 @@ Applications can keep a lease alive by refreshing its TTL so it does not expire.
 Suppose we finished the following sequence of operations:
 Suppose we finished the following sequence of operations:
 
 
 ```bash
 ```bash
-$ etcdctl lease grant 10
-lease 32695410dcc0ca06 granted with TTL(10s)
+$ etcdctl lease grant 60
+lease 32695410dcc0ca06 granted with TTL(60s)
 ```
 ```
 
 
 Here is the command to keep the same lease alive:
 Here is the command to keep the same lease alive:
 
 
 ```bash
 ```bash
 $ etcdctl lease keep-alive 32695410dcc0ca06
 $ etcdctl lease keep-alive 32695410dcc0ca06
-lease 32695410dcc0ca06 keepalived with TTL(10)
-lease 32695410dcc0ca06 keepalived with TTL(10)
-lease 32695410dcc0ca06 keepalived with TTL(10)
+lease 32695410dcc0ca06 keepalived with TTL(60)
+lease 32695410dcc0ca06 keepalived with TTL(60)
+lease 32695410dcc0ca06 keepalived with TTL(60)
 ...
 ...
 ```
 ```
 
 

+ 4 - 4
etcdctl/README.md

@@ -533,8 +533,8 @@ Prints a message with the granted lease ID.
 #### Example
 #### Example
 
 
 ```bash
 ```bash
-./etcdctl lease grant 10
-# lease 32695410dcc0ca06 granted with TTL(10s)
+./etcdctl lease grant 60
+# lease 32695410dcc0ca06 granted with TTL(60s)
 ```
 ```
 
 
 ### LEASE REVOKE \<leaseID\>
 ### LEASE REVOKE \<leaseID\>
@@ -609,8 +609,8 @@ Prints a message with a list of active leases.
 #### Example
 #### Example
 
 
 ```bash
 ```bash
-./etcdctl lease grant 10
-# lease 32695410dcc0ca06 granted with TTL(10s)
+./etcdctl lease grant 60
+# lease 32695410dcc0ca06 granted with TTL(60s)
 
 
 ./etcdctl lease list
 ./etcdctl lease list
 32695410dcc0ca06
 32695410dcc0ca06