mirror of
				https://github.com/yeasy/docker_practice.git
				synced 2025-11-04 03:41:34 +00:00 
			
		
		
		
	Update etcd
This commit is contained in:
		@@ -127,23 +127,17 @@ $ etcdctl del testkey
 | 
			
		||||
 | 
			
		||||
#### watch
 | 
			
		||||
 | 
			
		||||
监测一个键值的变化,一旦键值发生更新,就会输出最新的值并退出。
 | 
			
		||||
监测一个键值的变化,一旦键值发生更新,就会输出最新的值。
 | 
			
		||||
 | 
			
		||||
例如,用户更新 testkey 键值为 Hello world。
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ etcdctl watch testkey
 | 
			
		||||
Hello world
 | 
			
		||||
PUT
 | 
			
		||||
testkey
 | 
			
		||||
2
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
支持的选项包括
 | 
			
		||||
 | 
			
		||||
--forever		一直监测,直到用户按 `CTRL+C` 退出
 | 
			
		||||
 | 
			
		||||
--after-index '0'	在指定 index 之前一直监测
 | 
			
		||||
 | 
			
		||||
--recursive		返回所有的键值和子键值
 | 
			
		||||
 | 
			
		||||
#### member
 | 
			
		||||
 | 
			
		||||
通过 `list`、`add`、`update`、`remove` 命令列出、添加、更新、删除 etcd 实例到 etcd 集群中。
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user