From 4afd47c2591f458614ad935c98df6841e32a2c5b Mon Sep 17 00:00:00 2001 From: Xargin Date: Wed, 15 Aug 2018 19:52:56 +0800 Subject: [PATCH] update dc --- ch6-cloud/ch6-06-config.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ch6-cloud/ch6-06-config.md b/ch6-cloud/ch6-06-config.md index be77fd8..b315de3 100644 --- a/ch6-cloud/ch6-06-config.md +++ b/ch6-cloud/ch6-06-config.md @@ -38,6 +38,16 @@ etcdctl get /configs/remote_config.json } ``` +### 新建 etcd client + +```go +cfg := client.Config{ + Endpoints: []string{"http://127.0.0.1:2379"}, + Transport: client.DefaultTransport, + HeaderTimeoutPerRequest: time.Second, +} +``` + ### 配置获取 ```go