1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00

update dc

This commit is contained in:
Xargin 2018-08-15 19:52:56 +08:00
parent 9fe09c7ac3
commit 4afd47c259

View File

@ -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 ```go