mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client: ClientConfig -> Config
This commit is contained in:
committed by
Yicheng Qin
parent
2aecbaf165
commit
3b41b77cd7
@@ -46,12 +46,12 @@ func defaultHTTPClientFactory(tr CancelableTransport, ep url.URL) HTTPClient {
|
||||
}
|
||||
}
|
||||
|
||||
type ClientConfig struct {
|
||||
type Config struct {
|
||||
Endpoints []string
|
||||
Transport CancelableTransport
|
||||
}
|
||||
|
||||
func New(cfg ClientConfig) (SyncableHTTPClient, error) {
|
||||
func New(cfg Config) (SyncableHTTPClient, error) {
|
||||
c := &httpClusterClient{clientFactory: defaultHTTPClientFactory}
|
||||
if err := c.reset(cfg.Transport, cfg.Endpoints); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user