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:
parent
9fe09c7ac3
commit
4afd47c259
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user