remove default values, fix formatting
Olivier Bregeras
7 years ago
13 | 13 | |
14 | 14 | // Client is a wrapper arround the etcd client. |
15 | 15 | type Client interface { |
16 | ||
17 | 16 | // GetEntries will query the given prefix in etcd and returns a set of entries. |
18 | 17 | GetEntries(prefix string) ([]string, error) |
19 | 18 | // WatchPrefix starts watching every change for given prefix in etcd. When an |
47 | 46 | tlsCert tls.Certificate |
48 | 47 | ) |
49 | 48 | if options == nil { |
50 | options = &ClientOptions{ | |
51 | Cert: "", | |
52 | Key: "", | |
53 | CaCert: "", | |
54 | DialTimeout: 100 * time.Second, | |
55 | DialKeepAline: 100 * time.Second, | |
56 | HeaderTimeoutPerRequest: 100 * time.Second, | |
57 | } | |
49 | options = &ClientOptions{} | |
58 | 50 | } |
59 | 51 | |
60 | 52 | if options.Cert != "" && options.Key != "" { |
61 | ||
62 | 53 | tlsCert, err = tls.LoadX509KeyPair(options.Cert, options.Key) |
63 | 54 | if err != nil { |
64 | 55 | return nil, err |