diff --git a/.travis.yml b/.travis.yml index a7a3bcff..9a4ef974 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.7.1 + - 1.8 # let us have speedy Docker-based Travis workers sudo: false @@ -17,7 +17,7 @@ before_install: before_script: - script/travis_consul.sh 0.6.3 - script/travis_etcd.sh 3.0.0 - - script/travis_zk.sh 3.5.1-alpha + - script/travis_zk.sh 3.5.4-beta script: - ./consul agent -server -bootstrap -advertise=127.0.0.1 -data-dir /tmp/consul -config-file=./config.json 1>/dev/null & diff --git a/script/travis_zk.sh b/script/travis_zk.sh index 636a2407..b3274725 100755 --- a/script/travis_zk.sh +++ b/script/travis_zk.sh @@ -3,7 +3,7 @@ if [ $# -gt 0 ] ; then ZK_VERSION="$1" else - ZK_VERSION="3.4.7" + ZK_VERSION="3.4.12" fi wget "http://apache.cs.utah.edu/zookeeper/zookeeper-${ZK_VERSION}/zookeeper-${ZK_VERSION}.tar.gz" diff --git a/store/consul/consul.go b/store/consul/consul.go index cb64be72..8f6fbc0f 100644 --- a/store/consul/consul.go +++ b/store/consul/consul.go @@ -84,6 +84,9 @@ func New(endpoints []string, options *store.Config) (store.Store, error) { if options.ConnectionTimeout != 0 { s.setTimeout(options.ConnectionTimeout) } + if options.Token != nil { + s.config.Token = *options.Token + } } // Creates a new client diff --git a/store/store.go b/store/store.go index 7a4850c0..9702c0a1 100644 --- a/store/store.go +++ b/store/store.go @@ -48,6 +48,7 @@ type Config struct { PersistConnection bool Username string Password string + Token *string } // ClientTLSConfig contains data for a Client TLS configuration in the form