Skip to content

Commit

Permalink
Specify default Vault backend node
Browse files Browse the repository at this point in the history
Without passing `-node`, Vault will panic:

```
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0xb9ece0, 0xc820010040)
	/usr/local/go/src/runtime/panic.go:464 +0x3e6
github.com/kelseyhightower/confd/backends.New(0x0, 0x0, 0x0, 0x0, 0x7fff1a2aee58, 0x5, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/kelseyhightower/go/src/github.com/kelseyhightower/confd/backends/client.go:61 +0xbdf
main.main()
	/Users/kelseyhightower/go/src/github.com/kelseyhightower/confd/confd.go:27 +0x1f4
```
  • Loading branch information
mlafeldt committed May 10, 2016
1 parent b34d223 commit b082c05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ func initConfig() error {
}
case "redis":
config.BackendNodes = []string{"127.0.0.1:6379"}
case "vault":
config.BackendNodes = []string{"http://127.0.0.1:8200"}
case "zookeeper":
config.BackendNodes = []string{"127.0.0.1:2181"}
}
Expand Down

0 comments on commit b082c05

Please sign in to comment.