Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
Merge pull request kelseyhightower#665 from mihu/srv_scheme
Browse files Browse the repository at this point in the history
backend/etcd: add scheme to srv discovered endpoints
  • Loading branch information
okushchenko authored Feb 20, 2018
2 parents a88c922 + 5c3fd32 commit 1fd1249
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ func initConfig() error {
if err != nil {
return errors.New("Cannot get nodes from SRV records " + err.Error())
}

switch config.Backend {
case "etcd":
vsm := make([]string, len(srvNodes))
for i, v := range srvNodes {
vsm[i] = config.Scheme + "://" + v
}
srvNodes = vsm
}

config.BackendNodes = srvNodes
}
if len(config.BackendNodes) == 0 {
Expand Down

0 comments on commit 1fd1249

Please sign in to comment.