From aec967d356e74e9013e531287872df64fad738ef Mon Sep 17 00:00:00 2001 From: Damien Date: Tue, 14 Aug 2018 10:25:36 +0200 Subject: [PATCH 1/3] Add support fort consul token Signed-off-by: Damien Goldenberg --- store/consul/consul.go | 3 +++ store/store.go | 1 + 2 files changed, 4 insertions(+) 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 From f6e8c3e77d18b4ea06b1206ab300c742ca6e6d0c Mon Sep 17 00:00:00 2001 From: Damien Date: Tue, 14 Aug 2018 10:26:09 +0200 Subject: [PATCH 2/3] Update the go version for the CI Signed-off-by: Damien Goldenberg --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a7a3bcff..fb776e3f 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 From bea7782788bd34318aac3473550bbcab1a22ec1c Mon Sep 17 00:00:00 2001 From: Damien Date: Mon, 20 Aug 2018 19:15:39 +0200 Subject: [PATCH 3/3] Update the zookeeper version for the CI Signed-off-by: Damien Goldenberg --- .travis.yml | 2 +- script/travis_zk.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb776e3f..9a4ef974 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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"