diff --git a/Makefile b/Makefile
index 93e34ae..f58cfe5 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@
 ## Local Development Helpers
 local-lib-go:
 ifdef LOCAL_LIB_GO
+	rm -rf vendor/github.com/opencord/voltha-lib-go/v4/pkg
 	mkdir -p vendor/github.com/opencord/voltha-lib-go/v4/pkg
 	cp -r ${LOCAL_LIB_GO}/pkg/* vendor/github.com/opencord/voltha-lib-go/v4/pkg/
 endif
diff --git a/VERSION b/VERSION
index 59b9db0..bc80560 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.5.0-dev
+1.5.0
diff --git a/go.mod b/go.mod
index faf0bb0..594bef5 100644
--- a/go.mod
+++ b/go.mod
@@ -9,9 +9,10 @@
 	github.com/imdario/mergo v0.3.7 // indirect
 	github.com/jessevdk/go-flags v1.4.0
 	github.com/jhump/protoreflect v1.5.0
-	github.com/opencord/voltha-lib-go/v4 v4.0.6
-	github.com/opencord/voltha-protos/v4 v4.0.11
+	github.com/opencord/voltha-lib-go/v4 v4.2.1
+	github.com/opencord/voltha-protos/v4 v4.0.16
 	github.com/stretchr/testify v1.4.0
+	go.etcd.io/etcd v0.0.0-20190930204107-236ac2a90522
 	golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
 	golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
 	google.golang.org/appengine v1.6.1 // indirect
diff --git a/go.sum b/go.sum
index a2ccf29..6a071d5 100644
--- a/go.sum
+++ b/go.sum
@@ -1,37 +1,40 @@
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/Azure/go-autorest v11.1.2+incompatible h1:viZ3tV5l4gE2Sw0xrasFHytCGtzYCrT+um/rrSQ1BfA=
 github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
 github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
+github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM=
 github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
+github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
 github.com/Shopify/sarama v1.23.1/go.mod h1:XLH1GYJnLVE0XCr6KdJGVJRTwY30moWNJ4sERjXX6fs=
 github.com/Shopify/sarama v1.25.0 h1:ch1ywjRLjfJtU+EaiJ+l0rWffQ6TRpyYmW4DX7Cb2SU=
 github.com/Shopify/sarama v1.25.0/go.mod h1:y/CFFTO9eaMTNriwu/Q+W4eioLqiDMGkA1W+gmdfj8w=
 github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=
 github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
-github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM=
-github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg=
-github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
 github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
 github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d h1:zsO4lp+bjv5XvPTF58Vq+qgmZEYZttJK+CWtSZhKenI=
 github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6ZhUWvbk7PdWVmOaak10o86cqMUYEmn1CZNGEI=
 github.com/bsm/sarama-cluster v2.1.15+incompatible h1:RkV6WiNRnqEEbp81druK8zYhmnIgdOjqSVi0+9Cnl2A=
 github.com/bsm/sarama-cluster v2.1.15+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM=
+github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 h1:fUmDBbSvv1uOzo/t8WaxZMVb7BxJ8JECo5lGoR9c5bA=
 github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72/go.mod h1:OEE5igu/CDjGegM1Jn6ZMo7R6LlV/JChAkjfQQIRLpg=
+github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
 github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
 github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 h1:q1g9lSyo/nOIC3W5E3FK3Unrz8b9LdLXCyuC+ZcpPC0=
 github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73/go.mod h1:507vXsotcZop7NZfBWdhPmVeOse4ko2R7AagJYrpoEg=
-github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
-github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
+github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
 github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
@@ -45,6 +48,7 @@
 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
 github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw=
 github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/creack/pty v1.1.7 h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A=
 github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -52,10 +56,10 @@
 github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=
 github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=
 github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
 github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
 github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
@@ -63,24 +67,29 @@
 github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
 github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e h1:p1yVGRW3nmb85p1Sh1ZJSDm4A4iKLS5QNbvUHMgGu/M=
 github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550 h1:mV9jbLoSW/8m4VK16ZkHTozJa8sesK5u5kTMFysTYac=
 github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
 github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
-github.com/frankban/quicktest v1.4.1 h1:Wv2VwvNn73pAdFIVUQRXYDFp31lXKbqblIXo/Q5GPSg=
 github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ=
 github.com/frankban/quicktest v1.5.0 h1:Tb4jWdSpdjKzTUicPnY61PZxKbDoGa7ABbrReT3gQVY=
 github.com/frankban/quicktest v1.5.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=
 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0 h1:8HUsc87TaSWLKwrnumgC8/YconD2fJQsRJAsWaPg2ic=
 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
 github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
 github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE=
 github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
@@ -88,20 +97,18 @@
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8=
 github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
 github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
 github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
 github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
 github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -114,9 +121,11 @@
 github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
 github.com/googleapis/gnostic v0.3.0 h1:CcQijm0XKekKjP/YCz28LXVSpgguuB+nCxaSjCe09y0=
 github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
+github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8 h1:L9JPKrtsHMQ4VCRQfHvbbHBfB2Urn8xf6QZeXZ+OrN4=
 github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8=
 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7 h1:6TSoaYExHper8PYsJu23GWVNOyYRCSnIFyxKgLSZ54w=
 github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
 github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=
 github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
@@ -124,52 +133,17 @@
 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
 github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=
 github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/hashicorp/consul/api v1.2.0 h1:oPsuzLp2uk7I7rojPKuncWbZ+m5TMoD4Ivs+2Rkeh4Y=
-github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw=
-github.com/hashicorp/consul/sdk v0.2.0 h1:GWFYFmry/k4b1hEoy7kSkmU8e30GAyI4VZHk0fRxeL4=
-github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-immutable-radix v1.1.0 h1:vN9wG1D6KG6YHRTWr8512cxGOVgTMEfgEdSj/hr8MPc=
-github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI=
-github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
-github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
-github.com/hashicorp/go-rootcerts v1.0.1 h1:DMo4fmknnz0E0evoNYnV48RjWndOsmd6OW+09R3cEP8=
-github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
-github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
-github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
 github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
 github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
+github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk=
-github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
-github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
-github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/memberlist v0.1.5 h1:AYBsgJOW9gab/toO5tEB8lWetVgDKZycqkebJ8xxpqM=
-github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
-github.com/hashicorp/serf v0.8.4 h1:nfikPYzgKvrThySCqSN6ap+LqILhPej+ubRWRNQmzgk=
-github.com/hashicorp/serf v0.8.4/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k=
 github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
 github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=
 github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 h1:FUwcHNlEqkqLjLBdCp5PRlCFijNjvcYANOZXzCfXwCM=
 github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
 github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
 github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
@@ -180,114 +154,104 @@
 github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
 github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
 github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
 github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo=
 github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=
 github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
 github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/errcheck v1.2.0 h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E=
 github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/klauspost/compress v1.9.7 h1:hYW1gP94JUmAhBtJ+LNz5My+gBobDxPR1iVuKug26aA=
 github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
 github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
 github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
 github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
 github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=
 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
 github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=
-github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
-github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
-github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
-github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
-github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=
 github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
 github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
 github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/opencord/voltha-lib-go/v4 v4.0.6 h1:Mc/bkYDR3YcpWPeW35ju9h3sO2cGByz8XM0ik5ikJkc=
-github.com/opencord/voltha-lib-go/v4 v4.0.6/go.mod h1:8NFUZz/mp4OvRmilBRhkLOUrw4G01ruSAVdzQu2ivPc=
-github.com/opencord/voltha-protos/v4 v4.0.8/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
-github.com/opencord/voltha-protos/v4 v4.0.11 h1:pJMNvjVxmCPGEUVPSLgqvT9P2ei2J+8Z9KsHJru2MRI=
-github.com/opencord/voltha-protos/v4 v4.0.11/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
+github.com/opencord/voltha-lib-go/v4 v4.2.1 h1:lMTWf8uudoeFNWia9MEc9qGHRkoHHbGMRL4QrEPS+5Q=
+github.com/opencord/voltha-lib-go/v4 v4.2.1/go.mod h1:K7lDkSkJ97EyfvX8fQtBmBvpj7n6MmwnAtD8Jz79HcQ=
+github.com/opencord/voltha-protos/v4 v4.0.12/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
+github.com/opencord/voltha-protos/v4 v4.0.16 h1:VQNhkc3FLvol9xPph860w97WoIcW+IjrEqNAZVOuQ+0=
+github.com/opencord/voltha-protos/v4 v4.0.16/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
 github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
-github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
+github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
 github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
 github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
 github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
-github.com/pierrec/lz4 v2.2.6+incompatible h1:6aCX4/YZ9v8q69hTyiR7dNLnTA3fgtKHVVW5BCd5Znw=
 github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
 github.com/pierrec/lz4 v2.3.0+incompatible h1:CZzRn4Ut9GbUkHlQ7jqBXeZQV41ZSKWFc302ZU6lUTk=
 github.com/pierrec/lz4 v2.3.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE=
 github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
 github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
 github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM=
 github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
 github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
 github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
 github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
 github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
 github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
 github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 h1:dY6ETXrvDG7Sa4vE8ZQG4yqWg6UnOcbqTAahkV813vQ=
 github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=
 github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
-github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
 github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
 github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
 github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
 github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
 github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
@@ -295,13 +259,15 @@
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=
 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
 github.com/uber/jaeger-client-go v2.23.1+incompatible h1:uArBYHQR0HqLFFAypI7RsWTzPSj/bDpmZZuQjMLSg1A=
 github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
 github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw=
 github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
+github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk=
 github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
+github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0=
 github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
@@ -319,31 +285,28 @@
 go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191001170739-f9e2070545dc h1:KyTYo8xkh/2WdbFLUyQwBS0Jfn3qfZ9QmuPbok2oENE=
 golang.org/x/crypto v0.0.0-20191001170739-f9e2070545dc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4 h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0=
 golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ=
 golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68=
 golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3 h1:6KET3Sqa7fkVfD63QnAM81ZeYg5n4HwApOJkufONnHA=
@@ -357,18 +320,15 @@
 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c h1:+EXw7AwNOKzPFXMZ1yNjO40aWCh3PIquJB2fYlv9wcs=
 golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24 h1:R8bzl0244nw47n1xKs1MUMAaTNgjavKcN/aX2Ss3+Fo=
@@ -389,6 +349,7 @@
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b h1:mSUCVIwDx4hfXJfWsOPfdzEHxzb2Xjl6BQ8YgPnazQA=
 golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -396,7 +357,6 @@
 google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I=
 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
 google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
 google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c h1:hrpEMCZ2O7DR5gC1n2AJGVhrwiEjOi35+jxtIuZpTMo=
 google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
@@ -406,11 +366,12 @@
 google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
 google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s=
 google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I=
 gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
 gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
@@ -423,23 +384,23 @@
 gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
 gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI=
 gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
-gopkg.in/jcmturner/gokrb5.v7 v7.2.3 h1:hHMV/yKPwMnJhPuPx7pH2Uw/3Qyf+thJYlisUc44010=
 gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
 gopkg.in/jcmturner/gokrb5.v7 v7.3.0 h1:0709Jtq/6QXEuWRfAm260XqlpcwL1vxtO1tUE2qK8Z4=
 gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
 gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
 gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
+gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
 gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
 gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
 gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=
 gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs=
 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 k8s.io/api v0.0.0-20190819141258-3544db3b9e44 h1:7Gz7/nQ7X2qmPXMyN0bNq7Zm9Uip+UnFuMZTd2l3vms=
 k8s.io/api v0.0.0-20190819141258-3544db3b9e44/go.mod h1:AOxZTnaXR/xiarlQL0JUfwQPxjmKDvVYoRp58cA7lUo=
@@ -449,6 +410,7 @@
 k8s.io/client-go v0.0.0-20190819141724-e14f31a72a77/go.mod h1:DmkJD5UDP87MVqUQ5VJ6Tj9Oen8WzXPhk3la4qpyG4g=
 k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68=
 k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
+k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30 h1:TRb4wNWoBVrH9plmkp2q86FIDppkbrEXdXlxU3a3BMI=
 k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
 k8s.io/utils v0.0.0-20190221042446-c2654d5206da h1:ElyM7RPonbKnQqOcw7dG2IK5uvQQn3b/WPHqD5mBvP4=
 k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
diff --git a/internal/pkg/apis/config/v1/defaults.go b/internal/pkg/apis/config/v1/defaults.go
new file mode 100644
index 0000000..c0fe427
--- /dev/null
+++ b/internal/pkg/apis/config/v1/defaults.go
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2021-present Ciena Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package config
+
+import (
+	"time"
+)
+
+func NewDefaultConfig() *GlobalConfigSpec {
+	return &GlobalConfigSpec{
+		Server:  "localhost:55555",
+		Kafka:   "localhost:9092",
+		KvStore: "localhost:2379",
+		Tls: TlsConfigSpec{
+			UseTls: false,
+			CACert: "",
+			Cert:   "",
+			Key:    "",
+			Verify: "",
+		},
+		Grpc: GrpcConfigSpec{
+			Timeout:            5 * time.Minute,
+			MaxCallRecvMsgSize: "4MB",
+		},
+		KvStoreConfig: KvStoreConfigSpec{
+			Timeout: 5 * time.Second,
+		},
+		K8sConfig: "",
+	}
+}
diff --git a/internal/pkg/apis/config/v1/types.go b/internal/pkg/apis/config/v1/types.go
new file mode 100644
index 0000000..a7ea78e
--- /dev/null
+++ b/internal/pkg/apis/config/v1/types.go
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2021-present Ciena Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package config
+
+import (
+	"time"
+)
+
+type GrpcConfigSpec struct {
+	Timeout            time.Duration `yaml:"timeout"`
+	MaxCallRecvMsgSize string        `yaml:"maxCallRecvMsgSize"`
+}
+
+type KvStoreConfigSpec struct {
+	Timeout time.Duration `yaml:"timeout"`
+}
+
+type TlsConfigSpec struct {
+	UseTls bool   `yaml:"useTls"`
+	CACert string `yaml:"caCert"`
+	Cert   string `yaml:"cert"`
+	Key    string `yaml:"key"`
+	Verify string `yaml:"verify"`
+}
+
+type GlobalConfigSpec struct {
+	Server        string            `yaml:"server"`
+	Kafka         string            `yaml:"kafka"`
+	KvStore       string            `yaml:"kvstore"`
+	Tls           TlsConfigSpec     `yaml:"tls"`
+	Grpc          GrpcConfigSpec    `yaml:"grpc"`
+	KvStoreConfig KvStoreConfigSpec `yaml:"kvstoreconfig"`
+	K8sConfig     string            `yaml:"-"`
+}
diff --git a/internal/pkg/apis/config/v2/convert.go b/internal/pkg/apis/config/v2/convert.go
new file mode 100644
index 0000000..6e68983
--- /dev/null
+++ b/internal/pkg/apis/config/v2/convert.go
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2021-present Ciena Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package config
+
+import (
+	"strconv"
+
+	configv1 "github.com/opencord/voltctl/internal/pkg/apis/config/v1"
+)
+
+func FromConfigV1(v1 *configv1.GlobalConfigSpec) *GlobalConfigSpec {
+	v2 := NewDefaultConfig()
+
+	v2.Server = v1.Server
+	v2.Kafka = v1.Kafka
+	v2.KvStore = v1.KvStore
+	v2.Tls.UseTls = v1.Tls.UseTls
+	v2.Tls.CACert = v1.Tls.CACert
+	v2.Tls.Cert = v1.Tls.Cert
+	v2.Tls.Key = v1.Tls.Key
+	if v1.Tls.Verify != "" {
+		if b, err := strconv.ParseBool(v1.Tls.Verify); err == nil {
+			v2.Tls.Verify = b
+		}
+	}
+	v2.Grpc.Timeout = v1.Grpc.Timeout
+	v2.Grpc.MaxCallRecvMsgSize = v1.Grpc.MaxCallRecvMsgSize
+	v2.KvStoreConfig.Timeout = v1.KvStoreConfig.Timeout
+	v2.K8sConfig = v1.K8sConfig
+	return v2
+}
diff --git a/internal/pkg/apis/config/v2/defaults.go b/internal/pkg/apis/config/v2/defaults.go
new file mode 100644
index 0000000..c872325
--- /dev/null
+++ b/internal/pkg/apis/config/v2/defaults.go
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2021-present Ciena Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package config
+
+import (
+	"time"
+)
+
+func NewDefaultConfig() *GlobalConfigSpec {
+	return &GlobalConfigSpec{
+		ApiVersion: "v2",
+		Server:     "localhost:55555",
+		Kafka:      "localhost:9092",
+		KvStore:    "localhost:2379",
+		Tls: TlsConfigSpec{
+			UseTls: false,
+			CACert: "",
+			Cert:   "",
+			Key:    "",
+			Verify: false,
+		},
+		Grpc: GrpcConfigSpec{
+			ConnectTimeout:     5 * time.Second,
+			Timeout:            5 * time.Minute,
+			MaxCallRecvMsgSize: "4MB",
+		},
+		KvStoreConfig: KvStoreConfigSpec{
+			Timeout: 5 * time.Second,
+		},
+		K8sConfig: "",
+	}
+}
diff --git a/internal/pkg/apis/config/v2/types.go b/internal/pkg/apis/config/v2/types.go
new file mode 100644
index 0000000..1c5a0d4
--- /dev/null
+++ b/internal/pkg/apis/config/v2/types.go
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2021-present Ciena Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package config
+
+import (
+	"time"
+)
+
+type GrpcConfigSpec struct {
+	ConnectTimeout     time.Duration `yaml:"connectTimeout"`
+	Timeout            time.Duration `yaml:"timeout"`
+	MaxCallRecvMsgSize string        `yaml:"maxCallRecvMsgSize"`
+}
+
+type KvStoreConfigSpec struct {
+	Timeout time.Duration `yaml:"timeout"`
+}
+
+type TlsConfigSpec struct {
+	UseTls bool   `yaml:"useTls"`
+	CACert string `yaml:"caCert"`
+	Cert   string `yaml:"cert"`
+	Key    string `yaml:"key"`
+	Verify bool   `yaml:"verify"`
+}
+
+type GlobalConfigSpec struct {
+	ApiVersion    string            `yaml:"apiVersion"`
+	Server        string            `yaml:"server"`
+	Kafka         string            `yaml:"kafka"`
+	KvStore       string            `yaml:"kvstore"`
+	Tls           TlsConfigSpec     `yaml:"tls"`
+	Grpc          GrpcConfigSpec    `yaml:"grpc"`
+	KvStoreConfig KvStoreConfigSpec `yaml:"kvstoreconfig"`
+	K8sConfig     string            `yaml:"-"`
+}
diff --git a/internal/pkg/commands/command.go b/internal/pkg/commands/command.go
index d2951a3..3e1beb4 100644
--- a/internal/pkg/commands/command.go
+++ b/internal/pkg/commands/command.go
@@ -16,12 +16,13 @@
 package commands
 
 import (
+	"context"
+	"crypto/tls"
 	"encoding/json"
 	"errors"
 	"fmt"
 	"io/ioutil"
 	"log"
-	"net"
 	"os"
 	"path/filepath"
 	"reflect"
@@ -32,11 +33,14 @@
 
 	"github.com/golang/protobuf/jsonpb"
 	"github.com/golang/protobuf/proto"
+	configv1 "github.com/opencord/voltctl/internal/pkg/apis/config/v1"
+	configv2 "github.com/opencord/voltctl/internal/pkg/apis/config/v2"
 	"github.com/opencord/voltctl/pkg/filter"
 	"github.com/opencord/voltctl/pkg/format"
 	"github.com/opencord/voltctl/pkg/order"
 	"google.golang.org/grpc"
-	"gopkg.in/yaml.v2"
+	"google.golang.org/grpc/credentials"
+	yaml "gopkg.in/yaml.v2"
 )
 
 type OutputType uint8
@@ -46,48 +50,9 @@
 	OUTPUT_JSON
 	OUTPUT_YAML
 
-	defaultApiHost = "localhost"
-	defaultApiPort = 55555
-
-	defaultKafkaHost = "localhost"
-	defaultKafkaPort = 9092
-
 	supportedKvStoreType = "etcd"
-	defaultKvHost        = "localhost"
-	defaultKvPort        = 2379
-	defaultKvTimeout     = time.Second * 5
-
-	defaultGrpcTimeout            = time.Minute * 5
-	defaultGrpcMaxCallRecvMsgSize = "4MB"
 )
 
-type GrpcConfigSpec struct {
-	Timeout            time.Duration `yaml:"timeout"`
-	MaxCallRecvMsgSize string        `yaml:"maxCallRecvMsgSize"`
-}
-
-type KvStoreConfigSpec struct {
-	Timeout time.Duration `yaml:"timeout"`
-}
-
-type TlsConfigSpec struct {
-	UseTls bool   `yaml:"useTls"`
-	CACert string `yaml:"caCert"`
-	Cert   string `yaml:"cert"`
-	Key    string `yaml:"key"`
-	Verify string `yaml:"verify"`
-}
-
-type GlobalConfigSpec struct {
-	Server        string            `yaml:"server"`
-	Kafka         string            `yaml:"kafka"`
-	KvStore       string            `yaml:"kvstore"`
-	Tls           TlsConfigSpec     `yaml:"tls"`
-	Grpc          GrpcConfigSpec    `yaml:"grpc"`
-	KvStoreConfig KvStoreConfigSpec `yaml:"kvstoreconfig"`
-	K8sConfig     string            `yaml:"-"`
-}
-
 var (
 	ParamNames = map[string]map[string]string{
 		"v1": {
@@ -105,21 +70,7 @@
 
 	CharReplacer = strings.NewReplacer("\\t", "\t", "\\n", "\n")
 
-	GlobalConfig = GlobalConfigSpec{
-		Server:  "localhost:55555",
-		Kafka:   "",
-		KvStore: "localhost:2379",
-		Tls: TlsConfigSpec{
-			UseTls: false,
-		},
-		Grpc: GrpcConfigSpec{
-			Timeout:            defaultGrpcTimeout,
-			MaxCallRecvMsgSize: defaultGrpcMaxCallRecvMsgSize,
-		},
-		KvStoreConfig: KvStoreConfigSpec{
-			Timeout: defaultKvTimeout,
-		},
-	}
+	GlobalConfig = configv2.NewDefaultConfig()
 
 	GlobalCommandOptions = make(map[string]map[string]string)
 
@@ -194,31 +145,6 @@
 	}
 }
 
-func splitEndpoint(ep, defaultHost string, defaultPort int) (string, int, error) {
-	port := defaultPort
-	host, sPort, err := net.SplitHostPort(ep)
-	if err != nil {
-		if addrErr, ok := err.(*net.AddrError); ok {
-			if addrErr.Err != "missing port in address" {
-				return "", 0, err
-			}
-			host = ep
-		} else {
-			return "", 0, err
-		}
-	} else if len(strings.TrimSpace(sPort)) > 0 {
-		val, err := strconv.Atoi(sPort)
-		if err != nil {
-			return "", 0, err
-		}
-		port = val
-	}
-	if len(strings.TrimSpace(host)) == 0 {
-		host = defaultHost
-	}
-	return strings.Trim(host, "]["), port, nil
-}
-
 type CommandResult struct {
 	Format    format.Format
 	Filter    string
@@ -283,9 +209,15 @@
 			Error.Fatalf("Unable to read the configuration file '%s': %s",
 				GlobalOptions.Config, err.Error())
 		}
+		// First try the latest version of the config api then work
+		// backwards
 		if err = yaml.Unmarshal(configFile, &GlobalConfig); err != nil {
-			Error.Fatalf("Unable to parse the configuration file '%s': %s",
-				GlobalOptions.Config, err.Error())
+			GlobalConfigV1 := configv1.NewDefaultConfig()
+			if err = yaml.Unmarshal(configFile, &GlobalConfigV1); err != nil {
+				Error.Fatalf("Unable to parse the configuration file '%s': %s",
+					GlobalOptions.Config, err.Error())
+			}
+			GlobalConfig = configv2.FromConfigV1(GlobalConfigV1)
 		}
 	}
 
@@ -293,32 +225,22 @@
 	if GlobalOptions.Server != "" {
 		GlobalConfig.Server = GlobalOptions.Server
 	}
-	host, port, err := splitEndpoint(GlobalConfig.Server, defaultApiHost, defaultApiPort)
-	if err != nil {
-		Error.Fatalf("voltha API endport incorrectly specified '%s':%s",
-			GlobalConfig.Server, err)
+
+	if GlobalOptions.UseTLS {
+		GlobalConfig.Tls.UseTls = true
 	}
-	GlobalConfig.Server = net.JoinHostPort(host, strconv.Itoa(port))
+
+	if GlobalOptions.Verify {
+		GlobalConfig.Tls.Verify = true
+	}
 
 	if GlobalOptions.Kafka != "" {
 		GlobalConfig.Kafka = GlobalOptions.Kafka
 	}
-	host, port, err = splitEndpoint(GlobalConfig.Kafka, defaultKafkaHost, defaultKafkaPort)
-	if err != nil {
-		Error.Fatalf("Kafka endport incorrectly specified '%s':%s",
-			GlobalConfig.Kafka, err)
-	}
-	GlobalConfig.Kafka = net.JoinHostPort(host, strconv.Itoa(port))
 
 	if GlobalOptions.KvStore != "" {
 		GlobalConfig.KvStore = GlobalOptions.KvStore
 	}
-	host, port, err = splitEndpoint(GlobalConfig.KvStore, defaultKvHost, defaultKvPort)
-	if err != nil {
-		Error.Fatalf("KV store endport incorrectly specified '%s':%s",
-			GlobalConfig.KvStore, err)
-	}
-	GlobalConfig.KvStore = net.JoinHostPort(host, strconv.Itoa(port))
 
 	if GlobalOptions.KvStoreTimeout != "" {
 		timeout, err := time.ParseDuration(GlobalOptions.KvStoreTimeout)
@@ -384,7 +306,24 @@
 		Error.Fatalf("Cannot convert msgSize %s to bytes", GlobalConfig.Grpc.MaxCallRecvMsgSize)
 	}
 
-	return grpc.Dial(GlobalConfig.Server, grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(int(n))))
+	var opts []grpc.DialOption
+
+	opts = append(opts,
+		grpc.WithDisableRetry(),
+		grpc.WithBlock(),
+		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(int(n))))
+
+	if GlobalConfig.Tls.UseTls {
+		creds := credentials.NewTLS(&tls.Config{
+			InsecureSkipVerify: !GlobalConfig.Tls.Verify})
+		opts = append(opts, grpc.WithTransportCredentials(creds))
+	} else {
+		opts = append(opts, grpc.WithInsecure())
+	}
+	ctx, cancel := context.WithTimeout(context.TODO(),
+		GlobalConfig.Grpc.ConnectTimeout)
+	defer cancel()
+	return grpc.DialContext(ctx, GlobalConfig.Server, opts...)
 }
 
 func ConvertJsonProtobufArray(data_in interface{}) (string, error) {
diff --git a/internal/pkg/commands/command_test.go b/internal/pkg/commands/command_test.go
index 68dd0a4..e0bd4bd 100644
--- a/internal/pkg/commands/command_test.go
+++ b/internal/pkg/commands/command_test.go
@@ -16,11 +16,12 @@
 package commands
 
 import (
-	flags "github.com/jessevdk/go-flags"
-	"github.com/stretchr/testify/assert"
 	"os"
 	"path"
 	"testing"
+
+	flags "github.com/jessevdk/go-flags"
+	"github.com/stretchr/testify/assert"
 )
 
 // Test that ProcessGlobalOptions does not interfere with GlobalConfig
@@ -39,58 +40,6 @@
 	assert.Equal(t, "localhost:55555", GlobalConfig.Server, "wrong default hostname for server")
 }
 
-func TestSplitHostPort(t *testing.T) {
-	data := []struct {
-		name        string
-		endpoint    string
-		defaultHost string
-		defaultPort int
-		host        string
-		port        int
-		err         bool
-	}{
-		{"Host and port specified", "host:1234", "default", 4321, "host", 1234, false},
-		{"Host only specified", "host", "default", 4321, "host", 4321, false},
-		{"Host: only specified", "host:", "default", 4321, "host", 4321, false},
-		{"Port only specified", ":1234", "default", 4321, "default", 1234, false},
-		{"Colon only", ":", "default", 4321, "default", 4321, false},
-		{"Empty endpoint", "", "default", 4321, "default", 4321, false},
-		{"IPv4 and port specified", "1.2.3.4:1234", "4.3.2.1", 4321, "1.2.3.4", 1234, false},
-		{"IPv4 only specified", "1.2.3.4", "4.3.2.1", 4321, "1.2.3.4", 4321, false},
-		{"IPv4: only specified", "1.2.3.4:", "4.3.2.1", 4321, "1.2.3.4", 4321, false},
-		{"IPv4 Port only specified", ":1234", "4.3.2.1", 4321, "4.3.2.1", 1234, false},
-		{"IPv4 Colon only", ":", "4.3.2.1", 4321, "4.3.2.1", 4321, false},
-		{"IPv4 Empty endpoint", "", "4.3.2.1", 4321, "4.3.2.1", 4321, false},
-		{"IPv6 and port specified", "[0001:c0ff:eec0::::ffff]:1234", "0001:c0ff:eec0::::aaaa", 4321, "0001:c0ff:eec0::::ffff", 1234, false},
-		{"IPv6 only specified", "[0001:c0ff:eec0::::ffff]", "0001:c0ff:eec0::::aaaa", 4321, "0001:c0ff:eec0::::ffff", 4321, false},
-		{"IPv6: only specified", "[0001:c0ff:eec0::::ffff]:", "0001:c0ff:eec0::::aaaa", 4321, "0001:c0ff:eec0::::ffff", 4321, false},
-		{"IPv6 Port only specified", ":1234", "0001:c0ff:eec0::::aaaa", 4321, "0001:c0ff:eec0::::aaaa", 1234, false},
-		{"IPv6 Colon only", ":", "0001:c0ff:eec0::::aaaa", 4321, "0001:c0ff:eec0::::aaaa", 4321, false},
-		{"IPv6 Empty endpoint", "", "0001:c0ff:eec0::::aaaa", 4321, "0001:c0ff:eec0::::aaaa", 4321, false},
-		{"Invalid port", "host:1b", "default", 4321, "", 0, true},
-		{"Too many colons", "ho:st:1b", "default", 4321, "", 0, true},
-		{"IPv4 Invalid port", "1.2.3.4:1b", "4.3.2.1", 4321, "", 0, true},
-		{"IPv4 Too many colons", "1.2.3.4::1234", "4.3.2.1", 4321, "", 0, true},
-		{"IPv6 Invalid port", "[0001:c0ff:eec0::::ffff]:1b", "0001:c0ff:eec0::::aaaa", 4321, "", 0, true},
-		{"IPv6 Too many colons", "0001:c0ff:eec0::::ffff:1234", "0001:c0ff:eec0::::aaaa", 4321, "", 0, true},
-	}
-
-	for _, args := range data {
-		t.Run(args.name, func(t *testing.T) {
-			h, p, err := splitEndpoint(args.endpoint, args.defaultHost, args.defaultPort)
-			if args.err {
-				assert.NotNil(t, err, "unexpected non-error result")
-			} else {
-				assert.Nil(t, err, "unexpected error result")
-			}
-			if !args.err && err == nil {
-				assert.Equal(t, args.host, h, "unexpected host value")
-				assert.Equal(t, args.port, p, "unexpected port value")
-			}
-		})
-	}
-}
-
 func TestParseSize(t *testing.T) {
 	var res uint64
 	var err error
diff --git a/internal/pkg/commands/config.go b/internal/pkg/commands/config.go
index 3ba4118..59a1df1 100644
--- a/internal/pkg/commands/config.go
+++ b/internal/pkg/commands/config.go
@@ -17,12 +17,12 @@
 
 import (
 	"fmt"
+
 	flags "github.com/jessevdk/go-flags"
-	"gopkg.in/yaml.v2"
+	yaml "gopkg.in/yaml.v2"
 )
 
-const copyrightNotice = `
-# Copyright 2019-present Ciena Corporation
+const copyrightNotice = `# Copyright 2021-present Ciena Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,9 +34,7 @@
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
-# limitations under the License.
-#
-`
+# limitations under the License.`
 
 type CommandOptionsDump struct{}
 
diff --git a/internal/pkg/commands/log.go b/internal/pkg/commands/log.go
index 77d97e9..a1110b4 100644
--- a/internal/pkg/commands/log.go
+++ b/internal/pkg/commands/log.go
@@ -17,11 +17,10 @@
 
 import (
 	"context"
+	"crypto/tls"
 	"encoding/json"
 	"errors"
 	"fmt"
-	"net"
-	"strconv"
 	"strings"
 
 	flags "github.com/jessevdk/go-flags"
@@ -30,6 +29,7 @@
 	"github.com/opencord/voltha-lib-go/v4/pkg/config"
 	"github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore"
 	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	v3Client "go.etcd.io/etcd/clientv3"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/tools/clientcmd"
@@ -250,14 +250,24 @@
 }
 
 func constructConfigManager(ctx context.Context) (*config.ConfigManager, func(), error) {
-	client, err := kvstore.NewEtcdClient(ctx, GlobalConfig.KvStore, GlobalConfig.KvStoreConfig.Timeout, log.FatalLevel)
+	var tlsConfig *tls.Config
+	if GlobalConfig.Tls.UseTls {
+		tlsConfig = &tls.Config{InsecureSkipVerify: !GlobalConfig.Tls.Verify}
+	}
+	logconfig := log.ConstructZapConfig(log.JSON, log.FatalLevel, log.Fields{})
+	client, err := kvstore.NewEtcdCustomClient(
+		ctx,
+		&v3Client.Config{
+			Endpoints:   []string{GlobalConfig.KvStore},
+			DialTimeout: GlobalConfig.KvStoreConfig.Timeout,
+			LogConfig:   &logconfig,
+			TLS:         tlsConfig,
+		})
 	if err != nil {
 		return nil, nil, fmt.Errorf("Unable to create kvstore client %s", err)
 	}
 
-	// Already error checked during option processing
-	host, port, _ := splitEndpoint(GlobalConfig.KvStore, defaultKvHost, defaultKvPort)
-	cm := config.NewConfigManager(ctx, client, supportedKvStoreType, net.JoinHostPort(host, strconv.Itoa(port)), GlobalConfig.KvStoreConfig.Timeout)
+	cm := config.NewConfigManager(ctx, client, supportedKvStoreType, GlobalConfig.KvStore, GlobalConfig.KvStoreConfig.Timeout)
 	return cm, func() { client.Close(ctx) }, nil
 }
 
@@ -685,8 +695,7 @@
 	if len(options.Args.Component) == 0 {
 		componentList, err = cm.RetrieveComponentList(ctx, config.ConfigTypeLogLevel)
 		if err != nil {
-			host, port, _ := splitEndpoint(GlobalConfig.KvStore, defaultKvHost, defaultKvPort)
-			return fmt.Errorf("Unable to retrieve list of voltha components : %s \nIs ETCD available at %s:%d?", err, host, port)
+			return fmt.Errorf("Unable to retrieve list of voltha components : %s \nIs ETCD available at %s?", err, GlobalConfig.KvStore)
 		}
 	} else {
 		componentList = toStringArray(options.Args.Component)
diff --git a/internal/pkg/commands/version.go b/internal/pkg/commands/version.go
index 8856ae1..db47ed8 100644
--- a/internal/pkg/commands/version.go
+++ b/internal/pkg/commands/version.go
@@ -18,12 +18,13 @@
 import (
 	"context"
 	"encoding/json"
+	"strings"
+
 	"github.com/golang/protobuf/ptypes/empty"
 	flags "github.com/jessevdk/go-flags"
 	"github.com/opencord/voltctl/internal/pkg/cli/version"
 	"github.com/opencord/voltctl/pkg/format"
 	"github.com/opencord/voltha-protos/v4/go/voltha"
-	"strings"
 )
 
 type VersionDetails struct {
@@ -140,7 +141,7 @@
 
 	voltha, err := client.GetVoltha(ctx, &empty.Empty{})
 	if err != nil {
-		return nil
+		return err
 	}
 
 	info := make(map[string]interface{})
diff --git a/vendor/github.com/armon/go-metrics/.gitignore b/vendor/github.com/armon/go-metrics/.gitignore
deleted file mode 100644
index 8c03ec1..0000000
--- a/vendor/github.com/armon/go-metrics/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-
-/metrics.out
diff --git a/vendor/github.com/armon/go-metrics/.travis.yml b/vendor/github.com/armon/go-metrics/.travis.yml
deleted file mode 100644
index 87d230c..0000000
--- a/vendor/github.com/armon/go-metrics/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: go
-
-go:
-  - "1.x"
-
-env:
-  - GO111MODULE=on
-
-install:
-  - go get ./...
-
-script:
-  - go test ./...
diff --git a/vendor/github.com/armon/go-metrics/LICENSE b/vendor/github.com/armon/go-metrics/LICENSE
deleted file mode 100644
index 106569e..0000000
--- a/vendor/github.com/armon/go-metrics/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Armon Dadgar
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/armon/go-metrics/README.md b/vendor/github.com/armon/go-metrics/README.md
deleted file mode 100644
index aa73348..0000000
--- a/vendor/github.com/armon/go-metrics/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-go-metrics
-==========
-
-This library provides a `metrics` package which can be used to instrument code,
-expose application metrics, and profile runtime performance in a flexible manner.
-
-Current API: [![GoDoc](https://godoc.org/github.com/armon/go-metrics?status.svg)](https://godoc.org/github.com/armon/go-metrics)
-
-Sinks
------
-
-The `metrics` package makes use of a `MetricSink` interface to support delivery
-to any type of backend. Currently the following sinks are provided:
-
-* StatsiteSink : Sinks to a [statsite](https://github.com/armon/statsite/) instance (TCP)
-* StatsdSink: Sinks to a [StatsD](https://github.com/etsy/statsd/) / statsite instance (UDP)
-* PrometheusSink: Sinks to a [Prometheus](http://prometheus.io/) metrics endpoint (exposed via HTTP for scrapes)
-* InmemSink : Provides in-memory aggregation, can be used to export stats
-* FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example.
-* BlackholeSink : Sinks to nowhere
-
-In addition to the sinks, the `InmemSignal` can be used to catch a signal,
-and dump a formatted output of recent metrics. For example, when a process gets
-a SIGUSR1, it can dump to stderr recent performance metrics for debugging.
-
-Labels
-------
-
-Most metrics do have an equivalent ending with `WithLabels`, such methods
-allow to push metrics with labels and use some features of underlying Sinks
-(ex: translated into Prometheus labels).
-
-Since some of these labels may increase greatly cardinality of metrics, the
-library allow to filter labels using a blacklist/whitelist filtering system
-which is global to all metrics.
-
-* If `Config.AllowedLabels` is not nil, then only labels specified in this value will be sent to underlying Sink, otherwise, all labels are sent by default.
-* If `Config.BlockedLabels` is not nil, any label specified in this value will not be sent to underlying Sinks.
-
-By default, both `Config.AllowedLabels` and `Config.BlockedLabels` are nil, meaning that
-no tags are filetered at all, but it allow to a user to globally block some tags with high
-cardinality at application level.
-
-Examples
---------
-
-Here is an example of using the package:
-
-```go
-func SlowMethod() {
-    // Profiling the runtime of a method
-    defer metrics.MeasureSince([]string{"SlowMethod"}, time.Now())
-}
-
-// Configure a statsite sink as the global metrics sink
-sink, _ := metrics.NewStatsiteSink("statsite:8125")
-metrics.NewGlobal(metrics.DefaultConfig("service-name"), sink)
-
-// Emit a Key/Value pair
-metrics.EmitKey([]string{"questions", "meaning of life"}, 42)
-```
-
-Here is an example of setting up a signal handler:
-
-```go
-// Setup the inmem sink and signal handler
-inm := metrics.NewInmemSink(10*time.Second, time.Minute)
-sig := metrics.DefaultInmemSignal(inm)
-metrics.NewGlobal(metrics.DefaultConfig("service-name"), inm)
-
-// Run some code
-inm.SetGauge([]string{"foo"}, 42)
-inm.EmitKey([]string{"bar"}, 30)
-
-inm.IncrCounter([]string{"baz"}, 42)
-inm.IncrCounter([]string{"baz"}, 1)
-inm.IncrCounter([]string{"baz"}, 80)
-
-inm.AddSample([]string{"method", "wow"}, 42)
-inm.AddSample([]string{"method", "wow"}, 100)
-inm.AddSample([]string{"method", "wow"}, 22)
-
-....
-```
-
-When a signal comes in, output like the following will be dumped to stderr:
-
-    [2014-01-28 14:57:33.04 -0800 PST][G] 'foo': 42.000
-    [2014-01-28 14:57:33.04 -0800 PST][P] 'bar': 30.000
-    [2014-01-28 14:57:33.04 -0800 PST][C] 'baz': Count: 3 Min: 1.000 Mean: 41.000 Max: 80.000 Stddev: 39.509
-    [2014-01-28 14:57:33.04 -0800 PST][S] 'method.wow': Count: 3 Min: 22.000 Mean: 54.667 Max: 100.000 Stddev: 40.513
\ No newline at end of file
diff --git a/vendor/github.com/armon/go-metrics/const_unix.go b/vendor/github.com/armon/go-metrics/const_unix.go
deleted file mode 100644
index 31098dd..0000000
--- a/vendor/github.com/armon/go-metrics/const_unix.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build !windows
-
-package metrics
-
-import (
-	"syscall"
-)
-
-const (
-	// DefaultSignal is used with DefaultInmemSignal
-	DefaultSignal = syscall.SIGUSR1
-)
diff --git a/vendor/github.com/armon/go-metrics/const_windows.go b/vendor/github.com/armon/go-metrics/const_windows.go
deleted file mode 100644
index 38136af..0000000
--- a/vendor/github.com/armon/go-metrics/const_windows.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build windows
-
-package metrics
-
-import (
-	"syscall"
-)
-
-const (
-	// DefaultSignal is used with DefaultInmemSignal
-	// Windows has no SIGUSR1, use SIGBREAK
-	DefaultSignal = syscall.Signal(21)
-)
diff --git a/vendor/github.com/armon/go-metrics/go.mod b/vendor/github.com/armon/go-metrics/go.mod
deleted file mode 100644
index 88e1e98..0000000
--- a/vendor/github.com/armon/go-metrics/go.mod
+++ /dev/null
@@ -1,16 +0,0 @@
-module github.com/armon/go-metrics
-
-go 1.12
-
-require (
-	github.com/DataDog/datadog-go v2.2.0+incompatible
-	github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible
-	github.com/circonus-labs/circonusllhist v0.1.3 // indirect
-	github.com/hashicorp/go-immutable-radix v1.0.0
-	github.com/hashicorp/go-retryablehttp v0.5.3 // indirect
-	github.com/pascaldekloe/goe v0.1.0
-	github.com/pkg/errors v0.8.1 // indirect
-	github.com/prometheus/client_golang v0.9.2
-	github.com/stretchr/testify v1.3.0 // indirect
-	github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 // indirect
-)
diff --git a/vendor/github.com/armon/go-metrics/go.sum b/vendor/github.com/armon/go-metrics/go.sum
deleted file mode 100644
index 5ffd832..0000000
--- a/vendor/github.com/armon/go-metrics/go.sum
+++ /dev/null
@@ -1,46 +0,0 @@
-github.com/DataDog/datadog-go v2.2.0+incompatible h1:V5BKkxACZLjzHjSgBbr2gvLA2Ae49yhc6CSY7MLy5k4=
-github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY=
-github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
-github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA=
-github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig=
-github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=
-github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s=
-github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
-github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
-github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
-github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8=
-github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
-github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE=
-github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8=
-github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
diff --git a/vendor/github.com/armon/go-metrics/inmem.go b/vendor/github.com/armon/go-metrics/inmem.go
deleted file mode 100644
index 93b0e0a..0000000
--- a/vendor/github.com/armon/go-metrics/inmem.go
+++ /dev/null
@@ -1,348 +0,0 @@
-package metrics
-
-import (
-	"bytes"
-	"fmt"
-	"math"
-	"net/url"
-	"strings"
-	"sync"
-	"time"
-)
-
-// InmemSink provides a MetricSink that does in-memory aggregation
-// without sending metrics over a network. It can be embedded within
-// an application to provide profiling information.
-type InmemSink struct {
-	// How long is each aggregation interval
-	interval time.Duration
-
-	// Retain controls how many metrics interval we keep
-	retain time.Duration
-
-	// maxIntervals is the maximum length of intervals.
-	// It is retain / interval.
-	maxIntervals int
-
-	// intervals is a slice of the retained intervals
-	intervals    []*IntervalMetrics
-	intervalLock sync.RWMutex
-
-	rateDenom float64
-}
-
-// IntervalMetrics stores the aggregated metrics
-// for a specific interval
-type IntervalMetrics struct {
-	sync.RWMutex
-
-	// The start time of the interval
-	Interval time.Time
-
-	// Gauges maps the key to the last set value
-	Gauges map[string]GaugeValue
-
-	// Points maps the string to the list of emitted values
-	// from EmitKey
-	Points map[string][]float32
-
-	// Counters maps the string key to a sum of the counter
-	// values
-	Counters map[string]SampledValue
-
-	// Samples maps the key to an AggregateSample,
-	// which has the rolled up view of a sample
-	Samples map[string]SampledValue
-}
-
-// NewIntervalMetrics creates a new IntervalMetrics for a given interval
-func NewIntervalMetrics(intv time.Time) *IntervalMetrics {
-	return &IntervalMetrics{
-		Interval: intv,
-		Gauges:   make(map[string]GaugeValue),
-		Points:   make(map[string][]float32),
-		Counters: make(map[string]SampledValue),
-		Samples:  make(map[string]SampledValue),
-	}
-}
-
-// AggregateSample is used to hold aggregate metrics
-// about a sample
-type AggregateSample struct {
-	Count       int       // The count of emitted pairs
-	Rate        float64   // The values rate per time unit (usually 1 second)
-	Sum         float64   // The sum of values
-	SumSq       float64   `json:"-"` // The sum of squared values
-	Min         float64   // Minimum value
-	Max         float64   // Maximum value
-	LastUpdated time.Time `json:"-"` // When value was last updated
-}
-
-// Computes a Stddev of the values
-func (a *AggregateSample) Stddev() float64 {
-	num := (float64(a.Count) * a.SumSq) - math.Pow(a.Sum, 2)
-	div := float64(a.Count * (a.Count - 1))
-	if div == 0 {
-		return 0
-	}
-	return math.Sqrt(num / div)
-}
-
-// Computes a mean of the values
-func (a *AggregateSample) Mean() float64 {
-	if a.Count == 0 {
-		return 0
-	}
-	return a.Sum / float64(a.Count)
-}
-
-// Ingest is used to update a sample
-func (a *AggregateSample) Ingest(v float64, rateDenom float64) {
-	a.Count++
-	a.Sum += v
-	a.SumSq += (v * v)
-	if v < a.Min || a.Count == 1 {
-		a.Min = v
-	}
-	if v > a.Max || a.Count == 1 {
-		a.Max = v
-	}
-	a.Rate = float64(a.Sum) / rateDenom
-	a.LastUpdated = time.Now()
-}
-
-func (a *AggregateSample) String() string {
-	if a.Count == 0 {
-		return "Count: 0"
-	} else if a.Stddev() == 0 {
-		return fmt.Sprintf("Count: %d Sum: %0.3f LastUpdated: %s", a.Count, a.Sum, a.LastUpdated)
-	} else {
-		return fmt.Sprintf("Count: %d Min: %0.3f Mean: %0.3f Max: %0.3f Stddev: %0.3f Sum: %0.3f LastUpdated: %s",
-			a.Count, a.Min, a.Mean(), a.Max, a.Stddev(), a.Sum, a.LastUpdated)
-	}
-}
-
-// NewInmemSinkFromURL creates an InmemSink from a URL. It is used
-// (and tested) from NewMetricSinkFromURL.
-func NewInmemSinkFromURL(u *url.URL) (MetricSink, error) {
-	params := u.Query()
-
-	interval, err := time.ParseDuration(params.Get("interval"))
-	if err != nil {
-		return nil, fmt.Errorf("Bad 'interval' param: %s", err)
-	}
-
-	retain, err := time.ParseDuration(params.Get("retain"))
-	if err != nil {
-		return nil, fmt.Errorf("Bad 'retain' param: %s", err)
-	}
-
-	return NewInmemSink(interval, retain), nil
-}
-
-// NewInmemSink is used to construct a new in-memory sink.
-// Uses an aggregation interval and maximum retention period.
-func NewInmemSink(interval, retain time.Duration) *InmemSink {
-	rateTimeUnit := time.Second
-	i := &InmemSink{
-		interval:     interval,
-		retain:       retain,
-		maxIntervals: int(retain / interval),
-		rateDenom:    float64(interval.Nanoseconds()) / float64(rateTimeUnit.Nanoseconds()),
-	}
-	i.intervals = make([]*IntervalMetrics, 0, i.maxIntervals)
-	return i
-}
-
-func (i *InmemSink) SetGauge(key []string, val float32) {
-	i.SetGaugeWithLabels(key, val, nil)
-}
-
-func (i *InmemSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {
-	k, name := i.flattenKeyLabels(key, labels)
-	intv := i.getInterval()
-
-	intv.Lock()
-	defer intv.Unlock()
-	intv.Gauges[k] = GaugeValue{Name: name, Value: val, Labels: labels}
-}
-
-func (i *InmemSink) EmitKey(key []string, val float32) {
-	k := i.flattenKey(key)
-	intv := i.getInterval()
-
-	intv.Lock()
-	defer intv.Unlock()
-	vals := intv.Points[k]
-	intv.Points[k] = append(vals, val)
-}
-
-func (i *InmemSink) IncrCounter(key []string, val float32) {
-	i.IncrCounterWithLabels(key, val, nil)
-}
-
-func (i *InmemSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {
-	k, name := i.flattenKeyLabels(key, labels)
-	intv := i.getInterval()
-
-	intv.Lock()
-	defer intv.Unlock()
-
-	agg, ok := intv.Counters[k]
-	if !ok {
-		agg = SampledValue{
-			Name:            name,
-			AggregateSample: &AggregateSample{},
-			Labels:          labels,
-		}
-		intv.Counters[k] = agg
-	}
-	agg.Ingest(float64(val), i.rateDenom)
-}
-
-func (i *InmemSink) AddSample(key []string, val float32) {
-	i.AddSampleWithLabels(key, val, nil)
-}
-
-func (i *InmemSink) AddSampleWithLabels(key []string, val float32, labels []Label) {
-	k, name := i.flattenKeyLabels(key, labels)
-	intv := i.getInterval()
-
-	intv.Lock()
-	defer intv.Unlock()
-
-	agg, ok := intv.Samples[k]
-	if !ok {
-		agg = SampledValue{
-			Name:            name,
-			AggregateSample: &AggregateSample{},
-			Labels:          labels,
-		}
-		intv.Samples[k] = agg
-	}
-	agg.Ingest(float64(val), i.rateDenom)
-}
-
-// Data is used to retrieve all the aggregated metrics
-// Intervals may be in use, and a read lock should be acquired
-func (i *InmemSink) Data() []*IntervalMetrics {
-	// Get the current interval, forces creation
-	i.getInterval()
-
-	i.intervalLock.RLock()
-	defer i.intervalLock.RUnlock()
-
-	n := len(i.intervals)
-	intervals := make([]*IntervalMetrics, n)
-
-	copy(intervals[:n-1], i.intervals[:n-1])
-	current := i.intervals[n-1]
-
-	// make its own copy for current interval
-	intervals[n-1] = &IntervalMetrics{}
-	copyCurrent := intervals[n-1]
-	current.RLock()
-	*copyCurrent = *current
-
-	copyCurrent.Gauges = make(map[string]GaugeValue, len(current.Gauges))
-	for k, v := range current.Gauges {
-		copyCurrent.Gauges[k] = v
-	}
-	// saved values will be not change, just copy its link
-	copyCurrent.Points = make(map[string][]float32, len(current.Points))
-	for k, v := range current.Points {
-		copyCurrent.Points[k] = v
-	}
-	copyCurrent.Counters = make(map[string]SampledValue, len(current.Counters))
-	for k, v := range current.Counters {
-		copyCurrent.Counters[k] = v.deepCopy()
-	}
-	copyCurrent.Samples = make(map[string]SampledValue, len(current.Samples))
-	for k, v := range current.Samples {
-		copyCurrent.Samples[k] = v.deepCopy()
-	}
-	current.RUnlock()
-
-	return intervals
-}
-
-func (i *InmemSink) getExistingInterval(intv time.Time) *IntervalMetrics {
-	i.intervalLock.RLock()
-	defer i.intervalLock.RUnlock()
-
-	n := len(i.intervals)
-	if n > 0 && i.intervals[n-1].Interval == intv {
-		return i.intervals[n-1]
-	}
-	return nil
-}
-
-func (i *InmemSink) createInterval(intv time.Time) *IntervalMetrics {
-	i.intervalLock.Lock()
-	defer i.intervalLock.Unlock()
-
-	// Check for an existing interval
-	n := len(i.intervals)
-	if n > 0 && i.intervals[n-1].Interval == intv {
-		return i.intervals[n-1]
-	}
-
-	// Add the current interval
-	current := NewIntervalMetrics(intv)
-	i.intervals = append(i.intervals, current)
-	n++
-
-	// Truncate the intervals if they are too long
-	if n >= i.maxIntervals {
-		copy(i.intervals[0:], i.intervals[n-i.maxIntervals:])
-		i.intervals = i.intervals[:i.maxIntervals]
-	}
-	return current
-}
-
-// getInterval returns the current interval to write to
-func (i *InmemSink) getInterval() *IntervalMetrics {
-	intv := time.Now().Truncate(i.interval)
-	if m := i.getExistingInterval(intv); m != nil {
-		return m
-	}
-	return i.createInterval(intv)
-}
-
-// Flattens the key for formatting, removes spaces
-func (i *InmemSink) flattenKey(parts []string) string {
-	buf := &bytes.Buffer{}
-	replacer := strings.NewReplacer(" ", "_")
-
-	if len(parts) > 0 {
-		replacer.WriteString(buf, parts[0])
-	}
-	for _, part := range parts[1:] {
-		replacer.WriteString(buf, ".")
-		replacer.WriteString(buf, part)
-	}
-
-	return buf.String()
-}
-
-// Flattens the key for formatting along with its labels, removes spaces
-func (i *InmemSink) flattenKeyLabels(parts []string, labels []Label) (string, string) {
-	buf := &bytes.Buffer{}
-	replacer := strings.NewReplacer(" ", "_")
-
-	if len(parts) > 0 {
-		replacer.WriteString(buf, parts[0])
-	}
-	for _, part := range parts[1:] {
-		replacer.WriteString(buf, ".")
-		replacer.WriteString(buf, part)
-	}
-
-	key := buf.String()
-
-	for _, label := range labels {
-		replacer.WriteString(buf, fmt.Sprintf(";%s=%s", label.Name, label.Value))
-	}
-
-	return buf.String(), key
-}
diff --git a/vendor/github.com/armon/go-metrics/inmem_endpoint.go b/vendor/github.com/armon/go-metrics/inmem_endpoint.go
deleted file mode 100644
index 5fac958..0000000
--- a/vendor/github.com/armon/go-metrics/inmem_endpoint.go
+++ /dev/null
@@ -1,131 +0,0 @@
-package metrics
-
-import (
-	"fmt"
-	"net/http"
-	"sort"
-	"time"
-)
-
-// MetricsSummary holds a roll-up of metrics info for a given interval
-type MetricsSummary struct {
-	Timestamp string
-	Gauges    []GaugeValue
-	Points    []PointValue
-	Counters  []SampledValue
-	Samples   []SampledValue
-}
-
-type GaugeValue struct {
-	Name  string
-	Hash  string `json:"-"`
-	Value float32
-
-	Labels        []Label           `json:"-"`
-	DisplayLabels map[string]string `json:"Labels"`
-}
-
-type PointValue struct {
-	Name   string
-	Points []float32
-}
-
-type SampledValue struct {
-	Name string
-	Hash string `json:"-"`
-	*AggregateSample
-	Mean   float64
-	Stddev float64
-
-	Labels        []Label           `json:"-"`
-	DisplayLabels map[string]string `json:"Labels"`
-}
-
-// deepCopy allocates a new instance of AggregateSample
-func (source *SampledValue) deepCopy() SampledValue {
-	dest := *source
-	if source.AggregateSample != nil {
-		dest.AggregateSample = &AggregateSample{}
-		*dest.AggregateSample = *source.AggregateSample
-	}
-	return dest
-}
-
-// DisplayMetrics returns a summary of the metrics from the most recent finished interval.
-func (i *InmemSink) DisplayMetrics(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
-	data := i.Data()
-
-	var interval *IntervalMetrics
-	n := len(data)
-	switch {
-	case n == 0:
-		return nil, fmt.Errorf("no metric intervals have been initialized yet")
-	case n == 1:
-		// Show the current interval if it's all we have
-		interval = data[0]
-	default:
-		// Show the most recent finished interval if we have one
-		interval = data[n-2]
-	}
-
-	interval.RLock()
-	defer interval.RUnlock()
-
-	summary := MetricsSummary{
-		Timestamp: interval.Interval.Round(time.Second).UTC().String(),
-		Gauges:    make([]GaugeValue, 0, len(interval.Gauges)),
-		Points:    make([]PointValue, 0, len(interval.Points)),
-	}
-
-	// Format and sort the output of each metric type, so it gets displayed in a
-	// deterministic order.
-	for name, points := range interval.Points {
-		summary.Points = append(summary.Points, PointValue{name, points})
-	}
-	sort.Slice(summary.Points, func(i, j int) bool {
-		return summary.Points[i].Name < summary.Points[j].Name
-	})
-
-	for hash, value := range interval.Gauges {
-		value.Hash = hash
-		value.DisplayLabels = make(map[string]string)
-		for _, label := range value.Labels {
-			value.DisplayLabels[label.Name] = label.Value
-		}
-		value.Labels = nil
-
-		summary.Gauges = append(summary.Gauges, value)
-	}
-	sort.Slice(summary.Gauges, func(i, j int) bool {
-		return summary.Gauges[i].Hash < summary.Gauges[j].Hash
-	})
-
-	summary.Counters = formatSamples(interval.Counters)
-	summary.Samples = formatSamples(interval.Samples)
-
-	return summary, nil
-}
-
-func formatSamples(source map[string]SampledValue) []SampledValue {
-	output := make([]SampledValue, 0, len(source))
-	for hash, sample := range source {
-		displayLabels := make(map[string]string)
-		for _, label := range sample.Labels {
-			displayLabels[label.Name] = label.Value
-		}
-
-		output = append(output, SampledValue{
-			Name:            sample.Name,
-			Hash:            hash,
-			AggregateSample: sample.AggregateSample,
-			Mean:            sample.AggregateSample.Mean(),
-			Stddev:          sample.AggregateSample.Stddev(),
-			DisplayLabels:   displayLabels,
-		})
-	}
-	sort.Slice(output, func(i, j int) bool {
-		return output[i].Hash < output[j].Hash
-	})
-
-	return output
-}
diff --git a/vendor/github.com/armon/go-metrics/inmem_signal.go b/vendor/github.com/armon/go-metrics/inmem_signal.go
deleted file mode 100644
index 0937f4a..0000000
--- a/vendor/github.com/armon/go-metrics/inmem_signal.go
+++ /dev/null
@@ -1,117 +0,0 @@
-package metrics
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"os"
-	"os/signal"
-	"strings"
-	"sync"
-	"syscall"
-)
-
-// InmemSignal is used to listen for a given signal, and when received,
-// to dump the current metrics from the InmemSink to an io.Writer
-type InmemSignal struct {
-	signal syscall.Signal
-	inm    *InmemSink
-	w      io.Writer
-	sigCh  chan os.Signal
-
-	stop     bool
-	stopCh   chan struct{}
-	stopLock sync.Mutex
-}
-
-// NewInmemSignal creates a new InmemSignal which listens for a given signal,
-// and dumps the current metrics out to a writer
-func NewInmemSignal(inmem *InmemSink, sig syscall.Signal, w io.Writer) *InmemSignal {
-	i := &InmemSignal{
-		signal: sig,
-		inm:    inmem,
-		w:      w,
-		sigCh:  make(chan os.Signal, 1),
-		stopCh: make(chan struct{}),
-	}
-	signal.Notify(i.sigCh, sig)
-	go i.run()
-	return i
-}
-
-// DefaultInmemSignal returns a new InmemSignal that responds to SIGUSR1
-// and writes output to stderr. Windows uses SIGBREAK
-func DefaultInmemSignal(inmem *InmemSink) *InmemSignal {
-	return NewInmemSignal(inmem, DefaultSignal, os.Stderr)
-}
-
-// Stop is used to stop the InmemSignal from listening
-func (i *InmemSignal) Stop() {
-	i.stopLock.Lock()
-	defer i.stopLock.Unlock()
-
-	if i.stop {
-		return
-	}
-	i.stop = true
-	close(i.stopCh)
-	signal.Stop(i.sigCh)
-}
-
-// run is a long running routine that handles signals
-func (i *InmemSignal) run() {
-	for {
-		select {
-		case <-i.sigCh:
-			i.dumpStats()
-		case <-i.stopCh:
-			return
-		}
-	}
-}
-
-// dumpStats is used to dump the data to output writer
-func (i *InmemSignal) dumpStats() {
-	buf := bytes.NewBuffer(nil)
-
-	data := i.inm.Data()
-	// Skip the last period which is still being aggregated
-	for j := 0; j < len(data)-1; j++ {
-		intv := data[j]
-		intv.RLock()
-		for _, val := range intv.Gauges {
-			name := i.flattenLabels(val.Name, val.Labels)
-			fmt.Fprintf(buf, "[%v][G] '%s': %0.3f\n", intv.Interval, name, val.Value)
-		}
-		for name, vals := range intv.Points {
-			for _, val := range vals {
-				fmt.Fprintf(buf, "[%v][P] '%s': %0.3f\n", intv.Interval, name, val)
-			}
-		}
-		for _, agg := range intv.Counters {
-			name := i.flattenLabels(agg.Name, agg.Labels)
-			fmt.Fprintf(buf, "[%v][C] '%s': %s\n", intv.Interval, name, agg.AggregateSample)
-		}
-		for _, agg := range intv.Samples {
-			name := i.flattenLabels(agg.Name, agg.Labels)
-			fmt.Fprintf(buf, "[%v][S] '%s': %s\n", intv.Interval, name, agg.AggregateSample)
-		}
-		intv.RUnlock()
-	}
-
-	// Write out the bytes
-	i.w.Write(buf.Bytes())
-}
-
-// Flattens the key for formatting along with its labels, removes spaces
-func (i *InmemSignal) flattenLabels(name string, labels []Label) string {
-	buf := bytes.NewBufferString(name)
-	replacer := strings.NewReplacer(" ", "_", ":", "_")
-
-	for _, label := range labels {
-		replacer.WriteString(buf, ".")
-		replacer.WriteString(buf, label.Value)
-	}
-
-	return buf.String()
-}
diff --git a/vendor/github.com/armon/go-metrics/metrics.go b/vendor/github.com/armon/go-metrics/metrics.go
deleted file mode 100644
index 4920d68..0000000
--- a/vendor/github.com/armon/go-metrics/metrics.go
+++ /dev/null
@@ -1,278 +0,0 @@
-package metrics
-
-import (
-	"runtime"
-	"strings"
-	"time"
-
-	"github.com/hashicorp/go-immutable-radix"
-)
-
-type Label struct {
-	Name  string
-	Value string
-}
-
-func (m *Metrics) SetGauge(key []string, val float32) {
-	m.SetGaugeWithLabels(key, val, nil)
-}
-
-func (m *Metrics) SetGaugeWithLabels(key []string, val float32, labels []Label) {
-	if m.HostName != "" {
-		if m.EnableHostnameLabel {
-			labels = append(labels, Label{"host", m.HostName})
-		} else if m.EnableHostname {
-			key = insert(0, m.HostName, key)
-		}
-	}
-	if m.EnableTypePrefix {
-		key = insert(0, "gauge", key)
-	}
-	if m.ServiceName != "" {
-		if m.EnableServiceLabel {
-			labels = append(labels, Label{"service", m.ServiceName})
-		} else {
-			key = insert(0, m.ServiceName, key)
-		}
-	}
-	allowed, labelsFiltered := m.allowMetric(key, labels)
-	if !allowed {
-		return
-	}
-	m.sink.SetGaugeWithLabels(key, val, labelsFiltered)
-}
-
-func (m *Metrics) EmitKey(key []string, val float32) {
-	if m.EnableTypePrefix {
-		key = insert(0, "kv", key)
-	}
-	if m.ServiceName != "" {
-		key = insert(0, m.ServiceName, key)
-	}
-	allowed, _ := m.allowMetric(key, nil)
-	if !allowed {
-		return
-	}
-	m.sink.EmitKey(key, val)
-}
-
-func (m *Metrics) IncrCounter(key []string, val float32) {
-	m.IncrCounterWithLabels(key, val, nil)
-}
-
-func (m *Metrics) IncrCounterWithLabels(key []string, val float32, labels []Label) {
-	if m.HostName != "" && m.EnableHostnameLabel {
-		labels = append(labels, Label{"host", m.HostName})
-	}
-	if m.EnableTypePrefix {
-		key = insert(0, "counter", key)
-	}
-	if m.ServiceName != "" {
-		if m.EnableServiceLabel {
-			labels = append(labels, Label{"service", m.ServiceName})
-		} else {
-			key = insert(0, m.ServiceName, key)
-		}
-	}
-	allowed, labelsFiltered := m.allowMetric(key, labels)
-	if !allowed {
-		return
-	}
-	m.sink.IncrCounterWithLabels(key, val, labelsFiltered)
-}
-
-func (m *Metrics) AddSample(key []string, val float32) {
-	m.AddSampleWithLabels(key, val, nil)
-}
-
-func (m *Metrics) AddSampleWithLabels(key []string, val float32, labels []Label) {
-	if m.HostName != "" && m.EnableHostnameLabel {
-		labels = append(labels, Label{"host", m.HostName})
-	}
-	if m.EnableTypePrefix {
-		key = insert(0, "sample", key)
-	}
-	if m.ServiceName != "" {
-		if m.EnableServiceLabel {
-			labels = append(labels, Label{"service", m.ServiceName})
-		} else {
-			key = insert(0, m.ServiceName, key)
-		}
-	}
-	allowed, labelsFiltered := m.allowMetric(key, labels)
-	if !allowed {
-		return
-	}
-	m.sink.AddSampleWithLabels(key, val, labelsFiltered)
-}
-
-func (m *Metrics) MeasureSince(key []string, start time.Time) {
-	m.MeasureSinceWithLabels(key, start, nil)
-}
-
-func (m *Metrics) MeasureSinceWithLabels(key []string, start time.Time, labels []Label) {
-	if m.HostName != "" && m.EnableHostnameLabel {
-		labels = append(labels, Label{"host", m.HostName})
-	}
-	if m.EnableTypePrefix {
-		key = insert(0, "timer", key)
-	}
-	if m.ServiceName != "" {
-		if m.EnableServiceLabel {
-			labels = append(labels, Label{"service", m.ServiceName})
-		} else {
-			key = insert(0, m.ServiceName, key)
-		}
-	}
-	allowed, labelsFiltered := m.allowMetric(key, labels)
-	if !allowed {
-		return
-	}
-	now := time.Now()
-	elapsed := now.Sub(start)
-	msec := float32(elapsed.Nanoseconds()) / float32(m.TimerGranularity)
-	m.sink.AddSampleWithLabels(key, msec, labelsFiltered)
-}
-
-// UpdateFilter overwrites the existing filter with the given rules.
-func (m *Metrics) UpdateFilter(allow, block []string) {
-	m.UpdateFilterAndLabels(allow, block, m.AllowedLabels, m.BlockedLabels)
-}
-
-// UpdateFilterAndLabels overwrites the existing filter with the given rules.
-func (m *Metrics) UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string) {
-	m.filterLock.Lock()
-	defer m.filterLock.Unlock()
-
-	m.AllowedPrefixes = allow
-	m.BlockedPrefixes = block
-
-	if allowedLabels == nil {
-		// Having a white list means we take only elements from it
-		m.allowedLabels = nil
-	} else {
-		m.allowedLabels = make(map[string]bool)
-		for _, v := range allowedLabels {
-			m.allowedLabels[v] = true
-		}
-	}
-	m.blockedLabels = make(map[string]bool)
-	for _, v := range blockedLabels {
-		m.blockedLabels[v] = true
-	}
-	m.AllowedLabels = allowedLabels
-	m.BlockedLabels = blockedLabels
-
-	m.filter = iradix.New()
-	for _, prefix := range m.AllowedPrefixes {
-		m.filter, _, _ = m.filter.Insert([]byte(prefix), true)
-	}
-	for _, prefix := range m.BlockedPrefixes {
-		m.filter, _, _ = m.filter.Insert([]byte(prefix), false)
-	}
-}
-
-// labelIsAllowed return true if a should be included in metric
-// the caller should lock m.filterLock while calling this method
-func (m *Metrics) labelIsAllowed(label *Label) bool {
-	labelName := (*label).Name
-	if m.blockedLabels != nil {
-		_, ok := m.blockedLabels[labelName]
-		if ok {
-			// If present, let's remove this label
-			return false
-		}
-	}
-	if m.allowedLabels != nil {
-		_, ok := m.allowedLabels[labelName]
-		return ok
-	}
-	// Allow by default
-	return true
-}
-
-// filterLabels return only allowed labels
-// the caller should lock m.filterLock while calling this method
-func (m *Metrics) filterLabels(labels []Label) []Label {
-	if labels == nil {
-		return nil
-	}
-	toReturn := []Label{}
-	for _, label := range labels {
-		if m.labelIsAllowed(&label) {
-			toReturn = append(toReturn, label)
-		}
-	}
-	return toReturn
-}
-
-// Returns whether the metric should be allowed based on configured prefix filters
-// Also return the applicable labels
-func (m *Metrics) allowMetric(key []string, labels []Label) (bool, []Label) {
-	m.filterLock.RLock()
-	defer m.filterLock.RUnlock()
-
-	if m.filter == nil || m.filter.Len() == 0 {
-		return m.Config.FilterDefault, m.filterLabels(labels)
-	}
-
-	_, allowed, ok := m.filter.Root().LongestPrefix([]byte(strings.Join(key, ".")))
-	if !ok {
-		return m.Config.FilterDefault, m.filterLabels(labels)
-	}
-
-	return allowed.(bool), m.filterLabels(labels)
-}
-
-// Periodically collects runtime stats to publish
-func (m *Metrics) collectStats() {
-	for {
-		time.Sleep(m.ProfileInterval)
-		m.emitRuntimeStats()
-	}
-}
-
-// Emits various runtime statsitics
-func (m *Metrics) emitRuntimeStats() {
-	// Export number of Goroutines
-	numRoutines := runtime.NumGoroutine()
-	m.SetGauge([]string{"runtime", "num_goroutines"}, float32(numRoutines))
-
-	// Export memory stats
-	var stats runtime.MemStats
-	runtime.ReadMemStats(&stats)
-	m.SetGauge([]string{"runtime", "alloc_bytes"}, float32(stats.Alloc))
-	m.SetGauge([]string{"runtime", "sys_bytes"}, float32(stats.Sys))
-	m.SetGauge([]string{"runtime", "malloc_count"}, float32(stats.Mallocs))
-	m.SetGauge([]string{"runtime", "free_count"}, float32(stats.Frees))
-	m.SetGauge([]string{"runtime", "heap_objects"}, float32(stats.HeapObjects))
-	m.SetGauge([]string{"runtime", "total_gc_pause_ns"}, float32(stats.PauseTotalNs))
-	m.SetGauge([]string{"runtime", "total_gc_runs"}, float32(stats.NumGC))
-
-	// Export info about the last few GC runs
-	num := stats.NumGC
-
-	// Handle wrap around
-	if num < m.lastNumGC {
-		m.lastNumGC = 0
-	}
-
-	// Ensure we don't scan more than 256
-	if num-m.lastNumGC >= 256 {
-		m.lastNumGC = num - 255
-	}
-
-	for i := m.lastNumGC; i < num; i++ {
-		pause := stats.PauseNs[i%256]
-		m.AddSample([]string{"runtime", "gc_pause_ns"}, float32(pause))
-	}
-	m.lastNumGC = num
-}
-
-// Inserts a string value at an index into the slice
-func insert(i int, v string, s []string) []string {
-	s = append(s, "")
-	copy(s[i+1:], s[i:])
-	s[i] = v
-	return s
-}
diff --git a/vendor/github.com/armon/go-metrics/sink.go b/vendor/github.com/armon/go-metrics/sink.go
deleted file mode 100644
index 0b7d6e4..0000000
--- a/vendor/github.com/armon/go-metrics/sink.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package metrics
-
-import (
-	"fmt"
-	"net/url"
-)
-
-// The MetricSink interface is used to transmit metrics information
-// to an external system
-type MetricSink interface {
-	// A Gauge should retain the last value it is set to
-	SetGauge(key []string, val float32)
-	SetGaugeWithLabels(key []string, val float32, labels []Label)
-
-	// Should emit a Key/Value pair for each call
-	EmitKey(key []string, val float32)
-
-	// Counters should accumulate values
-	IncrCounter(key []string, val float32)
-	IncrCounterWithLabels(key []string, val float32, labels []Label)
-
-	// Samples are for timing information, where quantiles are used
-	AddSample(key []string, val float32)
-	AddSampleWithLabels(key []string, val float32, labels []Label)
-}
-
-// BlackholeSink is used to just blackhole messages
-type BlackholeSink struct{}
-
-func (*BlackholeSink) SetGauge(key []string, val float32)                              {}
-func (*BlackholeSink) SetGaugeWithLabels(key []string, val float32, labels []Label)    {}
-func (*BlackholeSink) EmitKey(key []string, val float32)                               {}
-func (*BlackholeSink) IncrCounter(key []string, val float32)                           {}
-func (*BlackholeSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {}
-func (*BlackholeSink) AddSample(key []string, val float32)                             {}
-func (*BlackholeSink) AddSampleWithLabels(key []string, val float32, labels []Label)   {}
-
-// FanoutSink is used to sink to fanout values to multiple sinks
-type FanoutSink []MetricSink
-
-func (fh FanoutSink) SetGauge(key []string, val float32) {
-	fh.SetGaugeWithLabels(key, val, nil)
-}
-
-func (fh FanoutSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {
-	for _, s := range fh {
-		s.SetGaugeWithLabels(key, val, labels)
-	}
-}
-
-func (fh FanoutSink) EmitKey(key []string, val float32) {
-	for _, s := range fh {
-		s.EmitKey(key, val)
-	}
-}
-
-func (fh FanoutSink) IncrCounter(key []string, val float32) {
-	fh.IncrCounterWithLabels(key, val, nil)
-}
-
-func (fh FanoutSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {
-	for _, s := range fh {
-		s.IncrCounterWithLabels(key, val, labels)
-	}
-}
-
-func (fh FanoutSink) AddSample(key []string, val float32) {
-	fh.AddSampleWithLabels(key, val, nil)
-}
-
-func (fh FanoutSink) AddSampleWithLabels(key []string, val float32, labels []Label) {
-	for _, s := range fh {
-		s.AddSampleWithLabels(key, val, labels)
-	}
-}
-
-// sinkURLFactoryFunc is an generic interface around the *SinkFromURL() function provided
-// by each sink type
-type sinkURLFactoryFunc func(*url.URL) (MetricSink, error)
-
-// sinkRegistry supports the generic NewMetricSink function by mapping URL
-// schemes to metric sink factory functions
-var sinkRegistry = map[string]sinkURLFactoryFunc{
-	"statsd":   NewStatsdSinkFromURL,
-	"statsite": NewStatsiteSinkFromURL,
-	"inmem":    NewInmemSinkFromURL,
-}
-
-// NewMetricSinkFromURL allows a generic URL input to configure any of the
-// supported sinks. The scheme of the URL identifies the type of the sink, the
-// and query parameters are used to set options.
-//
-// "statsd://" - Initializes a StatsdSink. The host and port are passed through
-// as the "addr" of the sink
-//
-// "statsite://" - Initializes a StatsiteSink. The host and port become the
-// "addr" of the sink
-//
-// "inmem://" - Initializes an InmemSink. The host and port are ignored. The
-// "interval" and "duration" query parameters must be specified with valid
-// durations, see NewInmemSink for details.
-func NewMetricSinkFromURL(urlStr string) (MetricSink, error) {
-	u, err := url.Parse(urlStr)
-	if err != nil {
-		return nil, err
-	}
-
-	sinkURLFactoryFunc := sinkRegistry[u.Scheme]
-	if sinkURLFactoryFunc == nil {
-		return nil, fmt.Errorf(
-			"cannot create metric sink, unrecognized sink name: %q", u.Scheme)
-	}
-
-	return sinkURLFactoryFunc(u)
-}
diff --git a/vendor/github.com/armon/go-metrics/start.go b/vendor/github.com/armon/go-metrics/start.go
deleted file mode 100644
index 32a28c4..0000000
--- a/vendor/github.com/armon/go-metrics/start.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package metrics
-
-import (
-	"os"
-	"sync"
-	"sync/atomic"
-	"time"
-
-	"github.com/hashicorp/go-immutable-radix"
-)
-
-// Config is used to configure metrics settings
-type Config struct {
-	ServiceName          string        // Prefixed with keys to separate services
-	HostName             string        // Hostname to use. If not provided and EnableHostname, it will be os.Hostname
-	EnableHostname       bool          // Enable prefixing gauge values with hostname
-	EnableHostnameLabel  bool          // Enable adding hostname to labels
-	EnableServiceLabel   bool          // Enable adding service to labels
-	EnableRuntimeMetrics bool          // Enables profiling of runtime metrics (GC, Goroutines, Memory)
-	EnableTypePrefix     bool          // Prefixes key with a type ("counter", "gauge", "timer")
-	TimerGranularity     time.Duration // Granularity of timers.
-	ProfileInterval      time.Duration // Interval to profile runtime metrics
-
-	AllowedPrefixes []string // A list of metric prefixes to allow, with '.' as the separator
-	BlockedPrefixes []string // A list of metric prefixes to block, with '.' as the separator
-	AllowedLabels   []string // A list of metric labels to allow, with '.' as the separator
-	BlockedLabels   []string // A list of metric labels to block, with '.' as the separator
-	FilterDefault   bool     // Whether to allow metrics by default
-}
-
-// Metrics represents an instance of a metrics sink that can
-// be used to emit
-type Metrics struct {
-	Config
-	lastNumGC     uint32
-	sink          MetricSink
-	filter        *iradix.Tree
-	allowedLabels map[string]bool
-	blockedLabels map[string]bool
-	filterLock    sync.RWMutex // Lock filters and allowedLabels/blockedLabels access
-}
-
-// Shared global metrics instance
-var globalMetrics atomic.Value // *Metrics
-
-func init() {
-	// Initialize to a blackhole sink to avoid errors
-	globalMetrics.Store(&Metrics{sink: &BlackholeSink{}})
-}
-
-// DefaultConfig provides a sane default configuration
-func DefaultConfig(serviceName string) *Config {
-	c := &Config{
-		ServiceName:          serviceName, // Use client provided service
-		HostName:             "",
-		EnableHostname:       true,             // Enable hostname prefix
-		EnableRuntimeMetrics: true,             // Enable runtime profiling
-		EnableTypePrefix:     false,            // Disable type prefix
-		TimerGranularity:     time.Millisecond, // Timers are in milliseconds
-		ProfileInterval:      time.Second,      // Poll runtime every second
-		FilterDefault:        true,             // Don't filter metrics by default
-	}
-
-	// Try to get the hostname
-	name, _ := os.Hostname()
-	c.HostName = name
-	return c
-}
-
-// New is used to create a new instance of Metrics
-func New(conf *Config, sink MetricSink) (*Metrics, error) {
-	met := &Metrics{}
-	met.Config = *conf
-	met.sink = sink
-	met.UpdateFilterAndLabels(conf.AllowedPrefixes, conf.BlockedPrefixes, conf.AllowedLabels, conf.BlockedLabels)
-
-	// Start the runtime collector
-	if conf.EnableRuntimeMetrics {
-		go met.collectStats()
-	}
-	return met, nil
-}
-
-// NewGlobal is the same as New, but it assigns the metrics object to be
-// used globally as well as returning it.
-func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error) {
-	metrics, err := New(conf, sink)
-	if err == nil {
-		globalMetrics.Store(metrics)
-	}
-	return metrics, err
-}
-
-// Proxy all the methods to the globalMetrics instance
-func SetGauge(key []string, val float32) {
-	globalMetrics.Load().(*Metrics).SetGauge(key, val)
-}
-
-func SetGaugeWithLabels(key []string, val float32, labels []Label) {
-	globalMetrics.Load().(*Metrics).SetGaugeWithLabels(key, val, labels)
-}
-
-func EmitKey(key []string, val float32) {
-	globalMetrics.Load().(*Metrics).EmitKey(key, val)
-}
-
-func IncrCounter(key []string, val float32) {
-	globalMetrics.Load().(*Metrics).IncrCounter(key, val)
-}
-
-func IncrCounterWithLabels(key []string, val float32, labels []Label) {
-	globalMetrics.Load().(*Metrics).IncrCounterWithLabels(key, val, labels)
-}
-
-func AddSample(key []string, val float32) {
-	globalMetrics.Load().(*Metrics).AddSample(key, val)
-}
-
-func AddSampleWithLabels(key []string, val float32, labels []Label) {
-	globalMetrics.Load().(*Metrics).AddSampleWithLabels(key, val, labels)
-}
-
-func MeasureSince(key []string, start time.Time) {
-	globalMetrics.Load().(*Metrics).MeasureSince(key, start)
-}
-
-func MeasureSinceWithLabels(key []string, start time.Time, labels []Label) {
-	globalMetrics.Load().(*Metrics).MeasureSinceWithLabels(key, start, labels)
-}
-
-func UpdateFilter(allow, block []string) {
-	globalMetrics.Load().(*Metrics).UpdateFilter(allow, block)
-}
-
-// UpdateFilterAndLabels set allow/block prefixes of metrics while allowedLabels
-// and blockedLabels - when not nil - allow filtering of labels in order to
-// block/allow globally labels (especially useful when having large number of
-// values for a given label). See README.md for more information about usage.
-func UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string) {
-	globalMetrics.Load().(*Metrics).UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels)
-}
diff --git a/vendor/github.com/armon/go-metrics/statsd.go b/vendor/github.com/armon/go-metrics/statsd.go
deleted file mode 100644
index 1bfffce..0000000
--- a/vendor/github.com/armon/go-metrics/statsd.go
+++ /dev/null
@@ -1,184 +0,0 @@
-package metrics
-
-import (
-	"bytes"
-	"fmt"
-	"log"
-	"net"
-	"net/url"
-	"strings"
-	"time"
-)
-
-const (
-	// statsdMaxLen is the maximum size of a packet
-	// to send to statsd
-	statsdMaxLen = 1400
-)
-
-// StatsdSink provides a MetricSink that can be used
-// with a statsite or statsd metrics server. It uses
-// only UDP packets, while StatsiteSink uses TCP.
-type StatsdSink struct {
-	addr        string
-	metricQueue chan string
-}
-
-// NewStatsdSinkFromURL creates an StatsdSink from a URL. It is used
-// (and tested) from NewMetricSinkFromURL.
-func NewStatsdSinkFromURL(u *url.URL) (MetricSink, error) {
-	return NewStatsdSink(u.Host)
-}
-
-// NewStatsdSink is used to create a new StatsdSink
-func NewStatsdSink(addr string) (*StatsdSink, error) {
-	s := &StatsdSink{
-		addr:        addr,
-		metricQueue: make(chan string, 4096),
-	}
-	go s.flushMetrics()
-	return s, nil
-}
-
-// Close is used to stop flushing to statsd
-func (s *StatsdSink) Shutdown() {
-	close(s.metricQueue)
-}
-
-func (s *StatsdSink) SetGauge(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val))
-}
-
-func (s *StatsdSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {
-	flatKey := s.flattenKeyLabels(key, labels)
-	s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val))
-}
-
-func (s *StatsdSink) EmitKey(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|kv\n", flatKey, val))
-}
-
-func (s *StatsdSink) IncrCounter(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val))
-}
-
-func (s *StatsdSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {
-	flatKey := s.flattenKeyLabels(key, labels)
-	s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val))
-}
-
-func (s *StatsdSink) AddSample(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val))
-}
-
-func (s *StatsdSink) AddSampleWithLabels(key []string, val float32, labels []Label) {
-	flatKey := s.flattenKeyLabels(key, labels)
-	s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val))
-}
-
-// Flattens the key for formatting, removes spaces
-func (s *StatsdSink) flattenKey(parts []string) string {
-	joined := strings.Join(parts, ".")
-	return strings.Map(func(r rune) rune {
-		switch r {
-		case ':':
-			fallthrough
-		case ' ':
-			return '_'
-		default:
-			return r
-		}
-	}, joined)
-}
-
-// Flattens the key along with labels for formatting, removes spaces
-func (s *StatsdSink) flattenKeyLabels(parts []string, labels []Label) string {
-	for _, label := range labels {
-		parts = append(parts, label.Value)
-	}
-	return s.flattenKey(parts)
-}
-
-// Does a non-blocking push to the metrics queue
-func (s *StatsdSink) pushMetric(m string) {
-	select {
-	case s.metricQueue <- m:
-	default:
-	}
-}
-
-// Flushes metrics
-func (s *StatsdSink) flushMetrics() {
-	var sock net.Conn
-	var err error
-	var wait <-chan time.Time
-	ticker := time.NewTicker(flushInterval)
-	defer ticker.Stop()
-
-CONNECT:
-	// Create a buffer
-	buf := bytes.NewBuffer(nil)
-
-	// Attempt to connect
-	sock, err = net.Dial("udp", s.addr)
-	if err != nil {
-		log.Printf("[ERR] Error connecting to statsd! Err: %s", err)
-		goto WAIT
-	}
-
-	for {
-		select {
-		case metric, ok := <-s.metricQueue:
-			// Get a metric from the queue
-			if !ok {
-				goto QUIT
-			}
-
-			// Check if this would overflow the packet size
-			if len(metric)+buf.Len() > statsdMaxLen {
-				_, err := sock.Write(buf.Bytes())
-				buf.Reset()
-				if err != nil {
-					log.Printf("[ERR] Error writing to statsd! Err: %s", err)
-					goto WAIT
-				}
-			}
-
-			// Append to the buffer
-			buf.WriteString(metric)
-
-		case <-ticker.C:
-			if buf.Len() == 0 {
-				continue
-			}
-
-			_, err := sock.Write(buf.Bytes())
-			buf.Reset()
-			if err != nil {
-				log.Printf("[ERR] Error flushing to statsd! Err: %s", err)
-				goto WAIT
-			}
-		}
-	}
-
-WAIT:
-	// Wait for a while
-	wait = time.After(time.Duration(5) * time.Second)
-	for {
-		select {
-		// Dequeue the messages to avoid backlog
-		case _, ok := <-s.metricQueue:
-			if !ok {
-				goto QUIT
-			}
-		case <-wait:
-			goto CONNECT
-		}
-	}
-QUIT:
-	s.metricQueue = nil
-}
diff --git a/vendor/github.com/armon/go-metrics/statsite.go b/vendor/github.com/armon/go-metrics/statsite.go
deleted file mode 100644
index 6c0d284..0000000
--- a/vendor/github.com/armon/go-metrics/statsite.go
+++ /dev/null
@@ -1,172 +0,0 @@
-package metrics
-
-import (
-	"bufio"
-	"fmt"
-	"log"
-	"net"
-	"net/url"
-	"strings"
-	"time"
-)
-
-const (
-	// We force flush the statsite metrics after this period of
-	// inactivity. Prevents stats from getting stuck in a buffer
-	// forever.
-	flushInterval = 100 * time.Millisecond
-)
-
-// NewStatsiteSinkFromURL creates an StatsiteSink from a URL. It is used
-// (and tested) from NewMetricSinkFromURL.
-func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error) {
-	return NewStatsiteSink(u.Host)
-}
-
-// StatsiteSink provides a MetricSink that can be used with a
-// statsite metrics server
-type StatsiteSink struct {
-	addr        string
-	metricQueue chan string
-}
-
-// NewStatsiteSink is used to create a new StatsiteSink
-func NewStatsiteSink(addr string) (*StatsiteSink, error) {
-	s := &StatsiteSink{
-		addr:        addr,
-		metricQueue: make(chan string, 4096),
-	}
-	go s.flushMetrics()
-	return s, nil
-}
-
-// Close is used to stop flushing to statsite
-func (s *StatsiteSink) Shutdown() {
-	close(s.metricQueue)
-}
-
-func (s *StatsiteSink) SetGauge(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val))
-}
-
-func (s *StatsiteSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {
-	flatKey := s.flattenKeyLabels(key, labels)
-	s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val))
-}
-
-func (s *StatsiteSink) EmitKey(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|kv\n", flatKey, val))
-}
-
-func (s *StatsiteSink) IncrCounter(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val))
-}
-
-func (s *StatsiteSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {
-	flatKey := s.flattenKeyLabels(key, labels)
-	s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val))
-}
-
-func (s *StatsiteSink) AddSample(key []string, val float32) {
-	flatKey := s.flattenKey(key)
-	s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val))
-}
-
-func (s *StatsiteSink) AddSampleWithLabels(key []string, val float32, labels []Label) {
-	flatKey := s.flattenKeyLabels(key, labels)
-	s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val))
-}
-
-// Flattens the key for formatting, removes spaces
-func (s *StatsiteSink) flattenKey(parts []string) string {
-	joined := strings.Join(parts, ".")
-	return strings.Map(func(r rune) rune {
-		switch r {
-		case ':':
-			fallthrough
-		case ' ':
-			return '_'
-		default:
-			return r
-		}
-	}, joined)
-}
-
-// Flattens the key along with labels for formatting, removes spaces
-func (s *StatsiteSink) flattenKeyLabels(parts []string, labels []Label) string {
-	for _, label := range labels {
-		parts = append(parts, label.Value)
-	}
-	return s.flattenKey(parts)
-}
-
-// Does a non-blocking push to the metrics queue
-func (s *StatsiteSink) pushMetric(m string) {
-	select {
-	case s.metricQueue <- m:
-	default:
-	}
-}
-
-// Flushes metrics
-func (s *StatsiteSink) flushMetrics() {
-	var sock net.Conn
-	var err error
-	var wait <-chan time.Time
-	var buffered *bufio.Writer
-	ticker := time.NewTicker(flushInterval)
-	defer ticker.Stop()
-
-CONNECT:
-	// Attempt to connect
-	sock, err = net.Dial("tcp", s.addr)
-	if err != nil {
-		log.Printf("[ERR] Error connecting to statsite! Err: %s", err)
-		goto WAIT
-	}
-
-	// Create a buffered writer
-	buffered = bufio.NewWriter(sock)
-
-	for {
-		select {
-		case metric, ok := <-s.metricQueue:
-			// Get a metric from the queue
-			if !ok {
-				goto QUIT
-			}
-
-			// Try to send to statsite
-			_, err := buffered.Write([]byte(metric))
-			if err != nil {
-				log.Printf("[ERR] Error writing to statsite! Err: %s", err)
-				goto WAIT
-			}
-		case <-ticker.C:
-			if err := buffered.Flush(); err != nil {
-				log.Printf("[ERR] Error flushing to statsite! Err: %s", err)
-				goto WAIT
-			}
-		}
-	}
-
-WAIT:
-	// Wait for a while
-	wait = time.After(time.Duration(5) * time.Second)
-	for {
-		select {
-		// Dequeue the messages to avoid backlog
-		case _, ok := <-s.metricQueue:
-			if !ok {
-				goto QUIT
-			}
-		case <-wait:
-			goto CONNECT
-		}
-	}
-QUIT:
-	s.metricQueue = nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/LICENSE b/vendor/github.com/hashicorp/consul/api/LICENSE
deleted file mode 100644
index c33dcc7..0000000
--- a/vendor/github.com/hashicorp/consul/api/LICENSE
+++ /dev/null
@@ -1,354 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. “Contributor”
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. “Contributor Version”
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor’s Contribution.
-
-1.3. “Contribution”
-
-     means Covered Software of a particular Contributor.
-
-1.4. “Covered Software”
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. “Incompatible With Secondary Licenses”
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of version
-        1.1 or earlier of the License, but not also under the terms of a
-        Secondary License.
-
-1.6. “Executable Form”
-
-     means any form of the work other than Source Code Form.
-
-1.7. “Larger Work”
-
-     means a work that combines Covered Software with other material, in a separate
-     file or files, that is not Covered Software.
-
-1.8. “License”
-
-     means this document.
-
-1.9. “Licensable”
-
-     means having the right to grant, to the maximum extent possible, whether at the
-     time of the initial grant or subsequently, any and all of the rights conveyed by
-     this License.
-
-1.10. “Modifications”
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to, deletion
-        from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. “Patent Claims” of a Contributor
-
-      means any patent claim(s), including without limitation, method, process,
-      and apparatus claims, in any patent Licensable by such Contributor that
-      would be infringed, but for the grant of the License, by the making,
-      using, selling, offering for sale, having made, import, or transfer of
-      either its Contributions or its Contributor Version.
-
-1.12. “Secondary License”
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. “Source Code Form”
-
-      means the form of the work preferred for making modifications.
-
-1.14. “You” (or “Your”)
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, “You” includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, “control” means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or as
-        part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its Contributions
-        or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution become
-     effective for each Contribution on the date the Contributor first distributes
-     such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under this
-     License. No additional rights or licenses will be implied from the distribution
-     or licensing of Covered Software under this License. Notwithstanding Section
-     2.1(b) above, no patent license is granted by a Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party’s
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of its
-        Contributions.
-
-     This License does not grant any rights in the trademarks, service marks, or
-     logos of any Contributor (except as may be necessary to comply with the
-     notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this License
-     (see Section 10.2) or under the terms of a Secondary License (if permitted
-     under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its Contributions
-     are its original creation(s) or it has sufficient rights to grant the
-     rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under applicable
-     copyright doctrines of fair use, fair dealing, or other equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under the
-     terms of this License. You must inform recipients that the Source Code Form
-     of the Covered Software is governed by the terms of this License, and how
-     they can obtain a copy of this License. You may not attempt to alter or
-     restrict the recipients’ rights in the Source Code Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this License,
-        or sublicense it under different terms, provided that the license for
-        the Executable Form does not attempt to limit or alter the recipients’
-        rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for the
-     Covered Software. If the Larger Work is a combination of Covered Software
-     with a work governed by one or more Secondary Licenses, and the Covered
-     Software is not Incompatible With Secondary Licenses, this License permits
-     You to additionally distribute such Covered Software under the terms of
-     such Secondary License(s), so that the recipient of the Larger Work may, at
-     their option, further distribute the Covered Software under the terms of
-     either this License or such Secondary License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices (including
-     copyright notices, patent notices, disclaimers of warranty, or limitations
-     of liability) contained within the Source Code Form of the Covered
-     Software, except that You may alter any license notices to the extent
-     required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on behalf
-     of any Contributor. You must make it absolutely clear that any such
-     warranty, support, indemnity, or liability obligation is offered by You
-     alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute, judicial
-   order, or regulation then You must: (a) comply with the terms of this License
-   to the maximum extent possible; and (b) describe the limitations and the code
-   they affect. Such description must be placed in a text file included with all
-   distributions of the Covered Software under this License. Except to the
-   extent prohibited by statute or regulation, such description must be
-   sufficiently detailed for a recipient of ordinary skill to be able to
-   understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing basis,
-     if such Contributor fails to notify You of the non-compliance by some
-     reasonable means prior to 60 days after You have come back into compliance.
-     Moreover, Your grants from a particular Contributor are reinstated on an
-     ongoing basis if such Contributor notifies You of the non-compliance by
-     some reasonable means, this is the first time You have received notice of
-     non-compliance with this License from such Contributor, and You become
-     compliant prior to 30 days after Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions, counter-claims,
-     and cross-claims) alleging that a Contributor Version directly or
-     indirectly infringes any patent, then the rights granted to You by any and
-     all Contributors for the Covered Software under Section 2.1 of this License
-     shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an “as is” basis, without
-   warranty of any kind, either expressed, implied, or statutory, including,
-   without limitation, warranties that the Covered Software is free of defects,
-   merchantable, fit for a particular purpose or non-infringing. The entire
-   risk as to the quality and performance of the Covered Software is with You.
-   Should any Covered Software prove defective in any respect, You (not any
-   Contributor) assume the cost of any necessary servicing, repair, or
-   correction. This disclaimer of warranty constitutes an essential part of this
-   License. No use of  any Covered Software is authorized under this License
-   except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from such
-   party’s negligence to the extent applicable law prohibits such limitation.
-   Some jurisdictions do not allow the exclusion or limitation of incidental or
-   consequential damages, so this exclusion and limitation may not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts of
-   a jurisdiction where the defendant maintains its principal place of business
-   and such litigation shall be governed by laws of that jurisdiction, without
-   reference to its conflict-of-law provisions. Nothing in this Section shall
-   prevent a party’s ability to bring cross-claims or counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject matter
-   hereof. If any provision of this License is held to be unenforceable, such
-   provision shall be reformed only to the extent necessary to make it
-   enforceable. Any law or regulation which provides that the language of a
-   contract shall be construed against the drafter shall not be used to construe
-   this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version of
-      the License under which You originally received the Covered Software, or
-      under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a modified
-      version of this License if you rename the license and remove any
-      references to the name of the license steward (except to note that such
-      modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
-      If You choose to distribute Source Code Form that is Incompatible With
-      Secondary Licenses under the terms of this version of the License, the
-      notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file, then
-You may include the notice in a location (such as a LICENSE file in a relevant
-directory) where a recipient would be likely to look for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - “Incompatible With Secondary Licenses” Notice
-
-      This Source Code Form is “Incompatible
-      With Secondary Licenses”, as defined by
-      the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/hashicorp/consul/api/README.md b/vendor/github.com/hashicorp/consul/api/README.md
deleted file mode 100644
index 3255cbb..0000000
--- a/vendor/github.com/hashicorp/consul/api/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-Consul API client
-=================
-
-This package provides the `api` package which attempts to
-provide programmatic access to the full Consul API.
-
-Currently, all of the Consul APIs included in version 0.6.0 are supported.
-
-Documentation
-=============
-
-The full documentation is available on [Godoc](https://godoc.org/github.com/hashicorp/consul/api)
-
-Usage
-=====
-
-Below is an example of using the Consul client:
-
-```go
-package main
-
-import "github.com/hashicorp/consul/api"
-import "fmt"
-
-func main() {
-	// Get a new client
-	client, err := api.NewClient(api.DefaultConfig())
-	if err != nil {
-		panic(err)
-	}
-
-	// Get a handle to the KV API
-	kv := client.KV()
-
-	// PUT a new KV pair
-	p := &api.KVPair{Key: "REDIS_MAXCLIENTS", Value: []byte("1000")}
-	_, err = kv.Put(p, nil)
-	if err != nil {
-		panic(err)
-	}
-
-	// Lookup the pair
-	pair, _, err := kv.Get("REDIS_MAXCLIENTS", nil)
-	if err != nil {
-		panic(err)
-	}
-	fmt.Printf("KV: %v %s\n", pair.Key, pair.Value)
-}
-```
-
-To run this example, start a Consul server:
-
-```bash
-consul agent -dev
-```
-
-Copy the code above into a file such as `main.go`.
-
-Install and run. You'll see a key (`REDIS_MAXCLIENTS`) and value (`1000`) printed.
-
-```bash
-$ go get
-$ go run main.go
-KV: REDIS_MAXCLIENTS 1000
-```
-
-After running the code, you can also view the values in the Consul UI on your local machine at http://localhost:8500/ui/dc1/kv
diff --git a/vendor/github.com/hashicorp/consul/api/acl.go b/vendor/github.com/hashicorp/consul/api/acl.go
deleted file mode 100644
index 124409f..0000000
--- a/vendor/github.com/hashicorp/consul/api/acl.go
+++ /dev/null
@@ -1,1116 +0,0 @@
-package api
-
-import (
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/url"
-	"time"
-
-	"github.com/mitchellh/mapstructure"
-)
-
-const (
-	// ACLClientType is the client type token
-	ACLClientType = "client"
-
-	// ACLManagementType is the management type token
-	ACLManagementType = "management"
-)
-
-type ACLTokenPolicyLink struct {
-	ID   string
-	Name string
-}
-type ACLTokenRoleLink struct {
-	ID   string
-	Name string
-}
-
-// ACLToken represents an ACL Token
-type ACLToken struct {
-	CreateIndex       uint64
-	ModifyIndex       uint64
-	AccessorID        string
-	SecretID          string
-	Description       string
-	Policies          []*ACLTokenPolicyLink `json:",omitempty"`
-	Roles             []*ACLTokenRoleLink   `json:",omitempty"`
-	ServiceIdentities []*ACLServiceIdentity `json:",omitempty"`
-	Local             bool
-	ExpirationTTL     time.Duration `json:",omitempty"`
-	ExpirationTime    *time.Time    `json:",omitempty"`
-	CreateTime        time.Time     `json:",omitempty"`
-	Hash              []byte        `json:",omitempty"`
-
-	// DEPRECATED (ACL-Legacy-Compat)
-	// Rules will only be present for legacy tokens returned via the new APIs
-	Rules string `json:",omitempty"`
-}
-
-type ACLTokenListEntry struct {
-	CreateIndex       uint64
-	ModifyIndex       uint64
-	AccessorID        string
-	Description       string
-	Policies          []*ACLTokenPolicyLink `json:",omitempty"`
-	Roles             []*ACLTokenRoleLink   `json:",omitempty"`
-	ServiceIdentities []*ACLServiceIdentity `json:",omitempty"`
-	Local             bool
-	ExpirationTime    *time.Time `json:",omitempty"`
-	CreateTime        time.Time
-	Hash              []byte
-	Legacy            bool
-}
-
-// ACLEntry is used to represent a legacy ACL token
-// The legacy tokens are deprecated.
-type ACLEntry struct {
-	CreateIndex uint64
-	ModifyIndex uint64
-	ID          string
-	Name        string
-	Type        string
-	Rules       string
-}
-
-// ACLReplicationStatus is used to represent the status of ACL replication.
-type ACLReplicationStatus struct {
-	Enabled              bool
-	Running              bool
-	SourceDatacenter     string
-	ReplicationType      string
-	ReplicatedIndex      uint64
-	ReplicatedRoleIndex  uint64
-	ReplicatedTokenIndex uint64
-	LastSuccess          time.Time
-	LastError            time.Time
-}
-
-// ACLServiceIdentity represents a high-level grant of all necessary privileges
-// to assume the identity of the named Service in the Catalog and within
-// Connect.
-type ACLServiceIdentity struct {
-	ServiceName string
-	Datacenters []string `json:",omitempty"`
-}
-
-// ACLPolicy represents an ACL Policy.
-type ACLPolicy struct {
-	ID          string
-	Name        string
-	Description string
-	Rules       string
-	Datacenters []string
-	Hash        []byte
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-type ACLPolicyListEntry struct {
-	ID          string
-	Name        string
-	Description string
-	Datacenters []string
-	Hash        []byte
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-type ACLRolePolicyLink struct {
-	ID   string
-	Name string
-}
-
-// ACLRole represents an ACL Role.
-type ACLRole struct {
-	ID                string
-	Name              string
-	Description       string
-	Policies          []*ACLRolePolicyLink  `json:",omitempty"`
-	ServiceIdentities []*ACLServiceIdentity `json:",omitempty"`
-	Hash              []byte
-	CreateIndex       uint64
-	ModifyIndex       uint64
-}
-
-// BindingRuleBindType is the type of binding rule mechanism used.
-type BindingRuleBindType string
-
-const (
-	// BindingRuleBindTypeService binds to a service identity with the given name.
-	BindingRuleBindTypeService BindingRuleBindType = "service"
-
-	// BindingRuleBindTypeRole binds to pre-existing roles with the given name.
-	BindingRuleBindTypeRole BindingRuleBindType = "role"
-)
-
-type ACLBindingRule struct {
-	ID          string
-	Description string
-	AuthMethod  string
-	Selector    string
-	BindType    BindingRuleBindType
-	BindName    string
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-type ACLAuthMethod struct {
-	Name        string
-	Type        string
-	Description string
-
-	// Configuration is arbitrary configuration for the auth method. This
-	// should only contain primitive values and containers (such as lists and
-	// maps).
-	Config map[string]interface{}
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-type ACLAuthMethodListEntry struct {
-	Name        string
-	Type        string
-	Description string
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-// ParseKubernetesAuthMethodConfig takes a raw config map and returns a parsed
-// KubernetesAuthMethodConfig.
-func ParseKubernetesAuthMethodConfig(raw map[string]interface{}) (*KubernetesAuthMethodConfig, error) {
-	var config KubernetesAuthMethodConfig
-	decodeConf := &mapstructure.DecoderConfig{
-		Result:           &config,
-		WeaklyTypedInput: true,
-	}
-
-	decoder, err := mapstructure.NewDecoder(decodeConf)
-	if err != nil {
-		return nil, err
-	}
-
-	if err := decoder.Decode(raw); err != nil {
-		return nil, fmt.Errorf("error decoding config: %s", err)
-	}
-
-	return &config, nil
-}
-
-// KubernetesAuthMethodConfig is the config for the built-in Consul auth method
-// for Kubernetes.
-type KubernetesAuthMethodConfig struct {
-	Host              string `json:",omitempty"`
-	CACert            string `json:",omitempty"`
-	ServiceAccountJWT string `json:",omitempty"`
-}
-
-// RenderToConfig converts this into a map[string]interface{} suitable for use
-// in the ACLAuthMethod.Config field.
-func (c *KubernetesAuthMethodConfig) RenderToConfig() map[string]interface{} {
-	return map[string]interface{}{
-		"Host":              c.Host,
-		"CACert":            c.CACert,
-		"ServiceAccountJWT": c.ServiceAccountJWT,
-	}
-}
-
-type ACLLoginParams struct {
-	AuthMethod  string
-	BearerToken string
-	Meta        map[string]string `json:",omitempty"`
-}
-
-// ACL can be used to query the ACL endpoints
-type ACL struct {
-	c *Client
-}
-
-// ACL returns a handle to the ACL endpoints
-func (c *Client) ACL() *ACL {
-	return &ACL{c}
-}
-
-// Bootstrap is used to perform a one-time ACL bootstrap operation on a cluster
-// to get the first management token.
-func (a *ACL) Bootstrap() (*ACLToken, *WriteMeta, error) {
-	r := a.c.newRequest("PUT", "/v1/acl/bootstrap")
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, wm, nil
-}
-
-// Create is used to generate a new token with the given parameters
-//
-// Deprecated: Use TokenCreate instead.
-func (a *ACL) Create(acl *ACLEntry, q *WriteOptions) (string, *WriteMeta, error) {
-	r := a.c.newRequest("PUT", "/v1/acl/create")
-	r.setWriteOptions(q)
-	r.obj = acl
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out struct{ ID string }
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// Update is used to update the rules of an existing token
-//
-// Deprecated: Use TokenUpdate instead.
-func (a *ACL) Update(acl *ACLEntry, q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("PUT", "/v1/acl/update")
-	r.setWriteOptions(q)
-	r.obj = acl
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// Destroy is used to destroy a given ACL token ID
-//
-// Deprecated: Use TokenDelete instead.
-func (a *ACL) Destroy(id string, q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("PUT", "/v1/acl/destroy/"+id)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// Clone is used to return a new token cloned from an existing one
-//
-// Deprecated: Use TokenClone instead.
-func (a *ACL) Clone(id string, q *WriteOptions) (string, *WriteMeta, error) {
-	r := a.c.newRequest("PUT", "/v1/acl/clone/"+id)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out struct{ ID string }
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// Info is used to query for information about an ACL token
-//
-// Deprecated: Use TokenRead instead.
-func (a *ACL) Info(id string, q *QueryOptions) (*ACLEntry, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/info/"+id)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLEntry
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	if len(entries) > 0 {
-		return entries[0], qm, nil
-	}
-	return nil, qm, nil
-}
-
-// List is used to get all the ACL tokens
-//
-// Deprecated: Use TokenList instead.
-func (a *ACL) List(q *QueryOptions) ([]*ACLEntry, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/list")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLEntry
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// Replication returns the status of the ACL replication process in the datacenter
-func (a *ACL) Replication(q *QueryOptions) (*ACLReplicationStatus, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/replication")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries *ACLReplicationStatus
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// TokenCreate creates a new ACL token. If either the AccessorID or SecretID fields
-// of the ACLToken structure are empty they will be filled in by Consul.
-func (a *ACL) TokenCreate(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) {
-	r := a.c.newRequest("PUT", "/v1/acl/token")
-	r.setWriteOptions(q)
-	r.obj = token
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// TokenUpdate updates a token in place without modifying its AccessorID or SecretID. A valid
-// AccessorID must be set in the ACLToken structure passed to this function but the SecretID may
-// be omitted and will be filled in by Consul with its existing value.
-func (a *ACL) TokenUpdate(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) {
-	if token.AccessorID == "" {
-		return nil, nil, fmt.Errorf("Must specify an AccessorID for Token Updating")
-	}
-	r := a.c.newRequest("PUT", "/v1/acl/token/"+token.AccessorID)
-	r.setWriteOptions(q)
-	r.obj = token
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// TokenClone will create a new token with the same policies and locality as the original
-// token but will have its own auto-generated AccessorID and SecretID as well having the
-// description passed to this function. The tokenID parameter must be a valid Accessor ID
-// of an existing token.
-func (a *ACL) TokenClone(tokenID string, description string, q *WriteOptions) (*ACLToken, *WriteMeta, error) {
-	if tokenID == "" {
-		return nil, nil, fmt.Errorf("Must specify a tokenID for Token Cloning")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/token/"+tokenID+"/clone")
-	r.setWriteOptions(q)
-	r.obj = struct{ Description string }{description}
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// TokenDelete removes a single ACL token. The tokenID parameter must be a valid
-// Accessor ID of an existing token.
-func (a *ACL) TokenDelete(tokenID string, q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("DELETE", "/v1/acl/token/"+tokenID)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// TokenRead retrieves the full token details. The tokenID parameter must be a valid
-// Accessor ID of an existing token.
-func (a *ACL) TokenRead(tokenID string, q *QueryOptions) (*ACLToken, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/token/"+tokenID)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// TokenReadSelf retrieves the full token details of the token currently
-// assigned to the API Client. In this manner its possible to read a token
-// by its Secret ID.
-func (a *ACL) TokenReadSelf(q *QueryOptions) (*ACLToken, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/token/self")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// TokenList lists all tokens. The listing does not contain any SecretIDs as those
-// may only be retrieved by a call to TokenRead.
-func (a *ACL) TokenList(q *QueryOptions) ([]*ACLTokenListEntry, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/tokens")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLTokenListEntry
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// PolicyCreate will create a new policy. It is not allowed for the policy parameters
-// ID field to be set as this will be generated by Consul while processing the request.
-func (a *ACL) PolicyCreate(policy *ACLPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) {
-	if policy.ID != "" {
-		return nil, nil, fmt.Errorf("Cannot specify an ID in Policy Creation")
-	}
-	r := a.c.newRequest("PUT", "/v1/acl/policy")
-	r.setWriteOptions(q)
-	r.obj = policy
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLPolicy
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// PolicyUpdate updates a policy. The ID field of the policy parameter must be set to an
-// existing policy ID
-func (a *ACL) PolicyUpdate(policy *ACLPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) {
-	if policy.ID == "" {
-		return nil, nil, fmt.Errorf("Must specify an ID in Policy Update")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/policy/"+policy.ID)
-	r.setWriteOptions(q)
-	r.obj = policy
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLPolicy
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// PolicyDelete deletes a policy given its ID.
-func (a *ACL) PolicyDelete(policyID string, q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("DELETE", "/v1/acl/policy/"+policyID)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// PolicyRead retrieves the policy details including the rule set.
-func (a *ACL) PolicyRead(policyID string, q *QueryOptions) (*ACLPolicy, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/policy/"+policyID)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out ACLPolicy
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// PolicyList retrieves a listing of all policies. The listing does not include the
-// rules for any policy as those should be retrieved by subsequent calls to PolicyRead.
-func (a *ACL) PolicyList(q *QueryOptions) ([]*ACLPolicyListEntry, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/policies")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLPolicyListEntry
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// RulesTranslate translates the legacy rule syntax into the current syntax.
-//
-// Deprecated: Support for the legacy syntax translation will be removed
-// when legacy ACL support is removed.
-func (a *ACL) RulesTranslate(rules io.Reader) (string, error) {
-	r := a.c.newRequest("POST", "/v1/acl/rules/translate")
-	r.body = rules
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return "", err
-	}
-	defer resp.Body.Close()
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	ruleBytes, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return "", fmt.Errorf("Failed to read translated rule body: %v", err)
-	}
-
-	return string(ruleBytes), nil
-}
-
-// RulesTranslateToken translates the rules associated with the legacy syntax
-// into the current syntax and returns the results.
-//
-// Deprecated: Support for the legacy syntax translation will be removed
-// when legacy ACL support is removed.
-func (a *ACL) RulesTranslateToken(tokenID string) (string, error) {
-	r := a.c.newRequest("GET", "/v1/acl/rules/translate/"+tokenID)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return "", err
-	}
-	defer resp.Body.Close()
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	ruleBytes, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return "", fmt.Errorf("Failed to read translated rule body: %v", err)
-	}
-
-	return string(ruleBytes), nil
-}
-
-// RoleCreate will create a new role. It is not allowed for the role parameters
-// ID field to be set as this will be generated by Consul while processing the request.
-func (a *ACL) RoleCreate(role *ACLRole, q *WriteOptions) (*ACLRole, *WriteMeta, error) {
-	if role.ID != "" {
-		return nil, nil, fmt.Errorf("Cannot specify an ID in Role Creation")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/role")
-	r.setWriteOptions(q)
-	r.obj = role
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLRole
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// RoleUpdate updates a role. The ID field of the role parameter must be set to an
-// existing role ID
-func (a *ACL) RoleUpdate(role *ACLRole, q *WriteOptions) (*ACLRole, *WriteMeta, error) {
-	if role.ID == "" {
-		return nil, nil, fmt.Errorf("Must specify an ID in Role Update")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/role/"+role.ID)
-	r.setWriteOptions(q)
-	r.obj = role
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLRole
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// RoleDelete deletes a role given its ID.
-func (a *ACL) RoleDelete(roleID string, q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("DELETE", "/v1/acl/role/"+roleID)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// RoleRead retrieves the role details (by ID). Returns nil if not found.
-func (a *ACL) RoleRead(roleID string, q *QueryOptions) (*ACLRole, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/role/"+roleID)
-	r.setQueryOptions(q)
-	found, rtt, resp, err := requireNotFoundOrOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if !found {
-		return nil, qm, nil
-	}
-
-	var out ACLRole
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// RoleReadByName retrieves the role details (by name). Returns nil if not found.
-func (a *ACL) RoleReadByName(roleName string, q *QueryOptions) (*ACLRole, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/role/name/"+url.QueryEscape(roleName))
-	r.setQueryOptions(q)
-	found, rtt, resp, err := requireNotFoundOrOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if !found {
-		return nil, qm, nil
-	}
-
-	var out ACLRole
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// RoleList retrieves a listing of all roles. The listing does not include some
-// metadata for the role as those should be retrieved by subsequent calls to
-// RoleRead.
-func (a *ACL) RoleList(q *QueryOptions) ([]*ACLRole, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/roles")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLRole
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// AuthMethodCreate will create a new auth method.
-func (a *ACL) AuthMethodCreate(method *ACLAuthMethod, q *WriteOptions) (*ACLAuthMethod, *WriteMeta, error) {
-	if method.Name == "" {
-		return nil, nil, fmt.Errorf("Must specify a Name in Auth Method Creation")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/auth-method")
-	r.setWriteOptions(q)
-	r.obj = method
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLAuthMethod
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// AuthMethodUpdate updates an auth method.
-func (a *ACL) AuthMethodUpdate(method *ACLAuthMethod, q *WriteOptions) (*ACLAuthMethod, *WriteMeta, error) {
-	if method.Name == "" {
-		return nil, nil, fmt.Errorf("Must specify a Name in Auth Method Update")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/auth-method/"+url.QueryEscape(method.Name))
-	r.setWriteOptions(q)
-	r.obj = method
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLAuthMethod
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// AuthMethodDelete deletes an auth method given its Name.
-func (a *ACL) AuthMethodDelete(methodName string, q *WriteOptions) (*WriteMeta, error) {
-	if methodName == "" {
-		return nil, fmt.Errorf("Must specify a Name in Auth Method Delete")
-	}
-
-	r := a.c.newRequest("DELETE", "/v1/acl/auth-method/"+url.QueryEscape(methodName))
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// AuthMethodRead retrieves the auth method. Returns nil if not found.
-func (a *ACL) AuthMethodRead(methodName string, q *QueryOptions) (*ACLAuthMethod, *QueryMeta, error) {
-	if methodName == "" {
-		return nil, nil, fmt.Errorf("Must specify a Name in Auth Method Read")
-	}
-
-	r := a.c.newRequest("GET", "/v1/acl/auth-method/"+url.QueryEscape(methodName))
-	r.setQueryOptions(q)
-	found, rtt, resp, err := requireNotFoundOrOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if !found {
-		return nil, qm, nil
-	}
-
-	var out ACLAuthMethod
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// AuthMethodList retrieves a listing of all auth methods. The listing does not
-// include some metadata for the auth method as those should be retrieved by
-// subsequent calls to AuthMethodRead.
-func (a *ACL) AuthMethodList(q *QueryOptions) ([]*ACLAuthMethodListEntry, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/auth-methods")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLAuthMethodListEntry
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// BindingRuleCreate will create a new binding rule. It is not allowed for the
-// binding rule parameter's ID field to be set as this will be generated by
-// Consul while processing the request.
-func (a *ACL) BindingRuleCreate(rule *ACLBindingRule, q *WriteOptions) (*ACLBindingRule, *WriteMeta, error) {
-	if rule.ID != "" {
-		return nil, nil, fmt.Errorf("Cannot specify an ID in Binding Rule Creation")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/binding-rule")
-	r.setWriteOptions(q)
-	r.obj = rule
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLBindingRule
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// BindingRuleUpdate updates a binding rule. The ID field of the role binding
-// rule parameter must be set to an existing binding rule ID.
-func (a *ACL) BindingRuleUpdate(rule *ACLBindingRule, q *WriteOptions) (*ACLBindingRule, *WriteMeta, error) {
-	if rule.ID == "" {
-		return nil, nil, fmt.Errorf("Must specify an ID in Binding Rule Update")
-	}
-
-	r := a.c.newRequest("PUT", "/v1/acl/binding-rule/"+rule.ID)
-	r.setWriteOptions(q)
-	r.obj = rule
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLBindingRule
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, wm, nil
-}
-
-// BindingRuleDelete deletes a binding rule given its ID.
-func (a *ACL) BindingRuleDelete(bindingRuleID string, q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("DELETE", "/v1/acl/binding-rule/"+bindingRuleID)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
-
-// BindingRuleRead retrieves the binding rule details. Returns nil if not found.
-func (a *ACL) BindingRuleRead(bindingRuleID string, q *QueryOptions) (*ACLBindingRule, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/binding-rule/"+bindingRuleID)
-	r.setQueryOptions(q)
-	found, rtt, resp, err := requireNotFoundOrOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if !found {
-		return nil, qm, nil
-	}
-
-	var out ACLBindingRule
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-// BindingRuleList retrieves a listing of all binding rules.
-func (a *ACL) BindingRuleList(methodName string, q *QueryOptions) ([]*ACLBindingRule, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/acl/binding-rules")
-	if methodName != "" {
-		r.params.Set("authmethod", methodName)
-	}
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*ACLBindingRule
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// Login is used to exchange auth method credentials for a newly-minted Consul Token.
-func (a *ACL) Login(auth *ACLLoginParams, q *WriteOptions) (*ACLToken, *WriteMeta, error) {
-	r := a.c.newRequest("POST", "/v1/acl/login")
-	r.setWriteOptions(q)
-	r.obj = auth
-
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out ACLToken
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, wm, nil
-}
-
-// Logout is used to destroy a Consul Token created via Login().
-func (a *ACL) Logout(q *WriteOptions) (*WriteMeta, error) {
-	r := a.c.newRequest("POST", "/v1/acl/logout")
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/agent.go b/vendor/github.com/hashicorp/consul/api/agent.go
deleted file mode 100644
index 1ef3312..0000000
--- a/vendor/github.com/hashicorp/consul/api/agent.go
+++ /dev/null
@@ -1,984 +0,0 @@
-package api
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"io"
-	"net/http"
-	"net/url"
-)
-
-// ServiceKind is the kind of service being registered.
-type ServiceKind string
-
-const (
-	// ServiceKindTypical is a typical, classic Consul service. This is
-	// represented by the absence of a value. This was chosen for ease of
-	// backwards compatibility: existing services in the catalog would
-	// default to the typical service.
-	ServiceKindTypical ServiceKind = ""
-
-	// ServiceKindConnectProxy is a proxy for the Connect feature. This
-	// service proxies another service within Consul and speaks the connect
-	// protocol.
-	ServiceKindConnectProxy ServiceKind = "connect-proxy"
-
-	// ServiceKindMeshGateway is a Mesh Gateway for the Connect feature. This
-	// service will proxy connections based off the SNI header set by other
-	// connect proxies
-	ServiceKindMeshGateway ServiceKind = "mesh-gateway"
-)
-
-// UpstreamDestType is the type of upstream discovery mechanism.
-type UpstreamDestType string
-
-const (
-	// UpstreamDestTypeService discovers instances via healthy service lookup.
-	UpstreamDestTypeService UpstreamDestType = "service"
-
-	// UpstreamDestTypePreparedQuery discovers instances via prepared query
-	// execution.
-	UpstreamDestTypePreparedQuery UpstreamDestType = "prepared_query"
-)
-
-// AgentCheck represents a check known to the agent
-type AgentCheck struct {
-	Node        string
-	CheckID     string
-	Name        string
-	Status      string
-	Notes       string
-	Output      string
-	ServiceID   string
-	ServiceName string
-	Definition  HealthCheckDefinition
-}
-
-// AgentWeights represent optional weights for a service
-type AgentWeights struct {
-	Passing int
-	Warning int
-}
-
-// AgentService represents a service known to the agent
-type AgentService struct {
-	Kind              ServiceKind `json:",omitempty"`
-	ID                string
-	Service           string
-	Tags              []string
-	Meta              map[string]string
-	Port              int
-	Address           string
-	TaggedAddresses   map[string]ServiceAddress `json:",omitempty"`
-	Weights           AgentWeights
-	EnableTagOverride bool
-	CreateIndex       uint64                          `json:",omitempty" bexpr:"-"`
-	ModifyIndex       uint64                          `json:",omitempty" bexpr:"-"`
-	ContentHash       string                          `json:",omitempty" bexpr:"-"`
-	Proxy             *AgentServiceConnectProxyConfig `json:",omitempty"`
-	Connect           *AgentServiceConnect            `json:",omitempty"`
-}
-
-// AgentServiceChecksInfo returns information about a Service and its checks
-type AgentServiceChecksInfo struct {
-	AggregatedStatus string
-	Service          *AgentService
-	Checks           HealthChecks
-}
-
-// AgentServiceConnect represents the Connect configuration of a service.
-type AgentServiceConnect struct {
-	Native         bool                      `json:",omitempty"`
-	SidecarService *AgentServiceRegistration `json:",omitempty" bexpr:"-"`
-}
-
-// AgentServiceConnectProxyConfig is the proxy configuration in a connect-proxy
-// ServiceDefinition or response.
-type AgentServiceConnectProxyConfig struct {
-	DestinationServiceName string                 `json:",omitempty"`
-	DestinationServiceID   string                 `json:",omitempty"`
-	LocalServiceAddress    string                 `json:",omitempty"`
-	LocalServicePort       int                    `json:",omitempty"`
-	Config                 map[string]interface{} `json:",omitempty" bexpr:"-"`
-	Upstreams              []Upstream             `json:",omitempty"`
-	MeshGateway            MeshGatewayConfig      `json:",omitempty"`
-}
-
-// AgentMember represents a cluster member known to the agent
-type AgentMember struct {
-	Name        string
-	Addr        string
-	Port        uint16
-	Tags        map[string]string
-	Status      int
-	ProtocolMin uint8
-	ProtocolMax uint8
-	ProtocolCur uint8
-	DelegateMin uint8
-	DelegateMax uint8
-	DelegateCur uint8
-}
-
-// AllSegments is used to select for all segments in MembersOpts.
-const AllSegments = "_all"
-
-// MembersOpts is used for querying member information.
-type MembersOpts struct {
-	// WAN is whether to show members from the WAN.
-	WAN bool
-
-	// Segment is the LAN segment to show members for. Setting this to the
-	// AllSegments value above will show members in all segments.
-	Segment string
-}
-
-// AgentServiceRegistration is used to register a new service
-type AgentServiceRegistration struct {
-	Kind              ServiceKind               `json:",omitempty"`
-	ID                string                    `json:",omitempty"`
-	Name              string                    `json:",omitempty"`
-	Tags              []string                  `json:",omitempty"`
-	Port              int                       `json:",omitempty"`
-	Address           string                    `json:",omitempty"`
-	TaggedAddresses   map[string]ServiceAddress `json:",omitempty"`
-	EnableTagOverride bool                      `json:",omitempty"`
-	Meta              map[string]string         `json:",omitempty"`
-	Weights           *AgentWeights             `json:",omitempty"`
-	Check             *AgentServiceCheck
-	Checks            AgentServiceChecks
-	Proxy             *AgentServiceConnectProxyConfig `json:",omitempty"`
-	Connect           *AgentServiceConnect            `json:",omitempty"`
-}
-
-// AgentCheckRegistration is used to register a new check
-type AgentCheckRegistration struct {
-	ID        string `json:",omitempty"`
-	Name      string `json:",omitempty"`
-	Notes     string `json:",omitempty"`
-	ServiceID string `json:",omitempty"`
-	AgentServiceCheck
-}
-
-// AgentServiceCheck is used to define a node or service level check
-type AgentServiceCheck struct {
-	CheckID           string              `json:",omitempty"`
-	Name              string              `json:",omitempty"`
-	Args              []string            `json:"ScriptArgs,omitempty"`
-	DockerContainerID string              `json:",omitempty"`
-	Shell             string              `json:",omitempty"` // Only supported for Docker.
-	Interval          string              `json:",omitempty"`
-	Timeout           string              `json:",omitempty"`
-	TTL               string              `json:",omitempty"`
-	HTTP              string              `json:",omitempty"`
-	Header            map[string][]string `json:",omitempty"`
-	Method            string              `json:",omitempty"`
-	TCP               string              `json:",omitempty"`
-	Status            string              `json:",omitempty"`
-	Notes             string              `json:",omitempty"`
-	TLSSkipVerify     bool                `json:",omitempty"`
-	GRPC              string              `json:",omitempty"`
-	GRPCUseTLS        bool                `json:",omitempty"`
-	AliasNode         string              `json:",omitempty"`
-	AliasService      string              `json:",omitempty"`
-
-	// In Consul 0.7 and later, checks that are associated with a service
-	// may also contain this optional DeregisterCriticalServiceAfter field,
-	// which is a timeout in the same Go time format as Interval and TTL. If
-	// a check is in the critical state for more than this configured value,
-	// then its associated service (and all of its associated checks) will
-	// automatically be deregistered.
-	DeregisterCriticalServiceAfter string `json:",omitempty"`
-}
-type AgentServiceChecks []*AgentServiceCheck
-
-// AgentToken is used when updating ACL tokens for an agent.
-type AgentToken struct {
-	Token string
-}
-
-// Metrics info is used to store different types of metric values from the agent.
-type MetricsInfo struct {
-	Timestamp string
-	Gauges    []GaugeValue
-	Points    []PointValue
-	Counters  []SampledValue
-	Samples   []SampledValue
-}
-
-// GaugeValue stores one value that is updated as time goes on, such as
-// the amount of memory allocated.
-type GaugeValue struct {
-	Name   string
-	Value  float32
-	Labels map[string]string
-}
-
-// PointValue holds a series of points for a metric.
-type PointValue struct {
-	Name   string
-	Points []float32
-}
-
-// SampledValue stores info about a metric that is incremented over time,
-// such as the number of requests to an HTTP endpoint.
-type SampledValue struct {
-	Name   string
-	Count  int
-	Sum    float64
-	Min    float64
-	Max    float64
-	Mean   float64
-	Stddev float64
-	Labels map[string]string
-}
-
-// AgentAuthorizeParams are the request parameters for authorizing a request.
-type AgentAuthorizeParams struct {
-	Target           string
-	ClientCertURI    string
-	ClientCertSerial string
-}
-
-// AgentAuthorize is the response structure for Connect authorization.
-type AgentAuthorize struct {
-	Authorized bool
-	Reason     string
-}
-
-// ConnectProxyConfig is the response structure for agent-local proxy
-// configuration.
-type ConnectProxyConfig struct {
-	ProxyServiceID    string
-	TargetServiceID   string
-	TargetServiceName string
-	ContentHash       string
-	Config            map[string]interface{} `bexpr:"-"`
-	Upstreams         []Upstream
-}
-
-// Upstream is the response structure for a proxy upstream configuration.
-type Upstream struct {
-	DestinationType      UpstreamDestType `json:",omitempty"`
-	DestinationNamespace string           `json:",omitempty"`
-	DestinationName      string
-	Datacenter           string                 `json:",omitempty"`
-	LocalBindAddress     string                 `json:",omitempty"`
-	LocalBindPort        int                    `json:",omitempty"`
-	Config               map[string]interface{} `json:",omitempty" bexpr:"-"`
-	MeshGateway          MeshGatewayConfig      `json:",omitempty"`
-}
-
-// Agent can be used to query the Agent endpoints
-type Agent struct {
-	c *Client
-
-	// cache the node name
-	nodeName string
-}
-
-// Agent returns a handle to the agent endpoints
-func (c *Client) Agent() *Agent {
-	return &Agent{c: c}
-}
-
-// Self is used to query the agent we are speaking to for
-// information about itself
-func (a *Agent) Self() (map[string]map[string]interface{}, error) {
-	r := a.c.newRequest("GET", "/v1/agent/self")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out map[string]map[string]interface{}
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// Host is used to retrieve information about the host the
-// agent is running on such as CPU, memory, and disk. Requires
-// a operator:read ACL token.
-func (a *Agent) Host() (map[string]interface{}, error) {
-	r := a.c.newRequest("GET", "/v1/agent/host")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out map[string]interface{}
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// Metrics is used to query the agent we are speaking to for
-// its current internal metric data
-func (a *Agent) Metrics() (*MetricsInfo, error) {
-	r := a.c.newRequest("GET", "/v1/agent/metrics")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out *MetricsInfo
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// Reload triggers a configuration reload for the agent we are connected to.
-func (a *Agent) Reload() error {
-	r := a.c.newRequest("PUT", "/v1/agent/reload")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// NodeName is used to get the node name of the agent
-func (a *Agent) NodeName() (string, error) {
-	if a.nodeName != "" {
-		return a.nodeName, nil
-	}
-	info, err := a.Self()
-	if err != nil {
-		return "", err
-	}
-	name := info["Config"]["NodeName"].(string)
-	a.nodeName = name
-	return name, nil
-}
-
-// Checks returns the locally registered checks
-func (a *Agent) Checks() (map[string]*AgentCheck, error) {
-	return a.ChecksWithFilter("")
-}
-
-// ChecksWithFilter returns a subset of the locally registered checks that match
-// the given filter expression
-func (a *Agent) ChecksWithFilter(filter string) (map[string]*AgentCheck, error) {
-	r := a.c.newRequest("GET", "/v1/agent/checks")
-	r.filterQuery(filter)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out map[string]*AgentCheck
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// Services returns the locally registered services
-func (a *Agent) Services() (map[string]*AgentService, error) {
-	return a.ServicesWithFilter("")
-}
-
-// ServicesWithFilter returns a subset of the locally registered services that match
-// the given filter expression
-func (a *Agent) ServicesWithFilter(filter string) (map[string]*AgentService, error) {
-	r := a.c.newRequest("GET", "/v1/agent/services")
-	r.filterQuery(filter)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out map[string]*AgentService
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-
-	return out, nil
-}
-
-// AgentHealthServiceByID returns for a given serviceID: the aggregated health status, the service definition or an error if any
-// - If the service is not found, will return status (critical, nil, nil)
-// - If the service is found, will return (critical|passing|warning), AgentServiceChecksInfo, nil)
-// - In all other cases, will return an error
-func (a *Agent) AgentHealthServiceByID(serviceID string) (string, *AgentServiceChecksInfo, error) {
-	path := fmt.Sprintf("/v1/agent/health/service/id/%v", url.PathEscape(serviceID))
-	r := a.c.newRequest("GET", path)
-	r.params.Add("format", "json")
-	r.header.Set("Accept", "application/json")
-	_, resp, err := a.c.doRequest(r)
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-	// Service not Found
-	if resp.StatusCode == http.StatusNotFound {
-		return HealthCritical, nil, nil
-	}
-	var out *AgentServiceChecksInfo
-	if err := decodeBody(resp, &out); err != nil {
-		return HealthCritical, out, err
-	}
-	switch resp.StatusCode {
-	case http.StatusOK:
-		return HealthPassing, out, nil
-	case http.StatusTooManyRequests:
-		return HealthWarning, out, nil
-	case http.StatusServiceUnavailable:
-		return HealthCritical, out, nil
-	}
-	return HealthCritical, out, fmt.Errorf("Unexpected Error Code %v for %s", resp.StatusCode, path)
-}
-
-// AgentHealthServiceByName returns for a given service name: the aggregated health status for all services
-// having the specified name.
-// - If no service is not found, will return status (critical, [], nil)
-// - If the service is found, will return (critical|passing|warning), []api.AgentServiceChecksInfo, nil)
-// - In all other cases, will return an error
-func (a *Agent) AgentHealthServiceByName(service string) (string, []AgentServiceChecksInfo, error) {
-	path := fmt.Sprintf("/v1/agent/health/service/name/%v", url.PathEscape(service))
-	r := a.c.newRequest("GET", path)
-	r.params.Add("format", "json")
-	r.header.Set("Accept", "application/json")
-	_, resp, err := a.c.doRequest(r)
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-	// Service not Found
-	if resp.StatusCode == http.StatusNotFound {
-		return HealthCritical, nil, nil
-	}
-	var out []AgentServiceChecksInfo
-	if err := decodeBody(resp, &out); err != nil {
-		return HealthCritical, out, err
-	}
-	switch resp.StatusCode {
-	case http.StatusOK:
-		return HealthPassing, out, nil
-	case http.StatusTooManyRequests:
-		return HealthWarning, out, nil
-	case http.StatusServiceUnavailable:
-		return HealthCritical, out, nil
-	}
-	return HealthCritical, out, fmt.Errorf("Unexpected Error Code %v for %s", resp.StatusCode, path)
-}
-
-// Service returns a locally registered service instance and allows for
-// hash-based blocking.
-//
-// Note that this uses an unconventional blocking mechanism since it's
-// agent-local state. That means there is no persistent raft index so we block
-// based on object hash instead.
-func (a *Agent) Service(serviceID string, q *QueryOptions) (*AgentService, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/agent/service/"+serviceID)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out *AgentService
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return out, qm, nil
-}
-
-// Members returns the known gossip members. The WAN
-// flag can be used to query a server for WAN members.
-func (a *Agent) Members(wan bool) ([]*AgentMember, error) {
-	r := a.c.newRequest("GET", "/v1/agent/members")
-	if wan {
-		r.params.Set("wan", "1")
-	}
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out []*AgentMember
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// MembersOpts returns the known gossip members and can be passed
-// additional options for WAN/segment filtering.
-func (a *Agent) MembersOpts(opts MembersOpts) ([]*AgentMember, error) {
-	r := a.c.newRequest("GET", "/v1/agent/members")
-	r.params.Set("segment", opts.Segment)
-	if opts.WAN {
-		r.params.Set("wan", "1")
-	}
-
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out []*AgentMember
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// ServiceRegister is used to register a new service with
-// the local agent
-func (a *Agent) ServiceRegister(service *AgentServiceRegistration) error {
-	r := a.c.newRequest("PUT", "/v1/agent/service/register")
-	r.obj = service
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// ServiceDeregister is used to deregister a service with
-// the local agent
-func (a *Agent) ServiceDeregister(serviceID string) error {
-	r := a.c.newRequest("PUT", "/v1/agent/service/deregister/"+serviceID)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// PassTTL is used to set a TTL check to the passing state.
-//
-// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL().
-// The client interface will be removed in 0.8 or changed to use
-// UpdateTTL()'s endpoint and the server endpoints will be removed in 0.9.
-func (a *Agent) PassTTL(checkID, note string) error {
-	return a.updateTTL(checkID, note, "pass")
-}
-
-// WarnTTL is used to set a TTL check to the warning state.
-//
-// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL().
-// The client interface will be removed in 0.8 or changed to use
-// UpdateTTL()'s endpoint and the server endpoints will be removed in 0.9.
-func (a *Agent) WarnTTL(checkID, note string) error {
-	return a.updateTTL(checkID, note, "warn")
-}
-
-// FailTTL is used to set a TTL check to the failing state.
-//
-// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL().
-// The client interface will be removed in 0.8 or changed to use
-// UpdateTTL()'s endpoint and the server endpoints will be removed in 0.9.
-func (a *Agent) FailTTL(checkID, note string) error {
-	return a.updateTTL(checkID, note, "fail")
-}
-
-// updateTTL is used to update the TTL of a check. This is the internal
-// method that uses the old API that's present in Consul versions prior to
-// 0.6.4. Since Consul didn't have an analogous "update" API before it seemed
-// ok to break this (former) UpdateTTL in favor of the new UpdateTTL below,
-// but keep the old Pass/Warn/Fail methods using the old API under the hood.
-//
-// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL().
-// The client interface will be removed in 0.8 and the server endpoints will
-// be removed in 0.9.
-func (a *Agent) updateTTL(checkID, note, status string) error {
-	switch status {
-	case "pass":
-	case "warn":
-	case "fail":
-	default:
-		return fmt.Errorf("Invalid status: %s", status)
-	}
-	endpoint := fmt.Sprintf("/v1/agent/check/%s/%s", status, checkID)
-	r := a.c.newRequest("PUT", endpoint)
-	r.params.Set("note", note)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// checkUpdate is the payload for a PUT for a check update.
-type checkUpdate struct {
-	// Status is one of the api.Health* states: HealthPassing
-	// ("passing"), HealthWarning ("warning"), or HealthCritical
-	// ("critical").
-	Status string
-
-	// Output is the information to post to the UI for operators as the
-	// output of the process that decided to hit the TTL check. This is
-	// different from the note field that's associated with the check
-	// itself.
-	Output string
-}
-
-// UpdateTTL is used to update the TTL of a check. This uses the newer API
-// that was introduced in Consul 0.6.4 and later. We translate the old status
-// strings for compatibility (though a newer version of Consul will still be
-// required to use this API).
-func (a *Agent) UpdateTTL(checkID, output, status string) error {
-	switch status {
-	case "pass", HealthPassing:
-		status = HealthPassing
-	case "warn", HealthWarning:
-		status = HealthWarning
-	case "fail", HealthCritical:
-		status = HealthCritical
-	default:
-		return fmt.Errorf("Invalid status: %s", status)
-	}
-
-	endpoint := fmt.Sprintf("/v1/agent/check/update/%s", checkID)
-	r := a.c.newRequest("PUT", endpoint)
-	r.obj = &checkUpdate{
-		Status: status,
-		Output: output,
-	}
-
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// CheckRegister is used to register a new check with
-// the local agent
-func (a *Agent) CheckRegister(check *AgentCheckRegistration) error {
-	r := a.c.newRequest("PUT", "/v1/agent/check/register")
-	r.obj = check
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// CheckDeregister is used to deregister a check with
-// the local agent
-func (a *Agent) CheckDeregister(checkID string) error {
-	r := a.c.newRequest("PUT", "/v1/agent/check/deregister/"+checkID)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// Join is used to instruct the agent to attempt a join to
-// another cluster member
-func (a *Agent) Join(addr string, wan bool) error {
-	r := a.c.newRequest("PUT", "/v1/agent/join/"+addr)
-	if wan {
-		r.params.Set("wan", "1")
-	}
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// Leave is used to have the agent gracefully leave the cluster and shutdown
-func (a *Agent) Leave() error {
-	r := a.c.newRequest("PUT", "/v1/agent/leave")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// ForceLeave is used to have the agent eject a failed node
-func (a *Agent) ForceLeave(node string) error {
-	r := a.c.newRequest("PUT", "/v1/agent/force-leave/"+node)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// ConnectAuthorize is used to authorize an incoming connection
-// to a natively integrated Connect service.
-func (a *Agent) ConnectAuthorize(auth *AgentAuthorizeParams) (*AgentAuthorize, error) {
-	r := a.c.newRequest("POST", "/v1/agent/connect/authorize")
-	r.obj = auth
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out AgentAuthorize
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return &out, nil
-}
-
-// ConnectCARoots returns the list of roots.
-func (a *Agent) ConnectCARoots(q *QueryOptions) (*CARootList, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/agent/connect/ca/roots")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out CARootList
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, qm, nil
-}
-
-// ConnectCALeaf gets the leaf certificate for the given service ID.
-func (a *Agent) ConnectCALeaf(serviceID string, q *QueryOptions) (*LeafCert, *QueryMeta, error) {
-	r := a.c.newRequest("GET", "/v1/agent/connect/ca/leaf/"+serviceID)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out LeafCert
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, qm, nil
-}
-
-// EnableServiceMaintenance toggles service maintenance mode on
-// for the given service ID.
-func (a *Agent) EnableServiceMaintenance(serviceID, reason string) error {
-	r := a.c.newRequest("PUT", "/v1/agent/service/maintenance/"+serviceID)
-	r.params.Set("enable", "true")
-	r.params.Set("reason", reason)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// DisableServiceMaintenance toggles service maintenance mode off
-// for the given service ID.
-func (a *Agent) DisableServiceMaintenance(serviceID string) error {
-	r := a.c.newRequest("PUT", "/v1/agent/service/maintenance/"+serviceID)
-	r.params.Set("enable", "false")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// EnableNodeMaintenance toggles node maintenance mode on for the
-// agent we are connected to.
-func (a *Agent) EnableNodeMaintenance(reason string) error {
-	r := a.c.newRequest("PUT", "/v1/agent/maintenance")
-	r.params.Set("enable", "true")
-	r.params.Set("reason", reason)
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// DisableNodeMaintenance toggles node maintenance mode off for the
-// agent we are connected to.
-func (a *Agent) DisableNodeMaintenance() error {
-	r := a.c.newRequest("PUT", "/v1/agent/maintenance")
-	r.params.Set("enable", "false")
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// Monitor returns a channel which will receive streaming logs from the agent
-// Providing a non-nil stopCh can be used to close the connection and stop the
-// log stream. An empty string will be sent down the given channel when there's
-// nothing left to stream, after which the caller should close the stopCh.
-func (a *Agent) Monitor(loglevel string, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) {
-	r := a.c.newRequest("GET", "/v1/agent/monitor")
-	r.setQueryOptions(q)
-	if loglevel != "" {
-		r.params.Add("loglevel", loglevel)
-	}
-	_, resp, err := requireOK(a.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-
-	logCh := make(chan string, 64)
-	go func() {
-		defer resp.Body.Close()
-
-		scanner := bufio.NewScanner(resp.Body)
-		for {
-			select {
-			case <-stopCh:
-				close(logCh)
-				return
-			default:
-			}
-			if scanner.Scan() {
-				// An empty string signals to the caller that
-				// the scan is done, so make sure we only emit
-				// that when the scanner says it's done, not if
-				// we happen to ingest an empty line.
-				if text := scanner.Text(); text != "" {
-					logCh <- text
-				} else {
-					logCh <- " "
-				}
-			} else {
-				logCh <- ""
-			}
-		}
-	}()
-
-	return logCh, nil
-}
-
-// UpdateACLToken updates the agent's "acl_token". See updateToken for more
-// details.
-//
-// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateDefaultACLToken for v1.4.3 and above
-func (a *Agent) UpdateACLToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateToken("acl_token", token, q)
-}
-
-// UpdateACLAgentToken updates the agent's "acl_agent_token". See updateToken
-// for more details.
-//
-// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateAgentACLToken for v1.4.3 and above
-func (a *Agent) UpdateACLAgentToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateToken("acl_agent_token", token, q)
-}
-
-// UpdateACLAgentMasterToken updates the agent's "acl_agent_master_token". See
-// updateToken for more details.
-//
-// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateAgentMasterACLToken for v1.4.3 and above
-func (a *Agent) UpdateACLAgentMasterToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateToken("acl_agent_master_token", token, q)
-}
-
-// UpdateACLReplicationToken updates the agent's "acl_replication_token". See
-// updateToken for more details.
-//
-// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateReplicationACLToken for v1.4.3 and above
-func (a *Agent) UpdateACLReplicationToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateToken("acl_replication_token", token, q)
-}
-
-// UpdateDefaultACLToken updates the agent's "default" token. See updateToken
-// for more details
-func (a *Agent) UpdateDefaultACLToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateTokenFallback("default", "acl_token", token, q)
-}
-
-// UpdateAgentACLToken updates the agent's "agent" token. See updateToken
-// for more details
-func (a *Agent) UpdateAgentACLToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateTokenFallback("agent", "acl_agent_token", token, q)
-}
-
-// UpdateAgentMasterACLToken updates the agent's "agent_master" token. See updateToken
-// for more details
-func (a *Agent) UpdateAgentMasterACLToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateTokenFallback("agent_master", "acl_agent_master_token", token, q)
-}
-
-// UpdateReplicationACLToken updates the agent's "replication" token. See updateToken
-// for more details
-func (a *Agent) UpdateReplicationACLToken(token string, q *WriteOptions) (*WriteMeta, error) {
-	return a.updateTokenFallback("replication", "acl_replication_token", token, q)
-}
-
-// updateToken can be used to update one of an agent's ACL tokens after the agent has
-// started. The tokens are may not be persisted, so will need to be updated again if
-// the agent is restarted unless the agent is configured to persist them.
-func (a *Agent) updateToken(target, token string, q *WriteOptions) (*WriteMeta, error) {
-	meta, _, err := a.updateTokenOnce(target, token, q)
-	return meta, err
-}
-
-func (a *Agent) updateTokenFallback(target, fallback, token string, q *WriteOptions) (*WriteMeta, error) {
-	meta, status, err := a.updateTokenOnce(target, token, q)
-	if err != nil && status == 404 {
-		meta, _, err = a.updateTokenOnce(fallback, token, q)
-	}
-	return meta, err
-}
-
-func (a *Agent) updateTokenOnce(target, token string, q *WriteOptions) (*WriteMeta, int, error) {
-	r := a.c.newRequest("PUT", fmt.Sprintf("/v1/agent/token/%s", target))
-	r.setWriteOptions(q)
-	r.obj = &AgentToken{Token: token}
-
-	rtt, resp, err := a.c.doRequest(r)
-	if err != nil {
-		return nil, 0, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-
-	if resp.StatusCode != 200 {
-		var buf bytes.Buffer
-		io.Copy(&buf, resp.Body)
-		return wm, resp.StatusCode, fmt.Errorf("Unexpected response code: %d (%s)", resp.StatusCode, buf.Bytes())
-	}
-
-	return wm, resp.StatusCode, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/api.go b/vendor/github.com/hashicorp/consul/api/api.go
deleted file mode 100644
index b624b3c..0000000
--- a/vendor/github.com/hashicorp/consul/api/api.go
+++ /dev/null
@@ -1,973 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"context"
-	"crypto/tls"
-	"encoding/json"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"net"
-	"net/http"
-	"net/url"
-	"os"
-	"strconv"
-	"strings"
-	"time"
-
-	"github.com/hashicorp/go-cleanhttp"
-	"github.com/hashicorp/go-rootcerts"
-)
-
-const (
-	// HTTPAddrEnvName defines an environment variable name which sets
-	// the HTTP address if there is no -http-addr specified.
-	HTTPAddrEnvName = "CONSUL_HTTP_ADDR"
-
-	// HTTPTokenEnvName defines an environment variable name which sets
-	// the HTTP token.
-	HTTPTokenEnvName = "CONSUL_HTTP_TOKEN"
-
-	// HTTPTokenFileEnvName defines an environment variable name which sets
-	// the HTTP token file.
-	HTTPTokenFileEnvName = "CONSUL_HTTP_TOKEN_FILE"
-
-	// HTTPAuthEnvName defines an environment variable name which sets
-	// the HTTP authentication header.
-	HTTPAuthEnvName = "CONSUL_HTTP_AUTH"
-
-	// HTTPSSLEnvName defines an environment variable name which sets
-	// whether or not to use HTTPS.
-	HTTPSSLEnvName = "CONSUL_HTTP_SSL"
-
-	// HTTPCAFile defines an environment variable name which sets the
-	// CA file to use for talking to Consul over TLS.
-	HTTPCAFile = "CONSUL_CACERT"
-
-	// HTTPCAPath defines an environment variable name which sets the
-	// path to a directory of CA certs to use for talking to Consul over TLS.
-	HTTPCAPath = "CONSUL_CAPATH"
-
-	// HTTPClientCert defines an environment variable name which sets the
-	// client cert file to use for talking to Consul over TLS.
-	HTTPClientCert = "CONSUL_CLIENT_CERT"
-
-	// HTTPClientKey defines an environment variable name which sets the
-	// client key file to use for talking to Consul over TLS.
-	HTTPClientKey = "CONSUL_CLIENT_KEY"
-
-	// HTTPTLSServerName defines an environment variable name which sets the
-	// server name to use as the SNI host when connecting via TLS
-	HTTPTLSServerName = "CONSUL_TLS_SERVER_NAME"
-
-	// HTTPSSLVerifyEnvName defines an environment variable name which sets
-	// whether or not to disable certificate checking.
-	HTTPSSLVerifyEnvName = "CONSUL_HTTP_SSL_VERIFY"
-
-	// GRPCAddrEnvName defines an environment variable name which sets the gRPC
-	// address for consul connect envoy. Note this isn't actually used by the api
-	// client in this package but is defined here for consistency with all the
-	// other ENV names we use.
-	GRPCAddrEnvName = "CONSUL_GRPC_ADDR"
-)
-
-// QueryOptions are used to parameterize a query
-type QueryOptions struct {
-	// Providing a datacenter overwrites the DC provided
-	// by the Config
-	Datacenter string
-
-	// AllowStale allows any Consul server (non-leader) to service
-	// a read. This allows for lower latency and higher throughput
-	AllowStale bool
-
-	// RequireConsistent forces the read to be fully consistent.
-	// This is more expensive but prevents ever performing a stale
-	// read.
-	RequireConsistent bool
-
-	// UseCache requests that the agent cache results locally. See
-	// https://www.consul.io/api/features/caching.html for more details on the
-	// semantics.
-	UseCache bool
-
-	// MaxAge limits how old a cached value will be returned if UseCache is true.
-	// If there is a cached response that is older than the MaxAge, it is treated
-	// as a cache miss and a new fetch invoked. If the fetch fails, the error is
-	// returned. Clients that wish to allow for stale results on error can set
-	// StaleIfError to a longer duration to change this behavior. It is ignored
-	// if the endpoint supports background refresh caching. See
-	// https://www.consul.io/api/features/caching.html for more details.
-	MaxAge time.Duration
-
-	// StaleIfError specifies how stale the client will accept a cached response
-	// if the servers are unavailable to fetch a fresh one. Only makes sense when
-	// UseCache is true and MaxAge is set to a lower, non-zero value. It is
-	// ignored if the endpoint supports background refresh caching. See
-	// https://www.consul.io/api/features/caching.html for more details.
-	StaleIfError time.Duration
-
-	// WaitIndex is used to enable a blocking query. Waits
-	// until the timeout or the next index is reached
-	WaitIndex uint64
-
-	// WaitHash is used by some endpoints instead of WaitIndex to perform blocking
-	// on state based on a hash of the response rather than a monotonic index.
-	// This is required when the state being blocked on is not stored in Raft, for
-	// example agent-local proxy configuration.
-	WaitHash string
-
-	// WaitTime is used to bound the duration of a wait.
-	// Defaults to that of the Config, but can be overridden.
-	WaitTime time.Duration
-
-	// Token is used to provide a per-request ACL token
-	// which overrides the agent's default token.
-	Token string
-
-	// Near is used to provide a node name that will sort the results
-	// in ascending order based on the estimated round trip time from
-	// that node. Setting this to "_agent" will use the agent's node
-	// for the sort.
-	Near string
-
-	// NodeMeta is used to filter results by nodes with the given
-	// metadata key/value pairs. Currently, only one key/value pair can
-	// be provided for filtering.
-	NodeMeta map[string]string
-
-	// RelayFactor is used in keyring operations to cause responses to be
-	// relayed back to the sender through N other random nodes. Must be
-	// a value from 0 to 5 (inclusive).
-	RelayFactor uint8
-
-	// LocalOnly is used in keyring list operation to force the keyring
-	// query to only hit local servers (no WAN traffic).
-	LocalOnly bool
-
-	// Connect filters prepared query execution to only include Connect-capable
-	// services. This currently affects prepared query execution.
-	Connect bool
-
-	// ctx is an optional context pass through to the underlying HTTP
-	// request layer. Use Context() and WithContext() to manage this.
-	ctx context.Context
-
-	// Filter requests filtering data prior to it being returned. The string
-	// is a go-bexpr compatible expression.
-	Filter string
-}
-
-func (o *QueryOptions) Context() context.Context {
-	if o != nil && o.ctx != nil {
-		return o.ctx
-	}
-	return context.Background()
-}
-
-func (o *QueryOptions) WithContext(ctx context.Context) *QueryOptions {
-	o2 := new(QueryOptions)
-	if o != nil {
-		*o2 = *o
-	}
-	o2.ctx = ctx
-	return o2
-}
-
-// WriteOptions are used to parameterize a write
-type WriteOptions struct {
-	// Providing a datacenter overwrites the DC provided
-	// by the Config
-	Datacenter string
-
-	// Token is used to provide a per-request ACL token
-	// which overrides the agent's default token.
-	Token string
-
-	// RelayFactor is used in keyring operations to cause responses to be
-	// relayed back to the sender through N other random nodes. Must be
-	// a value from 0 to 5 (inclusive).
-	RelayFactor uint8
-
-	// ctx is an optional context pass through to the underlying HTTP
-	// request layer. Use Context() and WithContext() to manage this.
-	ctx context.Context
-}
-
-func (o *WriteOptions) Context() context.Context {
-	if o != nil && o.ctx != nil {
-		return o.ctx
-	}
-	return context.Background()
-}
-
-func (o *WriteOptions) WithContext(ctx context.Context) *WriteOptions {
-	o2 := new(WriteOptions)
-	if o != nil {
-		*o2 = *o
-	}
-	o2.ctx = ctx
-	return o2
-}
-
-// QueryMeta is used to return meta data about a query
-type QueryMeta struct {
-	// LastIndex. This can be used as a WaitIndex to perform
-	// a blocking query
-	LastIndex uint64
-
-	// LastContentHash. This can be used as a WaitHash to perform a blocking query
-	// for endpoints that support hash-based blocking. Endpoints that do not
-	// support it will return an empty hash.
-	LastContentHash string
-
-	// Time of last contact from the leader for the
-	// server servicing the request
-	LastContact time.Duration
-
-	// Is there a known leader
-	KnownLeader bool
-
-	// How long did the request take
-	RequestTime time.Duration
-
-	// Is address translation enabled for HTTP responses on this agent
-	AddressTranslationEnabled bool
-
-	// CacheHit is true if the result was served from agent-local cache.
-	CacheHit bool
-
-	// CacheAge is set if request was ?cached and indicates how stale the cached
-	// response is.
-	CacheAge time.Duration
-}
-
-// WriteMeta is used to return meta data about a write
-type WriteMeta struct {
-	// How long did the request take
-	RequestTime time.Duration
-}
-
-// HttpBasicAuth is used to authenticate http client with HTTP Basic Authentication
-type HttpBasicAuth struct {
-	// Username to use for HTTP Basic Authentication
-	Username string
-
-	// Password to use for HTTP Basic Authentication
-	Password string
-}
-
-// Config is used to configure the creation of a client
-type Config struct {
-	// Address is the address of the Consul server
-	Address string
-
-	// Scheme is the URI scheme for the Consul server
-	Scheme string
-
-	// Datacenter to use. If not provided, the default agent datacenter is used.
-	Datacenter string
-
-	// Transport is the Transport to use for the http client.
-	Transport *http.Transport
-
-	// HttpClient is the client to use. Default will be
-	// used if not provided.
-	HttpClient *http.Client
-
-	// HttpAuth is the auth info to use for http access.
-	HttpAuth *HttpBasicAuth
-
-	// WaitTime limits how long a Watch will block. If not provided,
-	// the agent default values will be used.
-	WaitTime time.Duration
-
-	// Token is used to provide a per-request ACL token
-	// which overrides the agent's default token.
-	Token string
-
-	// TokenFile is a file containing the current token to use for this client.
-	// If provided it is read once at startup and never again.
-	TokenFile string
-
-	TLSConfig TLSConfig
-}
-
-// TLSConfig is used to generate a TLSClientConfig that's useful for talking to
-// Consul using TLS.
-type TLSConfig struct {
-	// Address is the optional address of the Consul server. The port, if any
-	// will be removed from here and this will be set to the ServerName of the
-	// resulting config.
-	Address string
-
-	// CAFile is the optional path to the CA certificate used for Consul
-	// communication, defaults to the system bundle if not specified.
-	CAFile string
-
-	// CAPath is the optional path to a directory of CA certificates to use for
-	// Consul communication, defaults to the system bundle if not specified.
-	CAPath string
-
-	// CertFile is the optional path to the certificate for Consul
-	// communication. If this is set then you need to also set KeyFile.
-	CertFile string
-
-	// KeyFile is the optional path to the private key for Consul communication.
-	// If this is set then you need to also set CertFile.
-	KeyFile string
-
-	// InsecureSkipVerify if set to true will disable TLS host verification.
-	InsecureSkipVerify bool
-}
-
-// DefaultConfig returns a default configuration for the client. By default this
-// will pool and reuse idle connections to Consul. If you have a long-lived
-// client object, this is the desired behavior and should make the most efficient
-// use of the connections to Consul. If you don't reuse a client object, which
-// is not recommended, then you may notice idle connections building up over
-// time. To avoid this, use the DefaultNonPooledConfig() instead.
-func DefaultConfig() *Config {
-	return defaultConfig(cleanhttp.DefaultPooledTransport)
-}
-
-// DefaultNonPooledConfig returns a default configuration for the client which
-// does not pool connections. This isn't a recommended configuration because it
-// will reconnect to Consul on every request, but this is useful to avoid the
-// accumulation of idle connections if you make many client objects during the
-// lifetime of your application.
-func DefaultNonPooledConfig() *Config {
-	return defaultConfig(cleanhttp.DefaultTransport)
-}
-
-// defaultConfig returns the default configuration for the client, using the
-// given function to make the transport.
-func defaultConfig(transportFn func() *http.Transport) *Config {
-	config := &Config{
-		Address:   "127.0.0.1:8500",
-		Scheme:    "http",
-		Transport: transportFn(),
-	}
-
-	if addr := os.Getenv(HTTPAddrEnvName); addr != "" {
-		config.Address = addr
-	}
-
-	if tokenFile := os.Getenv(HTTPTokenFileEnvName); tokenFile != "" {
-		config.TokenFile = tokenFile
-	}
-
-	if token := os.Getenv(HTTPTokenEnvName); token != "" {
-		config.Token = token
-	}
-
-	if auth := os.Getenv(HTTPAuthEnvName); auth != "" {
-		var username, password string
-		if strings.Contains(auth, ":") {
-			split := strings.SplitN(auth, ":", 2)
-			username = split[0]
-			password = split[1]
-		} else {
-			username = auth
-		}
-
-		config.HttpAuth = &HttpBasicAuth{
-			Username: username,
-			Password: password,
-		}
-	}
-
-	if ssl := os.Getenv(HTTPSSLEnvName); ssl != "" {
-		enabled, err := strconv.ParseBool(ssl)
-		if err != nil {
-			log.Printf("[WARN] client: could not parse %s: %s", HTTPSSLEnvName, err)
-		}
-
-		if enabled {
-			config.Scheme = "https"
-		}
-	}
-
-	if v := os.Getenv(HTTPTLSServerName); v != "" {
-		config.TLSConfig.Address = v
-	}
-	if v := os.Getenv(HTTPCAFile); v != "" {
-		config.TLSConfig.CAFile = v
-	}
-	if v := os.Getenv(HTTPCAPath); v != "" {
-		config.TLSConfig.CAPath = v
-	}
-	if v := os.Getenv(HTTPClientCert); v != "" {
-		config.TLSConfig.CertFile = v
-	}
-	if v := os.Getenv(HTTPClientKey); v != "" {
-		config.TLSConfig.KeyFile = v
-	}
-	if v := os.Getenv(HTTPSSLVerifyEnvName); v != "" {
-		doVerify, err := strconv.ParseBool(v)
-		if err != nil {
-			log.Printf("[WARN] client: could not parse %s: %s", HTTPSSLVerifyEnvName, err)
-		}
-		if !doVerify {
-			config.TLSConfig.InsecureSkipVerify = true
-		}
-	}
-
-	return config
-}
-
-// TLSConfig is used to generate a TLSClientConfig that's useful for talking to
-// Consul using TLS.
-func SetupTLSConfig(tlsConfig *TLSConfig) (*tls.Config, error) {
-	tlsClientConfig := &tls.Config{
-		InsecureSkipVerify: tlsConfig.InsecureSkipVerify,
-	}
-
-	if tlsConfig.Address != "" {
-		server := tlsConfig.Address
-		hasPort := strings.LastIndex(server, ":") > strings.LastIndex(server, "]")
-		if hasPort {
-			var err error
-			server, _, err = net.SplitHostPort(server)
-			if err != nil {
-				return nil, err
-			}
-		}
-		tlsClientConfig.ServerName = server
-	}
-
-	if tlsConfig.CertFile != "" && tlsConfig.KeyFile != "" {
-		tlsCert, err := tls.LoadX509KeyPair(tlsConfig.CertFile, tlsConfig.KeyFile)
-		if err != nil {
-			return nil, err
-		}
-		tlsClientConfig.Certificates = []tls.Certificate{tlsCert}
-	}
-
-	if tlsConfig.CAFile != "" || tlsConfig.CAPath != "" {
-		rootConfig := &rootcerts.Config{
-			CAFile: tlsConfig.CAFile,
-			CAPath: tlsConfig.CAPath,
-		}
-		if err := rootcerts.ConfigureTLS(tlsClientConfig, rootConfig); err != nil {
-			return nil, err
-		}
-	}
-
-	return tlsClientConfig, nil
-}
-
-func (c *Config) GenerateEnv() []string {
-	env := make([]string, 0, 10)
-
-	env = append(env,
-		fmt.Sprintf("%s=%s", HTTPAddrEnvName, c.Address),
-		fmt.Sprintf("%s=%s", HTTPTokenEnvName, c.Token),
-		fmt.Sprintf("%s=%s", HTTPTokenFileEnvName, c.TokenFile),
-		fmt.Sprintf("%s=%t", HTTPSSLEnvName, c.Scheme == "https"),
-		fmt.Sprintf("%s=%s", HTTPCAFile, c.TLSConfig.CAFile),
-		fmt.Sprintf("%s=%s", HTTPCAPath, c.TLSConfig.CAPath),
-		fmt.Sprintf("%s=%s", HTTPClientCert, c.TLSConfig.CertFile),
-		fmt.Sprintf("%s=%s", HTTPClientKey, c.TLSConfig.KeyFile),
-		fmt.Sprintf("%s=%s", HTTPTLSServerName, c.TLSConfig.Address),
-		fmt.Sprintf("%s=%t", HTTPSSLVerifyEnvName, !c.TLSConfig.InsecureSkipVerify))
-
-	if c.HttpAuth != nil {
-		env = append(env, fmt.Sprintf("%s=%s:%s", HTTPAuthEnvName, c.HttpAuth.Username, c.HttpAuth.Password))
-	} else {
-		env = append(env, fmt.Sprintf("%s=", HTTPAuthEnvName))
-	}
-
-	return env
-}
-
-// Client provides a client to the Consul API
-type Client struct {
-	config Config
-}
-
-// NewClient returns a new client
-func NewClient(config *Config) (*Client, error) {
-	// bootstrap the config
-	defConfig := DefaultConfig()
-
-	if len(config.Address) == 0 {
-		config.Address = defConfig.Address
-	}
-
-	if len(config.Scheme) == 0 {
-		config.Scheme = defConfig.Scheme
-	}
-
-	if config.Transport == nil {
-		config.Transport = defConfig.Transport
-	}
-
-	if config.TLSConfig.Address == "" {
-		config.TLSConfig.Address = defConfig.TLSConfig.Address
-	}
-
-	if config.TLSConfig.CAFile == "" {
-		config.TLSConfig.CAFile = defConfig.TLSConfig.CAFile
-	}
-
-	if config.TLSConfig.CAPath == "" {
-		config.TLSConfig.CAPath = defConfig.TLSConfig.CAPath
-	}
-
-	if config.TLSConfig.CertFile == "" {
-		config.TLSConfig.CertFile = defConfig.TLSConfig.CertFile
-	}
-
-	if config.TLSConfig.KeyFile == "" {
-		config.TLSConfig.KeyFile = defConfig.TLSConfig.KeyFile
-	}
-
-	if !config.TLSConfig.InsecureSkipVerify {
-		config.TLSConfig.InsecureSkipVerify = defConfig.TLSConfig.InsecureSkipVerify
-	}
-
-	if config.HttpClient == nil {
-		var err error
-		config.HttpClient, err = NewHttpClient(config.Transport, config.TLSConfig)
-		if err != nil {
-			return nil, err
-		}
-	}
-
-	parts := strings.SplitN(config.Address, "://", 2)
-	if len(parts) == 2 {
-		switch parts[0] {
-		case "http":
-			config.Scheme = "http"
-		case "https":
-			config.Scheme = "https"
-		case "unix":
-			trans := cleanhttp.DefaultTransport()
-			trans.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) {
-				return net.Dial("unix", parts[1])
-			}
-			config.HttpClient = &http.Client{
-				Transport: trans,
-			}
-		default:
-			return nil, fmt.Errorf("Unknown protocol scheme: %s", parts[0])
-		}
-		config.Address = parts[1]
-	}
-
-	// If the TokenFile is set, always use that, even if a Token is configured.
-	// This is because when TokenFile is set it is read into the Token field.
-	// We want any derived clients to have to re-read the token file.
-	if config.TokenFile != "" {
-		data, err := ioutil.ReadFile(config.TokenFile)
-		if err != nil {
-			return nil, fmt.Errorf("Error loading token file: %s", err)
-		}
-
-		if token := strings.TrimSpace(string(data)); token != "" {
-			config.Token = token
-		}
-	}
-	if config.Token == "" {
-		config.Token = defConfig.Token
-	}
-
-	return &Client{config: *config}, nil
-}
-
-// NewHttpClient returns an http client configured with the given Transport and TLS
-// config.
-func NewHttpClient(transport *http.Transport, tlsConf TLSConfig) (*http.Client, error) {
-	client := &http.Client{
-		Transport: transport,
-	}
-
-	// TODO (slackpad) - Once we get some run time on the HTTP/2 support we
-	// should turn it on by default if TLS is enabled. We would basically
-	// just need to call http2.ConfigureTransport(transport) here. We also
-	// don't want to introduce another external dependency on
-	// golang.org/x/net/http2 at this time. For a complete recipe for how
-	// to enable HTTP/2 support on a transport suitable for the API client
-	// library see agent/http_test.go:TestHTTPServer_H2.
-
-	if transport.TLSClientConfig == nil {
-		tlsClientConfig, err := SetupTLSConfig(&tlsConf)
-
-		if err != nil {
-			return nil, err
-		}
-
-		transport.TLSClientConfig = tlsClientConfig
-	}
-
-	return client, nil
-}
-
-// request is used to help build up a request
-type request struct {
-	config *Config
-	method string
-	url    *url.URL
-	params url.Values
-	body   io.Reader
-	header http.Header
-	obj    interface{}
-	ctx    context.Context
-}
-
-// setQueryOptions is used to annotate the request with
-// additional query options
-func (r *request) setQueryOptions(q *QueryOptions) {
-	if q == nil {
-		return
-	}
-	if q.Datacenter != "" {
-		r.params.Set("dc", q.Datacenter)
-	}
-	if q.AllowStale {
-		r.params.Set("stale", "")
-	}
-	if q.RequireConsistent {
-		r.params.Set("consistent", "")
-	}
-	if q.WaitIndex != 0 {
-		r.params.Set("index", strconv.FormatUint(q.WaitIndex, 10))
-	}
-	if q.WaitTime != 0 {
-		r.params.Set("wait", durToMsec(q.WaitTime))
-	}
-	if q.WaitHash != "" {
-		r.params.Set("hash", q.WaitHash)
-	}
-	if q.Token != "" {
-		r.header.Set("X-Consul-Token", q.Token)
-	}
-	if q.Near != "" {
-		r.params.Set("near", q.Near)
-	}
-	if q.Filter != "" {
-		r.params.Set("filter", q.Filter)
-	}
-	if len(q.NodeMeta) > 0 {
-		for key, value := range q.NodeMeta {
-			r.params.Add("node-meta", key+":"+value)
-		}
-	}
-	if q.RelayFactor != 0 {
-		r.params.Set("relay-factor", strconv.Itoa(int(q.RelayFactor)))
-	}
-	if q.LocalOnly {
-		r.params.Set("local-only", fmt.Sprintf("%t", q.LocalOnly))
-	}
-	if q.Connect {
-		r.params.Set("connect", "true")
-	}
-	if q.UseCache && !q.RequireConsistent {
-		r.params.Set("cached", "")
-
-		cc := []string{}
-		if q.MaxAge > 0 {
-			cc = append(cc, fmt.Sprintf("max-age=%.0f", q.MaxAge.Seconds()))
-		}
-		if q.StaleIfError > 0 {
-			cc = append(cc, fmt.Sprintf("stale-if-error=%.0f", q.StaleIfError.Seconds()))
-		}
-		if len(cc) > 0 {
-			r.header.Set("Cache-Control", strings.Join(cc, ", "))
-		}
-	}
-	r.ctx = q.ctx
-}
-
-// durToMsec converts a duration to a millisecond specified string. If the
-// user selected a positive value that rounds to 0 ms, then we will use 1 ms
-// so they get a short delay, otherwise Consul will translate the 0 ms into
-// a huge default delay.
-func durToMsec(dur time.Duration) string {
-	ms := dur / time.Millisecond
-	if dur > 0 && ms == 0 {
-		ms = 1
-	}
-	return fmt.Sprintf("%dms", ms)
-}
-
-// serverError is a string we look for to detect 500 errors.
-const serverError = "Unexpected response code: 500"
-
-// IsRetryableError returns true for 500 errors from the Consul servers, and
-// network connection errors. These are usually retryable at a later time.
-// This applies to reads but NOT to writes. This may return true for errors
-// on writes that may have still gone through, so do not use this to retry
-// any write operations.
-func IsRetryableError(err error) bool {
-	if err == nil {
-		return false
-	}
-
-	if _, ok := err.(net.Error); ok {
-		return true
-	}
-
-	// TODO (slackpad) - Make a real error type here instead of using
-	// a string check.
-	return strings.Contains(err.Error(), serverError)
-}
-
-// setWriteOptions is used to annotate the request with
-// additional write options
-func (r *request) setWriteOptions(q *WriteOptions) {
-	if q == nil {
-		return
-	}
-	if q.Datacenter != "" {
-		r.params.Set("dc", q.Datacenter)
-	}
-	if q.Token != "" {
-		r.header.Set("X-Consul-Token", q.Token)
-	}
-	if q.RelayFactor != 0 {
-		r.params.Set("relay-factor", strconv.Itoa(int(q.RelayFactor)))
-	}
-	r.ctx = q.ctx
-}
-
-// toHTTP converts the request to an HTTP request
-func (r *request) toHTTP() (*http.Request, error) {
-	// Encode the query parameters
-	r.url.RawQuery = r.params.Encode()
-
-	// Check if we should encode the body
-	if r.body == nil && r.obj != nil {
-		b, err := encodeBody(r.obj)
-		if err != nil {
-			return nil, err
-		}
-		r.body = b
-	}
-
-	// Create the HTTP request
-	req, err := http.NewRequest(r.method, r.url.RequestURI(), r.body)
-	if err != nil {
-		return nil, err
-	}
-
-	req.URL.Host = r.url.Host
-	req.URL.Scheme = r.url.Scheme
-	req.Host = r.url.Host
-	req.Header = r.header
-
-	// Setup auth
-	if r.config.HttpAuth != nil {
-		req.SetBasicAuth(r.config.HttpAuth.Username, r.config.HttpAuth.Password)
-	}
-	if r.ctx != nil {
-		return req.WithContext(r.ctx), nil
-	}
-
-	return req, nil
-}
-
-// newRequest is used to create a new request
-func (c *Client) newRequest(method, path string) *request {
-	r := &request{
-		config: &c.config,
-		method: method,
-		url: &url.URL{
-			Scheme: c.config.Scheme,
-			Host:   c.config.Address,
-			Path:   path,
-		},
-		params: make(map[string][]string),
-		header: make(http.Header),
-	}
-	if c.config.Datacenter != "" {
-		r.params.Set("dc", c.config.Datacenter)
-	}
-	if c.config.WaitTime != 0 {
-		r.params.Set("wait", durToMsec(r.config.WaitTime))
-	}
-	if c.config.Token != "" {
-		r.header.Set("X-Consul-Token", r.config.Token)
-	}
-	return r
-}
-
-// doRequest runs a request with our client
-func (c *Client) doRequest(r *request) (time.Duration, *http.Response, error) {
-	req, err := r.toHTTP()
-	if err != nil {
-		return 0, nil, err
-	}
-	start := time.Now()
-	resp, err := c.config.HttpClient.Do(req)
-	diff := time.Since(start)
-	return diff, resp, err
-}
-
-// Query is used to do a GET request against an endpoint
-// and deserialize the response into an interface using
-// standard Consul conventions.
-func (c *Client) query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) {
-	r := c.newRequest("GET", endpoint)
-	r.setQueryOptions(q)
-	rtt, resp, err := c.doRequest(r)
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if err := decodeBody(resp, out); err != nil {
-		return nil, err
-	}
-	return qm, nil
-}
-
-// write is used to do a PUT request against an endpoint
-// and serialize/deserialized using the standard Consul conventions.
-func (c *Client) write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) {
-	r := c.newRequest("PUT", endpoint)
-	r.setWriteOptions(q)
-	r.obj = in
-	rtt, resp, err := requireOK(c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	if out != nil {
-		if err := decodeBody(resp, &out); err != nil {
-			return nil, err
-		}
-	} else if _, err := ioutil.ReadAll(resp.Body); err != nil {
-		return nil, err
-	}
-	return wm, nil
-}
-
-// parseQueryMeta is used to help parse query meta-data
-//
-// TODO(rb): bug? the error from this function is never handled
-func parseQueryMeta(resp *http.Response, q *QueryMeta) error {
-	header := resp.Header
-
-	// Parse the X-Consul-Index (if it's set - hash based blocking queries don't
-	// set this)
-	if indexStr := header.Get("X-Consul-Index"); indexStr != "" {
-		index, err := strconv.ParseUint(indexStr, 10, 64)
-		if err != nil {
-			return fmt.Errorf("Failed to parse X-Consul-Index: %v", err)
-		}
-		q.LastIndex = index
-	}
-	q.LastContentHash = header.Get("X-Consul-ContentHash")
-
-	// Parse the X-Consul-LastContact
-	last, err := strconv.ParseUint(header.Get("X-Consul-LastContact"), 10, 64)
-	if err != nil {
-		return fmt.Errorf("Failed to parse X-Consul-LastContact: %v", err)
-	}
-	q.LastContact = time.Duration(last) * time.Millisecond
-
-	// Parse the X-Consul-KnownLeader
-	switch header.Get("X-Consul-KnownLeader") {
-	case "true":
-		q.KnownLeader = true
-	default:
-		q.KnownLeader = false
-	}
-
-	// Parse X-Consul-Translate-Addresses
-	switch header.Get("X-Consul-Translate-Addresses") {
-	case "true":
-		q.AddressTranslationEnabled = true
-	default:
-		q.AddressTranslationEnabled = false
-	}
-
-	// Parse Cache info
-	if cacheStr := header.Get("X-Cache"); cacheStr != "" {
-		q.CacheHit = strings.EqualFold(cacheStr, "HIT")
-	}
-	if ageStr := header.Get("Age"); ageStr != "" {
-		age, err := strconv.ParseUint(ageStr, 10, 64)
-		if err != nil {
-			return fmt.Errorf("Failed to parse Age Header: %v", err)
-		}
-		q.CacheAge = time.Duration(age) * time.Second
-	}
-
-	return nil
-}
-
-// decodeBody is used to JSON decode a body
-func decodeBody(resp *http.Response, out interface{}) error {
-	dec := json.NewDecoder(resp.Body)
-	return dec.Decode(out)
-}
-
-// encodeBody is used to encode a request body
-func encodeBody(obj interface{}) (io.Reader, error) {
-	buf := bytes.NewBuffer(nil)
-	enc := json.NewEncoder(buf)
-	if err := enc.Encode(obj); err != nil {
-		return nil, err
-	}
-	return buf, nil
-}
-
-// requireOK is used to wrap doRequest and check for a 200
-func requireOK(d time.Duration, resp *http.Response, e error) (time.Duration, *http.Response, error) {
-	if e != nil {
-		if resp != nil {
-			resp.Body.Close()
-		}
-		return d, nil, e
-	}
-	if resp.StatusCode != 200 {
-		return d, nil, generateUnexpectedResponseCodeError(resp)
-	}
-	return d, resp, nil
-}
-
-func (req *request) filterQuery(filter string) {
-	if filter == "" {
-		return
-	}
-
-	req.params.Set("filter", filter)
-}
-
-// generateUnexpectedResponseCodeError consumes the rest of the body, closes
-// the body stream and generates an error indicating the status code was
-// unexpected.
-func generateUnexpectedResponseCodeError(resp *http.Response) error {
-	var buf bytes.Buffer
-	io.Copy(&buf, resp.Body)
-	resp.Body.Close()
-	return fmt.Errorf("Unexpected response code: %d (%s)", resp.StatusCode, buf.Bytes())
-}
-
-func requireNotFoundOrOK(d time.Duration, resp *http.Response, e error) (bool, time.Duration, *http.Response, error) {
-	if e != nil {
-		if resp != nil {
-			resp.Body.Close()
-		}
-		return false, d, nil, e
-	}
-	switch resp.StatusCode {
-	case 200:
-		return true, d, resp, nil
-	case 404:
-		return false, d, resp, nil
-	default:
-		return false, d, nil, generateUnexpectedResponseCodeError(resp)
-	}
-}
diff --git a/vendor/github.com/hashicorp/consul/api/catalog.go b/vendor/github.com/hashicorp/consul/api/catalog.go
deleted file mode 100644
index 3fb0553..0000000
--- a/vendor/github.com/hashicorp/consul/api/catalog.go
+++ /dev/null
@@ -1,262 +0,0 @@
-package api
-
-import (
-	"net"
-	"strconv"
-)
-
-type Weights struct {
-	Passing int
-	Warning int
-}
-
-type Node struct {
-	ID              string
-	Node            string
-	Address         string
-	Datacenter      string
-	TaggedAddresses map[string]string
-	Meta            map[string]string
-	CreateIndex     uint64
-	ModifyIndex     uint64
-}
-
-type ServiceAddress struct {
-	Address string
-	Port    int
-}
-
-type CatalogService struct {
-	ID                       string
-	Node                     string
-	Address                  string
-	Datacenter               string
-	TaggedAddresses          map[string]string
-	NodeMeta                 map[string]string
-	ServiceID                string
-	ServiceName              string
-	ServiceAddress           string
-	ServiceTaggedAddresses   map[string]ServiceAddress
-	ServiceTags              []string
-	ServiceMeta              map[string]string
-	ServicePort              int
-	ServiceWeights           Weights
-	ServiceEnableTagOverride bool
-	ServiceProxy             *AgentServiceConnectProxyConfig
-	CreateIndex              uint64
-	Checks                   HealthChecks
-	ModifyIndex              uint64
-}
-
-type CatalogNode struct {
-	Node     *Node
-	Services map[string]*AgentService
-}
-
-type CatalogRegistration struct {
-	ID              string
-	Node            string
-	Address         string
-	TaggedAddresses map[string]string
-	NodeMeta        map[string]string
-	Datacenter      string
-	Service         *AgentService
-	Check           *AgentCheck
-	Checks          HealthChecks
-	SkipNodeUpdate  bool
-}
-
-type CatalogDeregistration struct {
-	Node       string
-	Address    string // Obsolete.
-	Datacenter string
-	ServiceID  string
-	CheckID    string
-}
-
-// Catalog can be used to query the Catalog endpoints
-type Catalog struct {
-	c *Client
-}
-
-// Catalog returns a handle to the catalog endpoints
-func (c *Client) Catalog() *Catalog {
-	return &Catalog{c}
-}
-
-func (c *Catalog) Register(reg *CatalogRegistration, q *WriteOptions) (*WriteMeta, error) {
-	r := c.c.newRequest("PUT", "/v1/catalog/register")
-	r.setWriteOptions(q)
-	r.obj = reg
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	return wm, nil
-}
-
-func (c *Catalog) Deregister(dereg *CatalogDeregistration, q *WriteOptions) (*WriteMeta, error) {
-	r := c.c.newRequest("PUT", "/v1/catalog/deregister")
-	r.setWriteOptions(q)
-	r.obj = dereg
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	return wm, nil
-}
-
-// Datacenters is used to query for all the known datacenters
-func (c *Catalog) Datacenters() ([]string, error) {
-	r := c.c.newRequest("GET", "/v1/catalog/datacenters")
-	_, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out []string
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// Nodes is used to query all the known nodes
-func (c *Catalog) Nodes(q *QueryOptions) ([]*Node, *QueryMeta, error) {
-	r := c.c.newRequest("GET", "/v1/catalog/nodes")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out []*Node
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Services is used to query for all known services
-func (c *Catalog) Services(q *QueryOptions) (map[string][]string, *QueryMeta, error) {
-	r := c.c.newRequest("GET", "/v1/catalog/services")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out map[string][]string
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Service is used to query catalog entries for a given service
-func (c *Catalog) Service(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) {
-	var tags []string
-	if tag != "" {
-		tags = []string{tag}
-	}
-	return c.service(service, tags, q, false)
-}
-
-// Supports multiple tags for filtering
-func (c *Catalog) ServiceMultipleTags(service string, tags []string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) {
-	return c.service(service, tags, q, false)
-}
-
-// Connect is used to query catalog entries for a given Connect-enabled service
-func (c *Catalog) Connect(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) {
-	var tags []string
-	if tag != "" {
-		tags = []string{tag}
-	}
-	return c.service(service, tags, q, true)
-}
-
-// Supports multiple tags for filtering
-func (c *Catalog) ConnectMultipleTags(service string, tags []string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) {
-	return c.service(service, tags, q, true)
-}
-
-func (c *Catalog) service(service string, tags []string, q *QueryOptions, connect bool) ([]*CatalogService, *QueryMeta, error) {
-	path := "/v1/catalog/service/" + service
-	if connect {
-		path = "/v1/catalog/connect/" + service
-	}
-	r := c.c.newRequest("GET", path)
-	r.setQueryOptions(q)
-	if len(tags) > 0 {
-		for _, tag := range tags {
-			r.params.Add("tag", tag)
-		}
-	}
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out []*CatalogService
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Node is used to query for service information about a single node
-func (c *Catalog) Node(node string, q *QueryOptions) (*CatalogNode, *QueryMeta, error) {
-	r := c.c.newRequest("GET", "/v1/catalog/node/"+node)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out *CatalogNode
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-func ParseServiceAddr(addrPort string) (ServiceAddress, error) {
-	port := 0
-	host, portStr, err := net.SplitHostPort(addrPort)
-	if err == nil {
-		port, err = strconv.Atoi(portStr)
-	}
-	return ServiceAddress{Address: host, Port: port}, err
-}
diff --git a/vendor/github.com/hashicorp/consul/api/config_entry.go b/vendor/github.com/hashicorp/consul/api/config_entry.go
deleted file mode 100644
index 1588f2e..0000000
--- a/vendor/github.com/hashicorp/consul/api/config_entry.go
+++ /dev/null
@@ -1,319 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"encoding/json"
-	"fmt"
-	"io"
-	"strconv"
-	"strings"
-
-	"github.com/mitchellh/mapstructure"
-)
-
-const (
-	ServiceDefaults string = "service-defaults"
-	ProxyDefaults   string = "proxy-defaults"
-	ServiceRouter   string = "service-router"
-	ServiceSplitter string = "service-splitter"
-	ServiceResolver string = "service-resolver"
-
-	ProxyConfigGlobal string = "global"
-)
-
-type ConfigEntry interface {
-	GetKind() string
-	GetName() string
-	GetCreateIndex() uint64
-	GetModifyIndex() uint64
-}
-
-type MeshGatewayMode string
-
-const (
-	// MeshGatewayModeDefault represents no specific mode and should
-	// be used to indicate that a different layer of the configuration
-	// chain should take precedence
-	MeshGatewayModeDefault MeshGatewayMode = ""
-
-	// MeshGatewayModeNone represents that the Upstream Connect connections
-	// should be direct and not flow through a mesh gateway.
-	MeshGatewayModeNone MeshGatewayMode = "none"
-
-	// MeshGatewayModeLocal represents that the Upstrea Connect connections
-	// should be made to a mesh gateway in the local datacenter. This is
-	MeshGatewayModeLocal MeshGatewayMode = "local"
-
-	// MeshGatewayModeRemote represents that the Upstream Connect connections
-	// should be made to a mesh gateway in a remote datacenter.
-	MeshGatewayModeRemote MeshGatewayMode = "remote"
-)
-
-// MeshGatewayConfig controls how Mesh Gateways are used for upstream Connect
-// services
-type MeshGatewayConfig struct {
-	// Mode is the mode that should be used for the upstream connection.
-	Mode MeshGatewayMode `json:",omitempty"`
-}
-
-type ServiceConfigEntry struct {
-	Kind        string
-	Name        string
-	Protocol    string            `json:",omitempty"`
-	MeshGateway MeshGatewayConfig `json:",omitempty"`
-	ExternalSNI string            `json:",omitempty"`
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-func (s *ServiceConfigEntry) GetKind() string {
-	return s.Kind
-}
-
-func (s *ServiceConfigEntry) GetName() string {
-	return s.Name
-}
-
-func (s *ServiceConfigEntry) GetCreateIndex() uint64 {
-	return s.CreateIndex
-}
-
-func (s *ServiceConfigEntry) GetModifyIndex() uint64 {
-	return s.ModifyIndex
-}
-
-type ProxyConfigEntry struct {
-	Kind        string
-	Name        string
-	Config      map[string]interface{} `json:",omitempty"`
-	MeshGateway MeshGatewayConfig      `json:",omitempty"`
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-func (p *ProxyConfigEntry) GetKind() string {
-	return p.Kind
-}
-
-func (p *ProxyConfigEntry) GetName() string {
-	return p.Name
-}
-
-func (p *ProxyConfigEntry) GetCreateIndex() uint64 {
-	return p.CreateIndex
-}
-
-func (p *ProxyConfigEntry) GetModifyIndex() uint64 {
-	return p.ModifyIndex
-}
-
-type rawEntryListResponse struct {
-	kind    string
-	Entries []map[string]interface{}
-}
-
-func makeConfigEntry(kind, name string) (ConfigEntry, error) {
-	switch kind {
-	case ServiceDefaults:
-		return &ServiceConfigEntry{Kind: kind, Name: name}, nil
-	case ProxyDefaults:
-		return &ProxyConfigEntry{Kind: kind, Name: name}, nil
-	case ServiceRouter:
-		return &ServiceRouterConfigEntry{Kind: kind, Name: name}, nil
-	case ServiceSplitter:
-		return &ServiceSplitterConfigEntry{Kind: kind, Name: name}, nil
-	case ServiceResolver:
-		return &ServiceResolverConfigEntry{Kind: kind, Name: name}, nil
-	default:
-		return nil, fmt.Errorf("invalid config entry kind: %s", kind)
-	}
-}
-
-func MakeConfigEntry(kind, name string) (ConfigEntry, error) {
-	return makeConfigEntry(kind, name)
-}
-
-// DecodeConfigEntry will decode the result of using json.Unmarshal of a config
-// entry into a map[string]interface{}.
-//
-// Important caveats:
-//
-// - This will NOT work if the map[string]interface{} was produced using HCL
-// decoding as that requires more extensive parsing to work around the issues
-// with map[string][]interface{} that arise.
-//
-// - This will only decode fields using their camel case json field
-// representations.
-func DecodeConfigEntry(raw map[string]interface{}) (ConfigEntry, error) {
-	var entry ConfigEntry
-
-	kindVal, ok := raw["Kind"]
-	if !ok {
-		kindVal, ok = raw["kind"]
-	}
-	if !ok {
-		return nil, fmt.Errorf("Payload does not contain a kind/Kind key at the top level")
-	}
-
-	if kindStr, ok := kindVal.(string); ok {
-		newEntry, err := makeConfigEntry(kindStr, "")
-		if err != nil {
-			return nil, err
-		}
-		entry = newEntry
-	} else {
-		return nil, fmt.Errorf("Kind value in payload is not a string")
-	}
-
-	decodeConf := &mapstructure.DecoderConfig{
-		DecodeHook:       mapstructure.StringToTimeDurationHookFunc(),
-		Result:           &entry,
-		WeaklyTypedInput: true,
-	}
-
-	decoder, err := mapstructure.NewDecoder(decodeConf)
-	if err != nil {
-		return nil, err
-	}
-
-	return entry, decoder.Decode(raw)
-}
-
-func DecodeConfigEntryFromJSON(data []byte) (ConfigEntry, error) {
-	var raw map[string]interface{}
-	if err := json.Unmarshal(data, &raw); err != nil {
-		return nil, err
-	}
-
-	return DecodeConfigEntry(raw)
-}
-
-func decodeConfigEntrySlice(raw []map[string]interface{}) ([]ConfigEntry, error) {
-	var entries []ConfigEntry
-	for _, rawEntry := range raw {
-		entry, err := DecodeConfigEntry(rawEntry)
-		if err != nil {
-			return nil, err
-		}
-		entries = append(entries, entry)
-	}
-	return entries, nil
-}
-
-// ConfigEntries can be used to query the Config endpoints
-type ConfigEntries struct {
-	c *Client
-}
-
-// Config returns a handle to the Config endpoints
-func (c *Client) ConfigEntries() *ConfigEntries {
-	return &ConfigEntries{c}
-}
-
-func (conf *ConfigEntries) Get(kind string, name string, q *QueryOptions) (ConfigEntry, *QueryMeta, error) {
-	if kind == "" || name == "" {
-		return nil, nil, fmt.Errorf("Both kind and name parameters must not be empty")
-	}
-
-	entry, err := makeConfigEntry(kind, name)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	r := conf.c.newRequest("GET", fmt.Sprintf("/v1/config/%s/%s", kind, name))
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(conf.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if err := decodeBody(resp, entry); err != nil {
-		return nil, nil, err
-	}
-
-	return entry, qm, nil
-}
-
-func (conf *ConfigEntries) List(kind string, q *QueryOptions) ([]ConfigEntry, *QueryMeta, error) {
-	if kind == "" {
-		return nil, nil, fmt.Errorf("The kind parameter must not be empty")
-	}
-
-	r := conf.c.newRequest("GET", fmt.Sprintf("/v1/config/%s", kind))
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(conf.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var raw []map[string]interface{}
-	if err := decodeBody(resp, &raw); err != nil {
-		return nil, nil, err
-	}
-
-	entries, err := decodeConfigEntrySlice(raw)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	return entries, qm, nil
-}
-
-func (conf *ConfigEntries) Set(entry ConfigEntry, w *WriteOptions) (bool, *WriteMeta, error) {
-	return conf.set(entry, nil, w)
-}
-
-func (conf *ConfigEntries) CAS(entry ConfigEntry, index uint64, w *WriteOptions) (bool, *WriteMeta, error) {
-	return conf.set(entry, map[string]string{"cas": strconv.FormatUint(index, 10)}, w)
-}
-
-func (conf *ConfigEntries) set(entry ConfigEntry, params map[string]string, w *WriteOptions) (bool, *WriteMeta, error) {
-	r := conf.c.newRequest("PUT", "/v1/config")
-	r.setWriteOptions(w)
-	for param, value := range params {
-		r.params.Set(param, value)
-	}
-	r.obj = entry
-	rtt, resp, err := requireOK(conf.c.doRequest(r))
-	if err != nil {
-		return false, nil, err
-	}
-	defer resp.Body.Close()
-
-	var buf bytes.Buffer
-	if _, err := io.Copy(&buf, resp.Body); err != nil {
-		return false, nil, fmt.Errorf("Failed to read response: %v", err)
-	}
-	res := strings.Contains(buf.String(), "true")
-
-	wm := &WriteMeta{RequestTime: rtt}
-	return res, wm, nil
-}
-
-func (conf *ConfigEntries) Delete(kind string, name string, w *WriteOptions) (*WriteMeta, error) {
-	if kind == "" || name == "" {
-		return nil, fmt.Errorf("Both kind and name parameters must not be empty")
-	}
-
-	r := conf.c.newRequest("DELETE", fmt.Sprintf("/v1/config/%s/%s", kind, name))
-	r.setWriteOptions(w)
-	rtt, resp, err := requireOK(conf.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	resp.Body.Close()
-	wm := &WriteMeta{RequestTime: rtt}
-	return wm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go b/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go
deleted file mode 100644
index 77acfbd..0000000
--- a/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go
+++ /dev/null
@@ -1,200 +0,0 @@
-package api
-
-import (
-	"encoding/json"
-	"time"
-)
-
-type ServiceRouterConfigEntry struct {
-	Kind string
-	Name string
-
-	Routes []ServiceRoute `json:",omitempty"`
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-func (e *ServiceRouterConfigEntry) GetKind() string        { return e.Kind }
-func (e *ServiceRouterConfigEntry) GetName() string        { return e.Name }
-func (e *ServiceRouterConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex }
-func (e *ServiceRouterConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex }
-
-type ServiceRoute struct {
-	Match       *ServiceRouteMatch       `json:",omitempty"`
-	Destination *ServiceRouteDestination `json:",omitempty"`
-}
-
-type ServiceRouteMatch struct {
-	HTTP *ServiceRouteHTTPMatch `json:",omitempty"`
-}
-
-type ServiceRouteHTTPMatch struct {
-	PathExact  string `json:",omitempty"`
-	PathPrefix string `json:",omitempty"`
-	PathRegex  string `json:",omitempty"`
-
-	Header     []ServiceRouteHTTPMatchHeader     `json:",omitempty"`
-	QueryParam []ServiceRouteHTTPMatchQueryParam `json:",omitempty"`
-	Methods    []string                          `json:",omitempty"`
-}
-
-type ServiceRouteHTTPMatchHeader struct {
-	Name    string
-	Present bool   `json:",omitempty"`
-	Exact   string `json:",omitempty"`
-	Prefix  string `json:",omitempty"`
-	Suffix  string `json:",omitempty"`
-	Regex   string `json:",omitempty"`
-	Invert  bool   `json:",omitempty"`
-}
-
-type ServiceRouteHTTPMatchQueryParam struct {
-	Name    string
-	Present bool   `json:",omitempty"`
-	Exact   string `json:",omitempty"`
-	Regex   string `json:",omitempty"`
-}
-
-type ServiceRouteDestination struct {
-	Service               string        `json:",omitempty"`
-	ServiceSubset         string        `json:",omitempty"`
-	Namespace             string        `json:",omitempty"`
-	PrefixRewrite         string        `json:",omitempty"`
-	RequestTimeout        time.Duration `json:",omitempty"`
-	NumRetries            uint32        `json:",omitempty"`
-	RetryOnConnectFailure bool          `json:",omitempty"`
-	RetryOnStatusCodes    []uint32      `json:",omitempty"`
-}
-
-func (e *ServiceRouteDestination) MarshalJSON() ([]byte, error) {
-	type Alias ServiceRouteDestination
-	exported := &struct {
-		RequestTimeout string `json:",omitempty"`
-		*Alias
-	}{
-		RequestTimeout: e.RequestTimeout.String(),
-		Alias:          (*Alias)(e),
-	}
-	if e.RequestTimeout == 0 {
-		exported.RequestTimeout = ""
-	}
-
-	return json.Marshal(exported)
-}
-
-func (e *ServiceRouteDestination) UnmarshalJSON(data []byte) error {
-	type Alias ServiceRouteDestination
-	aux := &struct {
-		RequestTimeout string
-		*Alias
-	}{
-		Alias: (*Alias)(e),
-	}
-	if err := json.Unmarshal(data, &aux); err != nil {
-		return err
-	}
-	var err error
-	if aux.RequestTimeout != "" {
-		if e.RequestTimeout, err = time.ParseDuration(aux.RequestTimeout); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-type ServiceSplitterConfigEntry struct {
-	Kind string
-	Name string
-
-	Splits []ServiceSplit `json:",omitempty"`
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-func (e *ServiceSplitterConfigEntry) GetKind() string        { return e.Kind }
-func (e *ServiceSplitterConfigEntry) GetName() string        { return e.Name }
-func (e *ServiceSplitterConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex }
-func (e *ServiceSplitterConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex }
-
-type ServiceSplit struct {
-	Weight        float32
-	Service       string `json:",omitempty"`
-	ServiceSubset string `json:",omitempty"`
-	Namespace     string `json:",omitempty"`
-}
-
-type ServiceResolverConfigEntry struct {
-	Kind string
-	Name string
-
-	DefaultSubset  string                             `json:",omitempty"`
-	Subsets        map[string]ServiceResolverSubset   `json:",omitempty"`
-	Redirect       *ServiceResolverRedirect           `json:",omitempty"`
-	Failover       map[string]ServiceResolverFailover `json:",omitempty"`
-	ConnectTimeout time.Duration                      `json:",omitempty"`
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-func (e *ServiceResolverConfigEntry) MarshalJSON() ([]byte, error) {
-	type Alias ServiceResolverConfigEntry
-	exported := &struct {
-		ConnectTimeout string `json:",omitempty"`
-		*Alias
-	}{
-		ConnectTimeout: e.ConnectTimeout.String(),
-		Alias:          (*Alias)(e),
-	}
-	if e.ConnectTimeout == 0 {
-		exported.ConnectTimeout = ""
-	}
-
-	return json.Marshal(exported)
-}
-
-func (e *ServiceResolverConfigEntry) UnmarshalJSON(data []byte) error {
-	type Alias ServiceResolverConfigEntry
-	aux := &struct {
-		ConnectTimeout string
-		*Alias
-	}{
-		Alias: (*Alias)(e),
-	}
-	if err := json.Unmarshal(data, &aux); err != nil {
-		return err
-	}
-	var err error
-	if aux.ConnectTimeout != "" {
-		if e.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func (e *ServiceResolverConfigEntry) GetKind() string        { return e.Kind }
-func (e *ServiceResolverConfigEntry) GetName() string        { return e.Name }
-func (e *ServiceResolverConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex }
-func (e *ServiceResolverConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex }
-
-type ServiceResolverSubset struct {
-	Filter      string `json:",omitempty"`
-	OnlyPassing bool   `json:",omitempty"`
-}
-
-type ServiceResolverRedirect struct {
-	Service       string `json:",omitempty"`
-	ServiceSubset string `json:",omitempty"`
-	Namespace     string `json:",omitempty"`
-	Datacenter    string `json:",omitempty"`
-}
-
-type ServiceResolverFailover struct {
-	Service       string   `json:",omitempty"`
-	ServiceSubset string   `json:",omitempty"`
-	Namespace     string   `json:",omitempty"`
-	Datacenters   []string `json:",omitempty"`
-}
diff --git a/vendor/github.com/hashicorp/consul/api/connect.go b/vendor/github.com/hashicorp/consul/api/connect.go
deleted file mode 100644
index a40d1e2..0000000
--- a/vendor/github.com/hashicorp/consul/api/connect.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package api
-
-// Connect can be used to work with endpoints related to Connect, the
-// feature for securely connecting services within Consul.
-type Connect struct {
-	c *Client
-}
-
-// Connect returns a handle to the connect-related endpoints
-func (c *Client) Connect() *Connect {
-	return &Connect{c}
-}
diff --git a/vendor/github.com/hashicorp/consul/api/connect_ca.go b/vendor/github.com/hashicorp/consul/api/connect_ca.go
deleted file mode 100644
index 600a3e0..0000000
--- a/vendor/github.com/hashicorp/consul/api/connect_ca.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package api
-
-import (
-	"fmt"
-	"time"
-
-	"github.com/mitchellh/mapstructure"
-)
-
-// CAConfig is the structure for the Connect CA configuration.
-type CAConfig struct {
-	// Provider is the CA provider implementation to use.
-	Provider string
-
-	// Configuration is arbitrary configuration for the provider. This
-	// should only contain primitive values and containers (such as lists
-	// and maps).
-	Config map[string]interface{}
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-// CommonCAProviderConfig is the common options available to all CA providers.
-type CommonCAProviderConfig struct {
-	LeafCertTTL      time.Duration
-	SkipValidate     bool
-	CSRMaxPerSecond  float32
-	CSRMaxConcurrent int
-}
-
-// ConsulCAProviderConfig is the config for the built-in Consul CA provider.
-type ConsulCAProviderConfig struct {
-	CommonCAProviderConfig `mapstructure:",squash"`
-
-	PrivateKey     string
-	RootCert       string
-	RotationPeriod time.Duration
-}
-
-// ParseConsulCAConfig takes a raw config map and returns a parsed
-// ConsulCAProviderConfig.
-func ParseConsulCAConfig(raw map[string]interface{}) (*ConsulCAProviderConfig, error) {
-	var config ConsulCAProviderConfig
-	decodeConf := &mapstructure.DecoderConfig{
-		DecodeHook:       mapstructure.StringToTimeDurationHookFunc(),
-		Result:           &config,
-		WeaklyTypedInput: true,
-	}
-
-	decoder, err := mapstructure.NewDecoder(decodeConf)
-	if err != nil {
-		return nil, err
-	}
-
-	if err := decoder.Decode(raw); err != nil {
-		return nil, fmt.Errorf("error decoding config: %s", err)
-	}
-
-	return &config, nil
-}
-
-// CARootList is the structure for the results of listing roots.
-type CARootList struct {
-	ActiveRootID string
-	TrustDomain  string
-	Roots        []*CARoot
-}
-
-// CARoot represents a root CA certificate that is trusted.
-type CARoot struct {
-	// ID is a globally unique ID (UUID) representing this CA root.
-	ID string
-
-	// Name is a human-friendly name for this CA root. This value is
-	// opaque to Consul and is not used for anything internally.
-	Name string
-
-	// RootCertPEM is the PEM-encoded public certificate.
-	RootCertPEM string `json:"RootCert"`
-
-	// Active is true if this is the current active CA. This must only
-	// be true for exactly one CA. For any method that modifies roots in the
-	// state store, tests should be written to verify that multiple roots
-	// cannot be active.
-	Active bool
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-// LeafCert is a certificate that has been issued by a Connect CA.
-type LeafCert struct {
-	// SerialNumber is the unique serial number for this certificate.
-	// This is encoded in standard hex separated by :.
-	SerialNumber string
-
-	// CertPEM and PrivateKeyPEM are the PEM-encoded certificate and private
-	// key for that cert, respectively. This should not be stored in the
-	// state store, but is present in the sign API response.
-	CertPEM       string `json:",omitempty"`
-	PrivateKeyPEM string `json:",omitempty"`
-
-	// Service is the name of the service for which the cert was issued.
-	// ServiceURI is the cert URI value.
-	Service    string
-	ServiceURI string
-
-	// ValidAfter and ValidBefore are the validity periods for the
-	// certificate.
-	ValidAfter  time.Time
-	ValidBefore time.Time
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-// CARoots queries the list of available roots.
-func (h *Connect) CARoots(q *QueryOptions) (*CARootList, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/connect/ca/roots")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out CARootList
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, qm, nil
-}
-
-// CAGetConfig returns the current CA configuration.
-func (h *Connect) CAGetConfig(q *QueryOptions) (*CAConfig, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/connect/ca/configuration")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out CAConfig
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, qm, nil
-}
-
-// CASetConfig sets the current CA configuration.
-func (h *Connect) CASetConfig(conf *CAConfig, q *WriteOptions) (*WriteMeta, error) {
-	r := h.c.newRequest("PUT", "/v1/connect/ca/configuration")
-	r.setWriteOptions(q)
-	r.obj = conf
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-	return wm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/connect_intention.go b/vendor/github.com/hashicorp/consul/api/connect_intention.go
deleted file mode 100644
index d25cb84..0000000
--- a/vendor/github.com/hashicorp/consul/api/connect_intention.go
+++ /dev/null
@@ -1,309 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"time"
-)
-
-// Intention defines an intention for the Connect Service Graph. This defines
-// the allowed or denied behavior of a connection between two services using
-// Connect.
-type Intention struct {
-	// ID is the UUID-based ID for the intention, always generated by Consul.
-	ID string
-
-	// Description is a human-friendly description of this intention.
-	// It is opaque to Consul and is only stored and transferred in API
-	// requests.
-	Description string
-
-	// SourceNS, SourceName are the namespace and name, respectively, of
-	// the source service. Either of these may be the wildcard "*", but only
-	// the full value can be a wildcard. Partial wildcards are not allowed.
-	// The source may also be a non-Consul service, as specified by SourceType.
-	//
-	// DestinationNS, DestinationName is the same, but for the destination
-	// service. The same rules apply. The destination is always a Consul
-	// service.
-	SourceNS, SourceName           string
-	DestinationNS, DestinationName string
-
-	// SourceType is the type of the value for the source.
-	SourceType IntentionSourceType
-
-	// Action is whether this is a whitelist or blacklist intention.
-	Action IntentionAction
-
-	// DefaultAddr, DefaultPort of the local listening proxy (if any) to
-	// make this connection.
-	DefaultAddr string
-	DefaultPort int
-
-	// Meta is arbitrary metadata associated with the intention. This is
-	// opaque to Consul but is served in API responses.
-	Meta map[string]string
-
-	// Precedence is the order that the intention will be applied, with
-	// larger numbers being applied first. This is a read-only field, on
-	// any intention update it is updated.
-	Precedence int
-
-	// CreatedAt and UpdatedAt keep track of when this record was created
-	// or modified.
-	CreatedAt, UpdatedAt time.Time
-
-	// Hash of the contents of the intention
-	//
-	// This is needed mainly for replication purposes. When replicating from
-	// one DC to another keeping the content Hash will allow us to detect
-	// content changes more efficiently than checking every single field
-	Hash []byte
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-// String returns human-friendly output describing ths intention.
-func (i *Intention) String() string {
-	return fmt.Sprintf("%s => %s (%s)",
-		i.SourceString(),
-		i.DestinationString(),
-		i.Action)
-}
-
-// SourceString returns the namespace/name format for the source, or
-// just "name" if the namespace is the default namespace.
-func (i *Intention) SourceString() string {
-	return i.partString(i.SourceNS, i.SourceName)
-}
-
-// DestinationString returns the namespace/name format for the source, or
-// just "name" if the namespace is the default namespace.
-func (i *Intention) DestinationString() string {
-	return i.partString(i.DestinationNS, i.DestinationName)
-}
-
-func (i *Intention) partString(ns, n string) string {
-	// For now we omit the default namespace from the output. In the future
-	// we might want to look at this and show this in a multi-namespace world.
-	if ns != "" && ns != IntentionDefaultNamespace {
-		n = ns + "/" + n
-	}
-
-	return n
-}
-
-// IntentionDefaultNamespace is the default namespace value.
-const IntentionDefaultNamespace = "default"
-
-// IntentionAction is the action that the intention represents. This
-// can be "allow" or "deny" to whitelist or blacklist intentions.
-type IntentionAction string
-
-const (
-	IntentionActionAllow IntentionAction = "allow"
-	IntentionActionDeny  IntentionAction = "deny"
-)
-
-// IntentionSourceType is the type of the source within an intention.
-type IntentionSourceType string
-
-const (
-	// IntentionSourceConsul is a service within the Consul catalog.
-	IntentionSourceConsul IntentionSourceType = "consul"
-)
-
-// IntentionMatch are the arguments for the intention match API.
-type IntentionMatch struct {
-	By    IntentionMatchType
-	Names []string
-}
-
-// IntentionMatchType is the target for a match request. For example,
-// matching by source will look for all intentions that match the given
-// source value.
-type IntentionMatchType string
-
-const (
-	IntentionMatchSource      IntentionMatchType = "source"
-	IntentionMatchDestination IntentionMatchType = "destination"
-)
-
-// IntentionCheck are the arguments for the intention check API. For
-// more documentation see the IntentionCheck function.
-type IntentionCheck struct {
-	// Source and Destination are the source and destination values to
-	// check. The destination is always a Consul service, but the source
-	// may be other values as defined by the SourceType.
-	Source, Destination string
-
-	// SourceType is the type of the value for the source.
-	SourceType IntentionSourceType
-}
-
-// Intentions returns the list of intentions.
-func (h *Connect) Intentions(q *QueryOptions) ([]*Intention, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/connect/intentions")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out []*Intention
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// IntentionGet retrieves a single intention.
-func (h *Connect) IntentionGet(id string, q *QueryOptions) (*Intention, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/connect/intentions/"+id)
-	r.setQueryOptions(q)
-	rtt, resp, err := h.c.doRequest(r)
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if resp.StatusCode == 404 {
-		return nil, qm, nil
-	} else if resp.StatusCode != 200 {
-		var buf bytes.Buffer
-		io.Copy(&buf, resp.Body)
-		return nil, nil, fmt.Errorf(
-			"Unexpected response %d: %s", resp.StatusCode, buf.String())
-	}
-
-	var out Intention
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return &out, qm, nil
-}
-
-// IntentionDelete deletes a single intention.
-func (h *Connect) IntentionDelete(id string, q *WriteOptions) (*WriteMeta, error) {
-	r := h.c.newRequest("DELETE", "/v1/connect/intentions/"+id)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &WriteMeta{}
-	qm.RequestTime = rtt
-
-	return qm, nil
-}
-
-// IntentionMatch returns the list of intentions that match a given source
-// or destination. The returned intentions are ordered by precedence where
-// result[0] is the highest precedence (if that matches, then that rule overrides
-// all other rules).
-//
-// Matching can be done for multiple names at the same time. The resulting
-// map is keyed by the given names. Casing is preserved.
-func (h *Connect) IntentionMatch(args *IntentionMatch, q *QueryOptions) (map[string][]*Intention, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/connect/intentions/match")
-	r.setQueryOptions(q)
-	r.params.Set("by", string(args.By))
-	for _, name := range args.Names {
-		r.params.Add("name", name)
-	}
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out map[string][]*Intention
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// IntentionCheck returns whether a given source/destination would be allowed
-// or not given the current set of intentions and the configuration of Consul.
-func (h *Connect) IntentionCheck(args *IntentionCheck, q *QueryOptions) (bool, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/connect/intentions/check")
-	r.setQueryOptions(q)
-	r.params.Set("source", args.Source)
-	r.params.Set("destination", args.Destination)
-	if args.SourceType != "" {
-		r.params.Set("source-type", string(args.SourceType))
-	}
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return false, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out struct{ Allowed bool }
-	if err := decodeBody(resp, &out); err != nil {
-		return false, nil, err
-	}
-	return out.Allowed, qm, nil
-}
-
-// IntentionCreate will create a new intention. The ID in the given
-// structure must be empty and a generate ID will be returned on
-// success.
-func (c *Connect) IntentionCreate(ixn *Intention, q *WriteOptions) (string, *WriteMeta, error) {
-	r := c.c.newRequest("POST", "/v1/connect/intentions")
-	r.setWriteOptions(q)
-	r.obj = ixn
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	var out struct{ ID string }
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// IntentionUpdate will update an existing intention. The ID in the given
-// structure must be non-empty.
-func (c *Connect) IntentionUpdate(ixn *Intention, q *WriteOptions) (*WriteMeta, error) {
-	r := c.c.newRequest("PUT", "/v1/connect/intentions/"+ixn.ID)
-	r.setWriteOptions(q)
-	r.obj = ixn
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-	return wm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/coordinate.go b/vendor/github.com/hashicorp/consul/api/coordinate.go
deleted file mode 100644
index 53318f1..0000000
--- a/vendor/github.com/hashicorp/consul/api/coordinate.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package api
-
-import (
-	"github.com/hashicorp/serf/coordinate"
-)
-
-// CoordinateEntry represents a node and its associated network coordinate.
-type CoordinateEntry struct {
-	Node    string
-	Segment string
-	Coord   *coordinate.Coordinate
-}
-
-// CoordinateDatacenterMap has the coordinates for servers in a given datacenter
-// and area. Network coordinates are only compatible within the same area.
-type CoordinateDatacenterMap struct {
-	Datacenter  string
-	AreaID      string
-	Coordinates []CoordinateEntry
-}
-
-// Coordinate can be used to query the coordinate endpoints
-type Coordinate struct {
-	c *Client
-}
-
-// Coordinate returns a handle to the coordinate endpoints
-func (c *Client) Coordinate() *Coordinate {
-	return &Coordinate{c}
-}
-
-// Datacenters is used to return the coordinates of all the servers in the WAN
-// pool.
-func (c *Coordinate) Datacenters() ([]*CoordinateDatacenterMap, error) {
-	r := c.c.newRequest("GET", "/v1/coordinate/datacenters")
-	_, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out []*CoordinateDatacenterMap
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// Nodes is used to return the coordinates of all the nodes in the LAN pool.
-func (c *Coordinate) Nodes(q *QueryOptions) ([]*CoordinateEntry, *QueryMeta, error) {
-	r := c.c.newRequest("GET", "/v1/coordinate/nodes")
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out []*CoordinateEntry
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Update inserts or updates the LAN coordinate of a node.
-func (c *Coordinate) Update(coord *CoordinateEntry, q *WriteOptions) (*WriteMeta, error) {
-	r := c.c.newRequest("PUT", "/v1/coordinate/update")
-	r.setWriteOptions(q)
-	r.obj = coord
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	return wm, nil
-}
-
-// Node is used to return the coordinates of a single in the LAN pool.
-func (c *Coordinate) Node(node string, q *QueryOptions) ([]*CoordinateEntry, *QueryMeta, error) {
-	r := c.c.newRequest("GET", "/v1/coordinate/node/"+node)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out []*CoordinateEntry
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/debug.go b/vendor/github.com/hashicorp/consul/api/debug.go
deleted file mode 100644
index 2380468..0000000
--- a/vendor/github.com/hashicorp/consul/api/debug.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package api
-
-import (
-	"fmt"
-	"io/ioutil"
-	"strconv"
-)
-
-// Debug can be used to query the /debug/pprof endpoints to gather
-// profiling information about the target agent.Debug
-//
-// The agent must have enable_debug set to true for profiling to be enabled
-// and for these endpoints to function.
-type Debug struct {
-	c *Client
-}
-
-// Debug returns a handle that exposes the internal debug endpoints.
-func (c *Client) Debug() *Debug {
-	return &Debug{c}
-}
-
-// Heap returns a pprof heap dump
-func (d *Debug) Heap() ([]byte, error) {
-	r := d.c.newRequest("GET", "/debug/pprof/heap")
-	_, resp, err := d.c.doRequest(r)
-	if err != nil {
-		return nil, fmt.Errorf("error making request: %s", err)
-	}
-	defer resp.Body.Close()
-
-	// We return a raw response because we're just passing through a response
-	// from the pprof handlers
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return nil, fmt.Errorf("error decoding body: %s", err)
-	}
-
-	return body, nil
-}
-
-// Profile returns a pprof CPU profile for the specified number of seconds
-func (d *Debug) Profile(seconds int) ([]byte, error) {
-	r := d.c.newRequest("GET", "/debug/pprof/profile")
-
-	// Capture a profile for the specified number of seconds
-	r.params.Set("seconds", strconv.Itoa(seconds))
-
-	_, resp, err := d.c.doRequest(r)
-	if err != nil {
-		return nil, fmt.Errorf("error making request: %s", err)
-	}
-	defer resp.Body.Close()
-
-	// We return a raw response because we're just passing through a response
-	// from the pprof handlers
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return nil, fmt.Errorf("error decoding body: %s", err)
-	}
-
-	return body, nil
-}
-
-// Trace returns an execution trace
-func (d *Debug) Trace(seconds int) ([]byte, error) {
-	r := d.c.newRequest("GET", "/debug/pprof/trace")
-
-	// Capture a trace for the specified number of seconds
-	r.params.Set("seconds", strconv.Itoa(seconds))
-
-	_, resp, err := d.c.doRequest(r)
-	if err != nil {
-		return nil, fmt.Errorf("error making request: %s", err)
-	}
-	defer resp.Body.Close()
-
-	// We return a raw response because we're just passing through a response
-	// from the pprof handlers
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return nil, fmt.Errorf("error decoding body: %s", err)
-	}
-
-	return body, nil
-}
-
-// Goroutine returns a pprof goroutine profile
-func (d *Debug) Goroutine() ([]byte, error) {
-	r := d.c.newRequest("GET", "/debug/pprof/goroutine")
-
-	_, resp, err := d.c.doRequest(r)
-	if err != nil {
-		return nil, fmt.Errorf("error making request: %s", err)
-	}
-	defer resp.Body.Close()
-
-	// We return a raw response because we're just passing through a response
-	// from the pprof handlers
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return nil, fmt.Errorf("error decoding body: %s", err)
-	}
-
-	return body, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/discovery_chain.go b/vendor/github.com/hashicorp/consul/api/discovery_chain.go
deleted file mode 100644
index 407a3b0..0000000
--- a/vendor/github.com/hashicorp/consul/api/discovery_chain.go
+++ /dev/null
@@ -1,230 +0,0 @@
-package api
-
-import (
-	"encoding/json"
-	"fmt"
-	"time"
-)
-
-// DiscoveryChain can be used to query the discovery-chain endpoints
-type DiscoveryChain struct {
-	c *Client
-}
-
-// DiscoveryChain returns a handle to the discovery-chain endpoints
-func (c *Client) DiscoveryChain() *DiscoveryChain {
-	return &DiscoveryChain{c}
-}
-
-func (d *DiscoveryChain) Get(name string, opts *DiscoveryChainOptions, q *QueryOptions) (*DiscoveryChainResponse, *QueryMeta, error) {
-	if name == "" {
-		return nil, nil, fmt.Errorf("Name parameter must not be empty")
-	}
-
-	method := "GET"
-	if opts != nil && opts.requiresPOST() {
-		method = "POST"
-	}
-
-	r := d.c.newRequest(method, fmt.Sprintf("/v1/discovery-chain/%s", name))
-	r.setQueryOptions(q)
-
-	if opts != nil {
-		if opts.EvaluateInDatacenter != "" {
-			r.params.Set("compile-dc", opts.EvaluateInDatacenter)
-		}
-		// TODO(namespaces): handle possible EvaluateInNamespace here
-	}
-
-	if method == "POST" {
-		r.obj = opts
-	}
-
-	rtt, resp, err := requireOK(d.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out DiscoveryChainResponse
-
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-
-	return &out, qm, nil
-}
-
-type DiscoveryChainOptions struct {
-	EvaluateInDatacenter string `json:"-"`
-
-	// OverrideMeshGateway allows for the mesh gateway setting to be overridden
-	// for any resolver in the compiled chain.
-	OverrideMeshGateway MeshGatewayConfig `json:",omitempty"`
-
-	// OverrideProtocol allows for the final protocol for the chain to be
-	// altered.
-	//
-	// - If the chain ordinarily would be TCP and an L7 protocol is passed here
-	// the chain will not include Routers or Splitters.
-	//
-	// - If the chain ordinarily would be L7 and TCP is passed here the chain
-	// will not include Routers or Splitters.
-	OverrideProtocol string `json:",omitempty"`
-
-	// OverrideConnectTimeout allows for the ConnectTimeout setting to be
-	// overridden for any resolver in the compiled chain.
-	OverrideConnectTimeout time.Duration `json:",omitempty"`
-}
-
-func (o *DiscoveryChainOptions) requiresPOST() bool {
-	if o == nil {
-		return false
-	}
-	return o.OverrideMeshGateway.Mode != "" ||
-		o.OverrideProtocol != "" ||
-		o.OverrideConnectTimeout != 0
-}
-
-type DiscoveryChainResponse struct {
-	Chain *CompiledDiscoveryChain
-}
-
-type CompiledDiscoveryChain struct {
-	ServiceName string
-	Namespace   string
-	Datacenter  string
-
-	// CustomizationHash is a unique hash of any data that affects the
-	// compilation of the discovery chain other than config entries or the
-	// name/namespace/datacenter evaluation criteria.
-	//
-	// If set, this value should be used to prefix/suffix any generated load
-	// balancer data plane objects to avoid sharing customized and
-	// non-customized versions.
-	CustomizationHash string
-
-	// Protocol is the overall protocol shared by everything in the chain.
-	Protocol string
-
-	// StartNode is the first key into the Nodes map that should be followed
-	// when walking the discovery chain.
-	StartNode string
-
-	// Nodes contains all nodes available for traversal in the chain keyed by a
-	// unique name.  You can walk this by starting with StartNode.
-	//
-	// NOTE: The names should be treated as opaque values and are only
-	// guaranteed to be consistent within a single compilation.
-	Nodes map[string]*DiscoveryGraphNode
-
-	// Targets is a list of all targets used in this chain.
-	//
-	// NOTE: The names should be treated as opaque values and are only
-	// guaranteed to be consistent within a single compilation.
-	Targets map[string]*DiscoveryTarget
-}
-
-const (
-	DiscoveryGraphNodeTypeRouter   = "router"
-	DiscoveryGraphNodeTypeSplitter = "splitter"
-	DiscoveryGraphNodeTypeResolver = "resolver"
-)
-
-// DiscoveryGraphNode is a single node in the compiled discovery chain.
-type DiscoveryGraphNode struct {
-	Type string
-	Name string // this is NOT necessarily a service
-
-	// fields for Type==router
-	Routes []*DiscoveryRoute
-
-	// fields for Type==splitter
-	Splits []*DiscoverySplit
-
-	// fields for Type==resolver
-	Resolver *DiscoveryResolver
-}
-
-// compiled form of ServiceRoute
-type DiscoveryRoute struct {
-	Definition *ServiceRoute
-	NextNode   string
-}
-
-// compiled form of ServiceSplit
-type DiscoverySplit struct {
-	Weight   float32
-	NextNode string
-}
-
-// compiled form of ServiceResolverConfigEntry
-type DiscoveryResolver struct {
-	Default        bool
-	ConnectTimeout time.Duration
-	Target         string
-	Failover       *DiscoveryFailover
-}
-
-func (r *DiscoveryResolver) MarshalJSON() ([]byte, error) {
-	type Alias DiscoveryResolver
-	exported := &struct {
-		ConnectTimeout string `json:",omitempty"`
-		*Alias
-	}{
-		ConnectTimeout: r.ConnectTimeout.String(),
-		Alias:          (*Alias)(r),
-	}
-	if r.ConnectTimeout == 0 {
-		exported.ConnectTimeout = ""
-	}
-
-	return json.Marshal(exported)
-}
-
-func (r *DiscoveryResolver) UnmarshalJSON(data []byte) error {
-	type Alias DiscoveryResolver
-	aux := &struct {
-		ConnectTimeout string
-		*Alias
-	}{
-		Alias: (*Alias)(r),
-	}
-	if err := json.Unmarshal(data, &aux); err != nil {
-		return err
-	}
-	var err error
-	if aux.ConnectTimeout != "" {
-		if r.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-// compiled form of ServiceResolverFailover
-type DiscoveryFailover struct {
-	Targets []string
-}
-
-// DiscoveryTarget represents all of the inputs necessary to use a resolver
-// config entry to execute a catalog query to generate a list of service
-// instances during discovery.
-type DiscoveryTarget struct {
-	ID string
-
-	Service       string
-	ServiceSubset string
-	Namespace     string
-	Datacenter    string
-
-	MeshGateway MeshGatewayConfig
-	Subset      ServiceResolverSubset
-	External    bool
-	SNI         string
-	Name        string
-}
diff --git a/vendor/github.com/hashicorp/consul/api/event.go b/vendor/github.com/hashicorp/consul/api/event.go
deleted file mode 100644
index 85b5b06..0000000
--- a/vendor/github.com/hashicorp/consul/api/event.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"strconv"
-)
-
-// Event can be used to query the Event endpoints
-type Event struct {
-	c *Client
-}
-
-// UserEvent represents an event that was fired by the user
-type UserEvent struct {
-	ID            string
-	Name          string
-	Payload       []byte
-	NodeFilter    string
-	ServiceFilter string
-	TagFilter     string
-	Version       int
-	LTime         uint64
-}
-
-// Event returns a handle to the event endpoints
-func (c *Client) Event() *Event {
-	return &Event{c}
-}
-
-// Fire is used to fire a new user event. Only the Name, Payload and Filters
-// are respected. This returns the ID or an associated error. Cross DC requests
-// are supported.
-func (e *Event) Fire(params *UserEvent, q *WriteOptions) (string, *WriteMeta, error) {
-	r := e.c.newRequest("PUT", "/v1/event/fire/"+params.Name)
-	r.setWriteOptions(q)
-	if params.NodeFilter != "" {
-		r.params.Set("node", params.NodeFilter)
-	}
-	if params.ServiceFilter != "" {
-		r.params.Set("service", params.ServiceFilter)
-	}
-	if params.TagFilter != "" {
-		r.params.Set("tag", params.TagFilter)
-	}
-	if params.Payload != nil {
-		r.body = bytes.NewReader(params.Payload)
-	}
-
-	rtt, resp, err := requireOK(e.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-	var out UserEvent
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// List is used to get the most recent events an agent has received.
-// This list can be optionally filtered by the name. This endpoint supports
-// quasi-blocking queries. The index is not monotonic, nor does it provide provide
-// LastContact or KnownLeader.
-func (e *Event) List(name string, q *QueryOptions) ([]*UserEvent, *QueryMeta, error) {
-	r := e.c.newRequest("GET", "/v1/event/list")
-	r.setQueryOptions(q)
-	if name != "" {
-		r.params.Set("name", name)
-	}
-	rtt, resp, err := requireOK(e.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var entries []*UserEvent
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// IDToIndex is a bit of a hack. This simulates the index generation to
-// convert an event ID into a WaitIndex.
-func (e *Event) IDToIndex(uuid string) uint64 {
-	lower := uuid[0:8] + uuid[9:13] + uuid[14:18]
-	upper := uuid[19:23] + uuid[24:36]
-	lowVal, err := strconv.ParseUint(lower, 16, 64)
-	if err != nil {
-		panic("Failed to convert " + lower)
-	}
-	highVal, err := strconv.ParseUint(upper, 16, 64)
-	if err != nil {
-		panic("Failed to convert " + upper)
-	}
-	return lowVal ^ highVal
-}
diff --git a/vendor/github.com/hashicorp/consul/api/go.mod b/vendor/github.com/hashicorp/consul/api/go.mod
deleted file mode 100644
index 78fe8a3..0000000
--- a/vendor/github.com/hashicorp/consul/api/go.mod
+++ /dev/null
@@ -1,16 +0,0 @@
-module github.com/hashicorp/consul/api
-
-go 1.12
-
-replace github.com/hashicorp/consul/sdk => ../sdk
-
-require (
-	github.com/hashicorp/consul/sdk v0.2.0
-	github.com/hashicorp/go-cleanhttp v0.5.1
-	github.com/hashicorp/go-rootcerts v1.0.0
-	github.com/hashicorp/go-uuid v1.0.1
-	github.com/hashicorp/serf v0.8.2
-	github.com/mitchellh/mapstructure v1.1.2
-	github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c
-	github.com/stretchr/testify v1.3.0
-)
diff --git a/vendor/github.com/hashicorp/consul/api/go.sum b/vendor/github.com/hashicorp/consul/api/go.sum
deleted file mode 100644
index 01591f9..0000000
--- a/vendor/github.com/hashicorp/consul/api/go.sum
+++ /dev/null
@@ -1,78 +0,0 @@
-github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
-github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/hashicorp/consul/sdk v0.2.0 h1:GWFYFmry/k4b1hEoy7kSkmU8e30GAyI4VZHk0fRxeL4=
-github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=
-github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=
-github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=
-github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
-github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
-github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
-github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
-github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
-github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=
-github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=
-github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
-github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=
-github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
-github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
-github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
-github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
-github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
-github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
-github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs=
-golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5 h1:x6r4Jo0KNzOOzYd8lbcRsqjuqEASK6ob3auvWYM4/8U=
-golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/hashicorp/consul/api/health.go b/vendor/github.com/hashicorp/consul/api/health.go
deleted file mode 100644
index 9faf6b6..0000000
--- a/vendor/github.com/hashicorp/consul/api/health.go
+++ /dev/null
@@ -1,330 +0,0 @@
-package api
-
-import (
-	"encoding/json"
-	"fmt"
-	"strings"
-	"time"
-)
-
-const (
-	// HealthAny is special, and is used as a wild card,
-	// not as a specific state.
-	HealthAny      = "any"
-	HealthPassing  = "passing"
-	HealthWarning  = "warning"
-	HealthCritical = "critical"
-	HealthMaint    = "maintenance"
-)
-
-const (
-	// NodeMaint is the special key set by a node in maintenance mode.
-	NodeMaint = "_node_maintenance"
-
-	// ServiceMaintPrefix is the prefix for a service in maintenance mode.
-	ServiceMaintPrefix = "_service_maintenance:"
-)
-
-// HealthCheck is used to represent a single check
-type HealthCheck struct {
-	Node        string
-	CheckID     string
-	Name        string
-	Status      string
-	Notes       string
-	Output      string
-	ServiceID   string
-	ServiceName string
-	ServiceTags []string
-
-	Definition HealthCheckDefinition
-
-	CreateIndex uint64
-	ModifyIndex uint64
-}
-
-// HealthCheckDefinition is used to store the details about
-// a health check's execution.
-type HealthCheckDefinition struct {
-	HTTP                                   string
-	Header                                 map[string][]string
-	Method                                 string
-	TLSSkipVerify                          bool
-	TCP                                    string
-	IntervalDuration                       time.Duration `json:"-"`
-	TimeoutDuration                        time.Duration `json:"-"`
-	DeregisterCriticalServiceAfterDuration time.Duration `json:"-"`
-
-	// DEPRECATED in Consul 1.4.1. Use the above time.Duration fields instead.
-	Interval                       ReadableDuration
-	Timeout                        ReadableDuration
-	DeregisterCriticalServiceAfter ReadableDuration
-}
-
-func (d *HealthCheckDefinition) MarshalJSON() ([]byte, error) {
-	type Alias HealthCheckDefinition
-	out := &struct {
-		Interval                       string
-		Timeout                        string
-		DeregisterCriticalServiceAfter string
-		*Alias
-	}{
-		Interval:                       d.Interval.String(),
-		Timeout:                        d.Timeout.String(),
-		DeregisterCriticalServiceAfter: d.DeregisterCriticalServiceAfter.String(),
-		Alias:                          (*Alias)(d),
-	}
-
-	if d.IntervalDuration != 0 {
-		out.Interval = d.IntervalDuration.String()
-	} else if d.Interval != 0 {
-		out.Interval = d.Interval.String()
-	}
-	if d.TimeoutDuration != 0 {
-		out.Timeout = d.TimeoutDuration.String()
-	} else if d.Timeout != 0 {
-		out.Timeout = d.Timeout.String()
-	}
-	if d.DeregisterCriticalServiceAfterDuration != 0 {
-		out.DeregisterCriticalServiceAfter = d.DeregisterCriticalServiceAfterDuration.String()
-	} else if d.DeregisterCriticalServiceAfter != 0 {
-		out.DeregisterCriticalServiceAfter = d.DeregisterCriticalServiceAfter.String()
-	}
-
-	return json.Marshal(out)
-}
-
-func (d *HealthCheckDefinition) UnmarshalJSON(data []byte) error {
-	type Alias HealthCheckDefinition
-	aux := &struct {
-		Interval                       string
-		Timeout                        string
-		DeregisterCriticalServiceAfter string
-		*Alias
-	}{
-		Alias: (*Alias)(d),
-	}
-	if err := json.Unmarshal(data, &aux); err != nil {
-		return err
-	}
-
-	// Parse the values into both the time.Duration and old ReadableDuration fields.
-	var err error
-	if aux.Interval != "" {
-		if d.IntervalDuration, err = time.ParseDuration(aux.Interval); err != nil {
-			return err
-		}
-		d.Interval = ReadableDuration(d.IntervalDuration)
-	}
-	if aux.Timeout != "" {
-		if d.TimeoutDuration, err = time.ParseDuration(aux.Timeout); err != nil {
-			return err
-		}
-		d.Timeout = ReadableDuration(d.TimeoutDuration)
-	}
-	if aux.DeregisterCriticalServiceAfter != "" {
-		if d.DeregisterCriticalServiceAfterDuration, err = time.ParseDuration(aux.DeregisterCriticalServiceAfter); err != nil {
-			return err
-		}
-		d.DeregisterCriticalServiceAfter = ReadableDuration(d.DeregisterCriticalServiceAfterDuration)
-	}
-	return nil
-}
-
-// HealthChecks is a collection of HealthCheck structs.
-type HealthChecks []*HealthCheck
-
-// AggregatedStatus returns the "best" status for the list of health checks.
-// Because a given entry may have many service and node-level health checks
-// attached, this function determines the best representative of the status as
-// as single string using the following heuristic:
-//
-//  maintenance > critical > warning > passing
-//
-func (c HealthChecks) AggregatedStatus() string {
-	var passing, warning, critical, maintenance bool
-	for _, check := range c {
-		id := string(check.CheckID)
-		if id == NodeMaint || strings.HasPrefix(id, ServiceMaintPrefix) {
-			maintenance = true
-			continue
-		}
-
-		switch check.Status {
-		case HealthPassing:
-			passing = true
-		case HealthWarning:
-			warning = true
-		case HealthCritical:
-			critical = true
-		default:
-			return ""
-		}
-	}
-
-	switch {
-	case maintenance:
-		return HealthMaint
-	case critical:
-		return HealthCritical
-	case warning:
-		return HealthWarning
-	case passing:
-		return HealthPassing
-	default:
-		return HealthPassing
-	}
-}
-
-// ServiceEntry is used for the health service endpoint
-type ServiceEntry struct {
-	Node    *Node
-	Service *AgentService
-	Checks  HealthChecks
-}
-
-// Health can be used to query the Health endpoints
-type Health struct {
-	c *Client
-}
-
-// Health returns a handle to the health endpoints
-func (c *Client) Health() *Health {
-	return &Health{c}
-}
-
-// Node is used to query for checks belonging to a given node
-func (h *Health) Node(node string, q *QueryOptions) (HealthChecks, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/health/node/"+node)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out HealthChecks
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Checks is used to return the checks associated with a service
-func (h *Health) Checks(service string, q *QueryOptions) (HealthChecks, *QueryMeta, error) {
-	r := h.c.newRequest("GET", "/v1/health/checks/"+service)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out HealthChecks
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Service is used to query health information along with service info
-// for a given service. It can optionally do server-side filtering on a tag
-// or nodes with passing health checks only.
-func (h *Health) Service(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) {
-	var tags []string
-	if tag != "" {
-		tags = []string{tag}
-	}
-	return h.service(service, tags, passingOnly, q, false)
-}
-
-func (h *Health) ServiceMultipleTags(service string, tags []string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) {
-	return h.service(service, tags, passingOnly, q, false)
-}
-
-// Connect is equivalent to Service except that it will only return services
-// which are Connect-enabled and will returns the connection address for Connect
-// client's to use which may be a proxy in front of the named service. If
-// passingOnly is true only instances where both the service and any proxy are
-// healthy will be returned.
-func (h *Health) Connect(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) {
-	var tags []string
-	if tag != "" {
-		tags = []string{tag}
-	}
-	return h.service(service, tags, passingOnly, q, true)
-}
-
-func (h *Health) ConnectMultipleTags(service string, tags []string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) {
-	return h.service(service, tags, passingOnly, q, true)
-}
-
-func (h *Health) service(service string, tags []string, passingOnly bool, q *QueryOptions, connect bool) ([]*ServiceEntry, *QueryMeta, error) {
-	path := "/v1/health/service/" + service
-	if connect {
-		path = "/v1/health/connect/" + service
-	}
-	r := h.c.newRequest("GET", path)
-	r.setQueryOptions(q)
-	if len(tags) > 0 {
-		for _, tag := range tags {
-			r.params.Add("tag", tag)
-		}
-	}
-	if passingOnly {
-		r.params.Set(HealthPassing, "1")
-	}
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out []*ServiceEntry
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// State is used to retrieve all the checks in a given state.
-// The wildcard "any" state can also be used for all checks.
-func (h *Health) State(state string, q *QueryOptions) (HealthChecks, *QueryMeta, error) {
-	switch state {
-	case HealthAny:
-	case HealthWarning:
-	case HealthCritical:
-	case HealthPassing:
-	default:
-		return nil, nil, fmt.Errorf("Unsupported state: %v", state)
-	}
-	r := h.c.newRequest("GET", "/v1/health/state/"+state)
-	r.setQueryOptions(q)
-	rtt, resp, err := requireOK(h.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	var out HealthChecks
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/kv.go b/vendor/github.com/hashicorp/consul/api/kv.go
deleted file mode 100644
index bd45a06..0000000
--- a/vendor/github.com/hashicorp/consul/api/kv.go
+++ /dev/null
@@ -1,286 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"net/http"
-	"strconv"
-	"strings"
-)
-
-// KVPair is used to represent a single K/V entry
-type KVPair struct {
-	// Key is the name of the key. It is also part of the URL path when accessed
-	// via the API.
-	Key string
-
-	// CreateIndex holds the index corresponding the creation of this KVPair. This
-	// is a read-only field.
-	CreateIndex uint64
-
-	// ModifyIndex is used for the Check-And-Set operations and can also be fed
-	// back into the WaitIndex of the QueryOptions in order to perform blocking
-	// queries.
-	ModifyIndex uint64
-
-	// LockIndex holds the index corresponding to a lock on this key, if any. This
-	// is a read-only field.
-	LockIndex uint64
-
-	// Flags are any user-defined flags on the key. It is up to the implementer
-	// to check these values, since Consul does not treat them specially.
-	Flags uint64
-
-	// Value is the value for the key. This can be any value, but it will be
-	// base64 encoded upon transport.
-	Value []byte
-
-	// Session is a string representing the ID of the session. Any other
-	// interactions with this key over the same session must specify the same
-	// session ID.
-	Session string
-}
-
-// KVPairs is a list of KVPair objects
-type KVPairs []*KVPair
-
-// KV is used to manipulate the K/V API
-type KV struct {
-	c *Client
-}
-
-// KV is used to return a handle to the K/V apis
-func (c *Client) KV() *KV {
-	return &KV{c}
-}
-
-// Get is used to lookup a single key. The returned pointer
-// to the KVPair will be nil if the key does not exist.
-func (k *KV) Get(key string, q *QueryOptions) (*KVPair, *QueryMeta, error) {
-	resp, qm, err := k.getInternal(key, nil, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	if resp == nil {
-		return nil, qm, nil
-	}
-	defer resp.Body.Close()
-
-	var entries []*KVPair
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	if len(entries) > 0 {
-		return entries[0], qm, nil
-	}
-	return nil, qm, nil
-}
-
-// List is used to lookup all keys under a prefix
-func (k *KV) List(prefix string, q *QueryOptions) (KVPairs, *QueryMeta, error) {
-	resp, qm, err := k.getInternal(prefix, map[string]string{"recurse": ""}, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	if resp == nil {
-		return nil, qm, nil
-	}
-	defer resp.Body.Close()
-
-	var entries []*KVPair
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// Keys is used to list all the keys under a prefix. Optionally,
-// a separator can be used to limit the responses.
-func (k *KV) Keys(prefix, separator string, q *QueryOptions) ([]string, *QueryMeta, error) {
-	params := map[string]string{"keys": ""}
-	if separator != "" {
-		params["separator"] = separator
-	}
-	resp, qm, err := k.getInternal(prefix, params, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	if resp == nil {
-		return nil, qm, nil
-	}
-	defer resp.Body.Close()
-
-	var entries []string
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-func (k *KV) getInternal(key string, params map[string]string, q *QueryOptions) (*http.Response, *QueryMeta, error) {
-	r := k.c.newRequest("GET", "/v1/kv/"+strings.TrimPrefix(key, "/"))
-	r.setQueryOptions(q)
-	for param, val := range params {
-		r.params.Set(param, val)
-	}
-	rtt, resp, err := k.c.doRequest(r)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if resp.StatusCode == 404 {
-		resp.Body.Close()
-		return nil, qm, nil
-	} else if resp.StatusCode != 200 {
-		resp.Body.Close()
-		return nil, nil, fmt.Errorf("Unexpected response code: %d", resp.StatusCode)
-	}
-	return resp, qm, nil
-}
-
-// Put is used to write a new value. Only the
-// Key, Flags and Value is respected.
-func (k *KV) Put(p *KVPair, q *WriteOptions) (*WriteMeta, error) {
-	params := make(map[string]string, 1)
-	if p.Flags != 0 {
-		params["flags"] = strconv.FormatUint(p.Flags, 10)
-	}
-	_, wm, err := k.put(p.Key, params, p.Value, q)
-	return wm, err
-}
-
-// CAS is used for a Check-And-Set operation. The Key,
-// ModifyIndex, Flags and Value are respected. Returns true
-// on success or false on failures.
-func (k *KV) CAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) {
-	params := make(map[string]string, 2)
-	if p.Flags != 0 {
-		params["flags"] = strconv.FormatUint(p.Flags, 10)
-	}
-	params["cas"] = strconv.FormatUint(p.ModifyIndex, 10)
-	return k.put(p.Key, params, p.Value, q)
-}
-
-// Acquire is used for a lock acquisition operation. The Key,
-// Flags, Value and Session are respected. Returns true
-// on success or false on failures.
-func (k *KV) Acquire(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) {
-	params := make(map[string]string, 2)
-	if p.Flags != 0 {
-		params["flags"] = strconv.FormatUint(p.Flags, 10)
-	}
-	params["acquire"] = p.Session
-	return k.put(p.Key, params, p.Value, q)
-}
-
-// Release is used for a lock release operation. The Key,
-// Flags, Value and Session are respected. Returns true
-// on success or false on failures.
-func (k *KV) Release(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) {
-	params := make(map[string]string, 2)
-	if p.Flags != 0 {
-		params["flags"] = strconv.FormatUint(p.Flags, 10)
-	}
-	params["release"] = p.Session
-	return k.put(p.Key, params, p.Value, q)
-}
-
-func (k *KV) put(key string, params map[string]string, body []byte, q *WriteOptions) (bool, *WriteMeta, error) {
-	if len(key) > 0 && key[0] == '/' {
-		return false, nil, fmt.Errorf("Invalid key. Key must not begin with a '/': %s", key)
-	}
-
-	r := k.c.newRequest("PUT", "/v1/kv/"+key)
-	r.setWriteOptions(q)
-	for param, val := range params {
-		r.params.Set(param, val)
-	}
-	r.body = bytes.NewReader(body)
-	rtt, resp, err := requireOK(k.c.doRequest(r))
-	if err != nil {
-		return false, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &WriteMeta{}
-	qm.RequestTime = rtt
-
-	var buf bytes.Buffer
-	if _, err := io.Copy(&buf, resp.Body); err != nil {
-		return false, nil, fmt.Errorf("Failed to read response: %v", err)
-	}
-	res := strings.Contains(buf.String(), "true")
-	return res, qm, nil
-}
-
-// Delete is used to delete a single key
-func (k *KV) Delete(key string, w *WriteOptions) (*WriteMeta, error) {
-	_, qm, err := k.deleteInternal(key, nil, w)
-	return qm, err
-}
-
-// DeleteCAS is used for a Delete Check-And-Set operation. The Key
-// and ModifyIndex are respected. Returns true on success or false on failures.
-func (k *KV) DeleteCAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) {
-	params := map[string]string{
-		"cas": strconv.FormatUint(p.ModifyIndex, 10),
-	}
-	return k.deleteInternal(p.Key, params, q)
-}
-
-// DeleteTree is used to delete all keys under a prefix
-func (k *KV) DeleteTree(prefix string, w *WriteOptions) (*WriteMeta, error) {
-	_, qm, err := k.deleteInternal(prefix, map[string]string{"recurse": ""}, w)
-	return qm, err
-}
-
-func (k *KV) deleteInternal(key string, params map[string]string, q *WriteOptions) (bool, *WriteMeta, error) {
-	r := k.c.newRequest("DELETE", "/v1/kv/"+strings.TrimPrefix(key, "/"))
-	r.setWriteOptions(q)
-	for param, val := range params {
-		r.params.Set(param, val)
-	}
-	rtt, resp, err := requireOK(k.c.doRequest(r))
-	if err != nil {
-		return false, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &WriteMeta{}
-	qm.RequestTime = rtt
-
-	var buf bytes.Buffer
-	if _, err := io.Copy(&buf, resp.Body); err != nil {
-		return false, nil, fmt.Errorf("Failed to read response: %v", err)
-	}
-	res := strings.Contains(buf.String(), "true")
-	return res, qm, nil
-}
-
-// The Txn function has been deprecated from the KV object; please see the Txn
-// object for more information about Transactions.
-func (k *KV) Txn(txn KVTxnOps, q *QueryOptions) (bool, *KVTxnResponse, *QueryMeta, error) {
-	var ops TxnOps
-	for _, op := range txn {
-		ops = append(ops, &TxnOp{KV: op})
-	}
-
-	respOk, txnResp, qm, err := k.c.txn(ops, q)
-	if err != nil {
-		return false, nil, nil, err
-	}
-
-	// Convert from the internal format.
-	kvResp := KVTxnResponse{
-		Errors: txnResp.Errors,
-	}
-	for _, result := range txnResp.Results {
-		kvResp.Results = append(kvResp.Results, result.KV)
-	}
-	return respOk, &kvResp, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/lock.go b/vendor/github.com/hashicorp/consul/api/lock.go
deleted file mode 100644
index 82339cb..0000000
--- a/vendor/github.com/hashicorp/consul/api/lock.go
+++ /dev/null
@@ -1,386 +0,0 @@
-package api
-
-import (
-	"fmt"
-	"sync"
-	"time"
-)
-
-const (
-	// DefaultLockSessionName is the Session Name we assign if none is provided
-	DefaultLockSessionName = "Consul API Lock"
-
-	// DefaultLockSessionTTL is the default session TTL if no Session is provided
-	// when creating a new Lock. This is used because we do not have another
-	// other check to depend upon.
-	DefaultLockSessionTTL = "15s"
-
-	// DefaultLockWaitTime is how long we block for at a time to check if lock
-	// acquisition is possible. This affects the minimum time it takes to cancel
-	// a Lock acquisition.
-	DefaultLockWaitTime = 15 * time.Second
-
-	// DefaultLockRetryTime is how long we wait after a failed lock acquisition
-	// before attempting to do the lock again. This is so that once a lock-delay
-	// is in effect, we do not hot loop retrying the acquisition.
-	DefaultLockRetryTime = 5 * time.Second
-
-	// DefaultMonitorRetryTime is how long we wait after a failed monitor check
-	// of a lock (500 response code). This allows the monitor to ride out brief
-	// periods of unavailability, subject to the MonitorRetries setting in the
-	// lock options which is by default set to 0, disabling this feature. This
-	// affects locks and semaphores.
-	DefaultMonitorRetryTime = 2 * time.Second
-
-	// LockFlagValue is a magic flag we set to indicate a key
-	// is being used for a lock. It is used to detect a potential
-	// conflict with a semaphore.
-	LockFlagValue = 0x2ddccbc058a50c18
-)
-
-var (
-	// ErrLockHeld is returned if we attempt to double lock
-	ErrLockHeld = fmt.Errorf("Lock already held")
-
-	// ErrLockNotHeld is returned if we attempt to unlock a lock
-	// that we do not hold.
-	ErrLockNotHeld = fmt.Errorf("Lock not held")
-
-	// ErrLockInUse is returned if we attempt to destroy a lock
-	// that is in use.
-	ErrLockInUse = fmt.Errorf("Lock in use")
-
-	// ErrLockConflict is returned if the flags on a key
-	// used for a lock do not match expectation
-	ErrLockConflict = fmt.Errorf("Existing key does not match lock use")
-)
-
-// Lock is used to implement client-side leader election. It is follows the
-// algorithm as described here: https://www.consul.io/docs/guides/leader-election.html.
-type Lock struct {
-	c    *Client
-	opts *LockOptions
-
-	isHeld       bool
-	sessionRenew chan struct{}
-	lockSession  string
-	l            sync.Mutex
-}
-
-// LockOptions is used to parameterize the Lock behavior.
-type LockOptions struct {
-	Key              string        // Must be set and have write permissions
-	Value            []byte        // Optional, value to associate with the lock
-	Session          string        // Optional, created if not specified
-	SessionOpts      *SessionEntry // Optional, options to use when creating a session
-	SessionName      string        // Optional, defaults to DefaultLockSessionName (ignored if SessionOpts is given)
-	SessionTTL       string        // Optional, defaults to DefaultLockSessionTTL (ignored if SessionOpts is given)
-	MonitorRetries   int           // Optional, defaults to 0 which means no retries
-	MonitorRetryTime time.Duration // Optional, defaults to DefaultMonitorRetryTime
-	LockWaitTime     time.Duration // Optional, defaults to DefaultLockWaitTime
-	LockTryOnce      bool          // Optional, defaults to false which means try forever
-}
-
-// LockKey returns a handle to a lock struct which can be used
-// to acquire and release the mutex. The key used must have
-// write permissions.
-func (c *Client) LockKey(key string) (*Lock, error) {
-	opts := &LockOptions{
-		Key: key,
-	}
-	return c.LockOpts(opts)
-}
-
-// LockOpts returns a handle to a lock struct which can be used
-// to acquire and release the mutex. The key used must have
-// write permissions.
-func (c *Client) LockOpts(opts *LockOptions) (*Lock, error) {
-	if opts.Key == "" {
-		return nil, fmt.Errorf("missing key")
-	}
-	if opts.SessionName == "" {
-		opts.SessionName = DefaultLockSessionName
-	}
-	if opts.SessionTTL == "" {
-		opts.SessionTTL = DefaultLockSessionTTL
-	} else {
-		if _, err := time.ParseDuration(opts.SessionTTL); err != nil {
-			return nil, fmt.Errorf("invalid SessionTTL: %v", err)
-		}
-	}
-	if opts.MonitorRetryTime == 0 {
-		opts.MonitorRetryTime = DefaultMonitorRetryTime
-	}
-	if opts.LockWaitTime == 0 {
-		opts.LockWaitTime = DefaultLockWaitTime
-	}
-	l := &Lock{
-		c:    c,
-		opts: opts,
-	}
-	return l, nil
-}
-
-// Lock attempts to acquire the lock and blocks while doing so.
-// Providing a non-nil stopCh can be used to abort the lock attempt.
-// Returns a channel that is closed if our lock is lost or an error.
-// This channel could be closed at any time due to session invalidation,
-// communication errors, operator intervention, etc. It is NOT safe to
-// assume that the lock is held until Unlock() unless the Session is specifically
-// created without any associated health checks. By default Consul sessions
-// prefer liveness over safety and an application must be able to handle
-// the lock being lost.
-func (l *Lock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error) {
-	// Hold the lock as we try to acquire
-	l.l.Lock()
-	defer l.l.Unlock()
-
-	// Check if we already hold the lock
-	if l.isHeld {
-		return nil, ErrLockHeld
-	}
-
-	// Check if we need to create a session first
-	l.lockSession = l.opts.Session
-	if l.lockSession == "" {
-		s, err := l.createSession()
-		if err != nil {
-			return nil, fmt.Errorf("failed to create session: %v", err)
-		}
-
-		l.sessionRenew = make(chan struct{})
-		l.lockSession = s
-		session := l.c.Session()
-		go session.RenewPeriodic(l.opts.SessionTTL, s, nil, l.sessionRenew)
-
-		// If we fail to acquire the lock, cleanup the session
-		defer func() {
-			if !l.isHeld {
-				close(l.sessionRenew)
-				l.sessionRenew = nil
-			}
-		}()
-	}
-
-	// Setup the query options
-	kv := l.c.KV()
-	qOpts := &QueryOptions{
-		WaitTime: l.opts.LockWaitTime,
-	}
-
-	start := time.Now()
-	attempts := 0
-WAIT:
-	// Check if we should quit
-	select {
-	case <-stopCh:
-		return nil, nil
-	default:
-	}
-
-	// Handle the one-shot mode.
-	if l.opts.LockTryOnce && attempts > 0 {
-		elapsed := time.Since(start)
-		if elapsed > l.opts.LockWaitTime {
-			return nil, nil
-		}
-
-		// Query wait time should not exceed the lock wait time
-		qOpts.WaitTime = l.opts.LockWaitTime - elapsed
-	}
-	attempts++
-
-	// Look for an existing lock, blocking until not taken
-	pair, meta, err := kv.Get(l.opts.Key, qOpts)
-	if err != nil {
-		return nil, fmt.Errorf("failed to read lock: %v", err)
-	}
-	if pair != nil && pair.Flags != LockFlagValue {
-		return nil, ErrLockConflict
-	}
-	locked := false
-	if pair != nil && pair.Session == l.lockSession {
-		goto HELD
-	}
-	if pair != nil && pair.Session != "" {
-		qOpts.WaitIndex = meta.LastIndex
-		goto WAIT
-	}
-
-	// Try to acquire the lock
-	pair = l.lockEntry(l.lockSession)
-	locked, _, err = kv.Acquire(pair, nil)
-	if err != nil {
-		return nil, fmt.Errorf("failed to acquire lock: %v", err)
-	}
-
-	// Handle the case of not getting the lock
-	if !locked {
-		// Determine why the lock failed
-		qOpts.WaitIndex = 0
-		pair, meta, err = kv.Get(l.opts.Key, qOpts)
-		if pair != nil && pair.Session != "" {
-			//If the session is not null, this means that a wait can safely happen
-			//using a long poll
-			qOpts.WaitIndex = meta.LastIndex
-			goto WAIT
-		} else {
-			// If the session is empty and the lock failed to acquire, then it means
-			// a lock-delay is in effect and a timed wait must be used
-			select {
-			case <-time.After(DefaultLockRetryTime):
-				goto WAIT
-			case <-stopCh:
-				return nil, nil
-			}
-		}
-	}
-
-HELD:
-	// Watch to ensure we maintain leadership
-	leaderCh := make(chan struct{})
-	go l.monitorLock(l.lockSession, leaderCh)
-
-	// Set that we own the lock
-	l.isHeld = true
-
-	// Locked! All done
-	return leaderCh, nil
-}
-
-// Unlock released the lock. It is an error to call this
-// if the lock is not currently held.
-func (l *Lock) Unlock() error {
-	// Hold the lock as we try to release
-	l.l.Lock()
-	defer l.l.Unlock()
-
-	// Ensure the lock is actually held
-	if !l.isHeld {
-		return ErrLockNotHeld
-	}
-
-	// Set that we no longer own the lock
-	l.isHeld = false
-
-	// Stop the session renew
-	if l.sessionRenew != nil {
-		defer func() {
-			close(l.sessionRenew)
-			l.sessionRenew = nil
-		}()
-	}
-
-	// Get the lock entry, and clear the lock session
-	lockEnt := l.lockEntry(l.lockSession)
-	l.lockSession = ""
-
-	// Release the lock explicitly
-	kv := l.c.KV()
-	_, _, err := kv.Release(lockEnt, nil)
-	if err != nil {
-		return fmt.Errorf("failed to release lock: %v", err)
-	}
-	return nil
-}
-
-// Destroy is used to cleanup the lock entry. It is not necessary
-// to invoke. It will fail if the lock is in use.
-func (l *Lock) Destroy() error {
-	// Hold the lock as we try to release
-	l.l.Lock()
-	defer l.l.Unlock()
-
-	// Check if we already hold the lock
-	if l.isHeld {
-		return ErrLockHeld
-	}
-
-	// Look for an existing lock
-	kv := l.c.KV()
-	pair, _, err := kv.Get(l.opts.Key, nil)
-	if err != nil {
-		return fmt.Errorf("failed to read lock: %v", err)
-	}
-
-	// Nothing to do if the lock does not exist
-	if pair == nil {
-		return nil
-	}
-
-	// Check for possible flag conflict
-	if pair.Flags != LockFlagValue {
-		return ErrLockConflict
-	}
-
-	// Check if it is in use
-	if pair.Session != "" {
-		return ErrLockInUse
-	}
-
-	// Attempt the delete
-	didRemove, _, err := kv.DeleteCAS(pair, nil)
-	if err != nil {
-		return fmt.Errorf("failed to remove lock: %v", err)
-	}
-	if !didRemove {
-		return ErrLockInUse
-	}
-	return nil
-}
-
-// createSession is used to create a new managed session
-func (l *Lock) createSession() (string, error) {
-	session := l.c.Session()
-	se := l.opts.SessionOpts
-	if se == nil {
-		se = &SessionEntry{
-			Name: l.opts.SessionName,
-			TTL:  l.opts.SessionTTL,
-		}
-	}
-	id, _, err := session.Create(se, nil)
-	if err != nil {
-		return "", err
-	}
-	return id, nil
-}
-
-// lockEntry returns a formatted KVPair for the lock
-func (l *Lock) lockEntry(session string) *KVPair {
-	return &KVPair{
-		Key:     l.opts.Key,
-		Value:   l.opts.Value,
-		Session: session,
-		Flags:   LockFlagValue,
-	}
-}
-
-// monitorLock is a long running routine to monitor a lock ownership
-// It closes the stopCh if we lose our leadership.
-func (l *Lock) monitorLock(session string, stopCh chan struct{}) {
-	defer close(stopCh)
-	kv := l.c.KV()
-	opts := &QueryOptions{RequireConsistent: true}
-WAIT:
-	retries := l.opts.MonitorRetries
-RETRY:
-	pair, meta, err := kv.Get(l.opts.Key, opts)
-	if err != nil {
-		// If configured we can try to ride out a brief Consul unavailability
-		// by doing retries. Note that we have to attempt the retry in a non-
-		// blocking fashion so that we have a clean place to reset the retry
-		// counter if service is restored.
-		if retries > 0 && IsRetryableError(err) {
-			time.Sleep(l.opts.MonitorRetryTime)
-			retries--
-			opts.WaitIndex = 0
-			goto RETRY
-		}
-		return
-	}
-	if pair != nil && pair.Session == session {
-		opts.WaitIndex = meta.LastIndex
-		goto WAIT
-	}
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator.go b/vendor/github.com/hashicorp/consul/api/operator.go
deleted file mode 100644
index 079e224..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package api
-
-// Operator can be used to perform low-level operator tasks for Consul.
-type Operator struct {
-	c *Client
-}
-
-// Operator returns a handle to the operator endpoints.
-func (c *Client) Operator() *Operator {
-	return &Operator{c}
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator_area.go b/vendor/github.com/hashicorp/consul/api/operator_area.go
deleted file mode 100644
index 5cf7e49..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator_area.go
+++ /dev/null
@@ -1,194 +0,0 @@
-package api
-
-// The /v1/operator/area endpoints are available only in Consul Enterprise and
-// interact with its network area subsystem. Network areas are used to link
-// together Consul servers in different Consul datacenters. With network areas,
-// Consul datacenters can be linked together in ways other than a fully-connected
-// mesh, as is required for Consul's WAN.
-
-import (
-	"net"
-	"time"
-)
-
-// Area defines a network area.
-type Area struct {
-	// ID is this identifier for an area (a UUID). This must be left empty
-	// when creating a new area.
-	ID string
-
-	// PeerDatacenter is the peer Consul datacenter that will make up the
-	// other side of this network area. Network areas always involve a pair
-	// of datacenters: the datacenter where the area was created, and the
-	// peer datacenter. This is required.
-	PeerDatacenter string
-
-	// RetryJoin specifies the address of Consul servers to join to, such as
-	// an IPs or hostnames with an optional port number. This is optional.
-	RetryJoin []string
-
-	// UseTLS specifies whether gossip over this area should be encrypted with TLS
-	// if possible.
-	UseTLS bool
-}
-
-// AreaJoinResponse is returned when a join occurs and gives the result for each
-// address.
-type AreaJoinResponse struct {
-	// The address that was joined.
-	Address string
-
-	// Whether or not the join was a success.
-	Joined bool
-
-	// If we couldn't join, this is the message with information.
-	Error string
-}
-
-// SerfMember is a generic structure for reporting information about members in
-// a Serf cluster. This is only used by the area endpoints right now, but this
-// could be expanded to other endpoints in the future.
-type SerfMember struct {
-	// ID is the node identifier (a UUID).
-	ID string
-
-	// Name is the node name.
-	Name string
-
-	// Addr has the IP address.
-	Addr net.IP
-
-	// Port is the RPC port.
-	Port uint16
-
-	// Datacenter is the DC name.
-	Datacenter string
-
-	// Role is "client", "server", or "unknown".
-	Role string
-
-	// Build has the version of the Consul agent.
-	Build string
-
-	// Protocol is the protocol of the Consul agent.
-	Protocol int
-
-	// Status is the Serf health status "none", "alive", "leaving", "left",
-	// or "failed".
-	Status string
-
-	// RTT is the estimated round trip time from the server handling the
-	// request to the this member. This will be negative if no RTT estimate
-	// is available.
-	RTT time.Duration
-}
-
-// AreaCreate will create a new network area. The ID in the given structure must
-// be empty and a generated ID will be returned on success.
-func (op *Operator) AreaCreate(area *Area, q *WriteOptions) (string, *WriteMeta, error) {
-	r := op.c.newRequest("POST", "/v1/operator/area")
-	r.setWriteOptions(q)
-	r.obj = area
-	rtt, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	var out struct{ ID string }
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// AreaUpdate will update the configuration of the network area with the given ID.
-func (op *Operator) AreaUpdate(areaID string, area *Area, q *WriteOptions) (string, *WriteMeta, error) {
-	r := op.c.newRequest("PUT", "/v1/operator/area/"+areaID)
-	r.setWriteOptions(q)
-	r.obj = area
-	rtt, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	var out struct{ ID string }
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// AreaGet returns a single network area.
-func (op *Operator) AreaGet(areaID string, q *QueryOptions) ([]*Area, *QueryMeta, error) {
-	var out []*Area
-	qm, err := op.c.query("/v1/operator/area/"+areaID, &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// AreaList returns all the available network areas.
-func (op *Operator) AreaList(q *QueryOptions) ([]*Area, *QueryMeta, error) {
-	var out []*Area
-	qm, err := op.c.query("/v1/operator/area", &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// AreaDelete deletes the given network area.
-func (op *Operator) AreaDelete(areaID string, q *WriteOptions) (*WriteMeta, error) {
-	r := op.c.newRequest("DELETE", "/v1/operator/area/"+areaID)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-	return wm, nil
-}
-
-// AreaJoin attempts to join the given set of join addresses to the given
-// network area. See the Area structure for details about join addresses.
-func (op *Operator) AreaJoin(areaID string, addresses []string, q *WriteOptions) ([]*AreaJoinResponse, *WriteMeta, error) {
-	r := op.c.newRequest("PUT", "/v1/operator/area/"+areaID+"/join")
-	r.setWriteOptions(q)
-	r.obj = addresses
-	rtt, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	var out []*AreaJoinResponse
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, nil, err
-	}
-	return out, wm, nil
-}
-
-// AreaMembers lists the Serf information about the members in the given area.
-func (op *Operator) AreaMembers(areaID string, q *QueryOptions) ([]*SerfMember, *QueryMeta, error) {
-	var out []*SerfMember
-	qm, err := op.c.query("/v1/operator/area/"+areaID+"/members", &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator_autopilot.go b/vendor/github.com/hashicorp/consul/api/operator_autopilot.go
deleted file mode 100644
index b179406..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator_autopilot.go
+++ /dev/null
@@ -1,219 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"strconv"
-	"strings"
-	"time"
-)
-
-// AutopilotConfiguration is used for querying/setting the Autopilot configuration.
-// Autopilot helps manage operator tasks related to Consul servers like removing
-// failed servers from the Raft quorum.
-type AutopilotConfiguration struct {
-	// CleanupDeadServers controls whether to remove dead servers from the Raft
-	// peer list when a new server joins
-	CleanupDeadServers bool
-
-	// LastContactThreshold is the limit on the amount of time a server can go
-	// without leader contact before being considered unhealthy.
-	LastContactThreshold *ReadableDuration
-
-	// MaxTrailingLogs is the amount of entries in the Raft Log that a server can
-	// be behind before being considered unhealthy.
-	MaxTrailingLogs uint64
-
-	// ServerStabilizationTime is the minimum amount of time a server must be
-	// in a stable, healthy state before it can be added to the cluster. Only
-	// applicable with Raft protocol version 3 or higher.
-	ServerStabilizationTime *ReadableDuration
-
-	// (Enterprise-only) RedundancyZoneTag is the node tag to use for separating
-	// servers into zones for redundancy. If left blank, this feature will be disabled.
-	RedundancyZoneTag string
-
-	// (Enterprise-only) DisableUpgradeMigration will disable Autopilot's upgrade migration
-	// strategy of waiting until enough newer-versioned servers have been added to the
-	// cluster before promoting them to voters.
-	DisableUpgradeMigration bool
-
-	// (Enterprise-only) UpgradeVersionTag is the node tag to use for version info when
-	// performing upgrade migrations. If left blank, the Consul version will be used.
-	UpgradeVersionTag string
-
-	// CreateIndex holds the index corresponding the creation of this configuration.
-	// This is a read-only field.
-	CreateIndex uint64
-
-	// ModifyIndex will be set to the index of the last update when retrieving the
-	// Autopilot configuration. Resubmitting a configuration with
-	// AutopilotCASConfiguration will perform a check-and-set operation which ensures
-	// there hasn't been a subsequent update since the configuration was retrieved.
-	ModifyIndex uint64
-}
-
-// ServerHealth is the health (from the leader's point of view) of a server.
-type ServerHealth struct {
-	// ID is the raft ID of the server.
-	ID string
-
-	// Name is the node name of the server.
-	Name string
-
-	// Address is the address of the server.
-	Address string
-
-	// The status of the SerfHealth check for the server.
-	SerfStatus string
-
-	// Version is the Consul version of the server.
-	Version string
-
-	// Leader is whether this server is currently the leader.
-	Leader bool
-
-	// LastContact is the time since this node's last contact with the leader.
-	LastContact *ReadableDuration
-
-	// LastTerm is the highest leader term this server has a record of in its Raft log.
-	LastTerm uint64
-
-	// LastIndex is the last log index this server has a record of in its Raft log.
-	LastIndex uint64
-
-	// Healthy is whether or not the server is healthy according to the current
-	// Autopilot config.
-	Healthy bool
-
-	// Voter is whether this is a voting server.
-	Voter bool
-
-	// StableSince is the last time this server's Healthy value changed.
-	StableSince time.Time
-}
-
-// OperatorHealthReply is a representation of the overall health of the cluster
-type OperatorHealthReply struct {
-	// Healthy is true if all the servers in the cluster are healthy.
-	Healthy bool
-
-	// FailureTolerance is the number of healthy servers that could be lost without
-	// an outage occurring.
-	FailureTolerance int
-
-	// Servers holds the health of each server.
-	Servers []ServerHealth
-}
-
-// ReadableDuration is a duration type that is serialized to JSON in human readable format.
-type ReadableDuration time.Duration
-
-func NewReadableDuration(dur time.Duration) *ReadableDuration {
-	d := ReadableDuration(dur)
-	return &d
-}
-
-func (d *ReadableDuration) String() string {
-	return d.Duration().String()
-}
-
-func (d *ReadableDuration) Duration() time.Duration {
-	if d == nil {
-		return time.Duration(0)
-	}
-	return time.Duration(*d)
-}
-
-func (d *ReadableDuration) MarshalJSON() ([]byte, error) {
-	return []byte(fmt.Sprintf(`"%s"`, d.Duration().String())), nil
-}
-
-func (d *ReadableDuration) UnmarshalJSON(raw []byte) error {
-	if d == nil {
-		return fmt.Errorf("cannot unmarshal to nil pointer")
-	}
-
-	str := string(raw)
-	if len(str) < 2 || str[0] != '"' || str[len(str)-1] != '"' {
-		return fmt.Errorf("must be enclosed with quotes: %s", str)
-	}
-	dur, err := time.ParseDuration(str[1 : len(str)-1])
-	if err != nil {
-		return err
-	}
-	*d = ReadableDuration(dur)
-	return nil
-}
-
-// AutopilotGetConfiguration is used to query the current Autopilot configuration.
-func (op *Operator) AutopilotGetConfiguration(q *QueryOptions) (*AutopilotConfiguration, error) {
-	r := op.c.newRequest("GET", "/v1/operator/autopilot/configuration")
-	r.setQueryOptions(q)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out AutopilotConfiguration
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-
-	return &out, nil
-}
-
-// AutopilotSetConfiguration is used to set the current Autopilot configuration.
-func (op *Operator) AutopilotSetConfiguration(conf *AutopilotConfiguration, q *WriteOptions) error {
-	r := op.c.newRequest("PUT", "/v1/operator/autopilot/configuration")
-	r.setWriteOptions(q)
-	r.obj = conf
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// AutopilotCASConfiguration is used to perform a Check-And-Set update on the
-// Autopilot configuration. The ModifyIndex value will be respected. Returns
-// true on success or false on failures.
-func (op *Operator) AutopilotCASConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (bool, error) {
-	r := op.c.newRequest("PUT", "/v1/operator/autopilot/configuration")
-	r.setWriteOptions(q)
-	r.params.Set("cas", strconv.FormatUint(conf.ModifyIndex, 10))
-	r.obj = conf
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return false, err
-	}
-	defer resp.Body.Close()
-
-	var buf bytes.Buffer
-	if _, err := io.Copy(&buf, resp.Body); err != nil {
-		return false, fmt.Errorf("Failed to read response: %v", err)
-	}
-	res := strings.Contains(buf.String(), "true")
-
-	return res, nil
-}
-
-// AutopilotServerHealth
-func (op *Operator) AutopilotServerHealth(q *QueryOptions) (*OperatorHealthReply, error) {
-	r := op.c.newRequest("GET", "/v1/operator/autopilot/health")
-	r.setQueryOptions(q)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out OperatorHealthReply
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return &out, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator_keyring.go b/vendor/github.com/hashicorp/consul/api/operator_keyring.go
deleted file mode 100644
index 038d5d5..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator_keyring.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package api
-
-// keyringRequest is used for performing Keyring operations
-type keyringRequest struct {
-	Key string
-}
-
-// KeyringResponse is returned when listing the gossip encryption keys
-type KeyringResponse struct {
-	// Whether this response is for a WAN ring
-	WAN bool
-
-	// The datacenter name this request corresponds to
-	Datacenter string
-
-	// Segment has the network segment this request corresponds to.
-	Segment string
-
-	// Messages has information or errors from serf
-	Messages map[string]string `json:",omitempty"`
-
-	// A map of the encryption keys to the number of nodes they're installed on
-	Keys map[string]int
-
-	// The total number of nodes in this ring
-	NumNodes int
-}
-
-// KeyringInstall is used to install a new gossip encryption key into the cluster
-func (op *Operator) KeyringInstall(key string, q *WriteOptions) error {
-	r := op.c.newRequest("POST", "/v1/operator/keyring")
-	r.setWriteOptions(q)
-	r.obj = keyringRequest{
-		Key: key,
-	}
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// KeyringList is used to list the gossip keys installed in the cluster
-func (op *Operator) KeyringList(q *QueryOptions) ([]*KeyringResponse, error) {
-	r := op.c.newRequest("GET", "/v1/operator/keyring")
-	r.setQueryOptions(q)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out []*KeyringResponse
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// KeyringRemove is used to remove a gossip encryption key from the cluster
-func (op *Operator) KeyringRemove(key string, q *WriteOptions) error {
-	r := op.c.newRequest("DELETE", "/v1/operator/keyring")
-	r.setWriteOptions(q)
-	r.obj = keyringRequest{
-		Key: key,
-	}
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
-
-// KeyringUse is used to change the active gossip encryption key
-func (op *Operator) KeyringUse(key string, q *WriteOptions) error {
-	r := op.c.newRequest("PUT", "/v1/operator/keyring")
-	r.setWriteOptions(q)
-	r.obj = keyringRequest{
-		Key: key,
-	}
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	resp.Body.Close()
-	return nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator_license.go b/vendor/github.com/hashicorp/consul/api/operator_license.go
deleted file mode 100644
index 25aa702..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator_license.go
+++ /dev/null
@@ -1,111 +0,0 @@
-package api
-
-import (
-	"io/ioutil"
-	"strings"
-	"time"
-)
-
-type License struct {
-	// The unique identifier of the license
-	LicenseID string `json:"license_id"`
-
-	// The customer ID associated with the license
-	CustomerID string `json:"customer_id"`
-
-	// If set, an identifier that should be used to lock the license to a
-	// particular site, cluster, etc.
-	InstallationID string `json:"installation_id"`
-
-	// The time at which the license was issued
-	IssueTime time.Time `json:"issue_time"`
-
-	// The time at which the license starts being valid
-	StartTime time.Time `json:"start_time"`
-
-	// The time after which the license expires
-	ExpirationTime time.Time `json:"expiration_time"`
-
-	// The time at which the license ceases to function and can
-	// no longer be used in any capacity
-	TerminationTime time.Time `json:"termination_time"`
-
-	// The product the license is valid for
-	Product string `json:"product"`
-
-	// License Specific Flags
-	Flags map[string]interface{} `json:"flags"`
-
-	// List of features enabled by the license
-	Features []string `json:"features"`
-}
-
-type LicenseReply struct {
-	Valid    bool
-	License  *License
-	Warnings []string
-}
-
-func (op *Operator) LicenseGet(q *QueryOptions) (*LicenseReply, error) {
-	var reply LicenseReply
-	if _, err := op.c.query("/v1/operator/license", &reply, q); err != nil {
-		return nil, err
-	} else {
-		return &reply, nil
-	}
-}
-
-func (op *Operator) LicenseGetSigned(q *QueryOptions) (string, error) {
-	r := op.c.newRequest("GET", "/v1/operator/license")
-	r.params.Set("signed", "1")
-	r.setQueryOptions(q)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return "", err
-	}
-	defer resp.Body.Close()
-
-	data, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return "", err
-	}
-
-	return string(data), nil
-}
-
-// LicenseReset will reset the license to the builtin one if it is still valid.
-// If the builtin license is invalid, the current license stays active.
-func (op *Operator) LicenseReset(opts *WriteOptions) (*LicenseReply, error) {
-	var reply LicenseReply
-	r := op.c.newRequest("DELETE", "/v1/operator/license")
-	r.setWriteOptions(opts)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	if err := decodeBody(resp, &reply); err != nil {
-		return nil, err
-	}
-
-	return &reply, nil
-}
-
-func (op *Operator) LicensePut(license string, opts *WriteOptions) (*LicenseReply, error) {
-	var reply LicenseReply
-	r := op.c.newRequest("PUT", "/v1/operator/license")
-	r.setWriteOptions(opts)
-	r.body = strings.NewReader(license)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	if err := decodeBody(resp, &reply); err != nil {
-		return nil, err
-	}
-
-	return &reply, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator_raft.go b/vendor/github.com/hashicorp/consul/api/operator_raft.go
deleted file mode 100644
index a9844df..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator_raft.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package api
-
-// RaftServer has information about a server in the Raft configuration.
-type RaftServer struct {
-	// ID is the unique ID for the server. These are currently the same
-	// as the address, but they will be changed to a real GUID in a future
-	// release of Consul.
-	ID string
-
-	// Node is the node name of the server, as known by Consul, or this
-	// will be set to "(unknown)" otherwise.
-	Node string
-
-	// Address is the IP:port of the server, used for Raft communications.
-	Address string
-
-	// Leader is true if this server is the current cluster leader.
-	Leader bool
-
-	// Protocol version is the raft protocol version used by the server
-	ProtocolVersion string
-
-	// Voter is true if this server has a vote in the cluster. This might
-	// be false if the server is staging and still coming online, or if
-	// it's a non-voting server, which will be added in a future release of
-	// Consul.
-	Voter bool
-}
-
-// RaftConfiguration is returned when querying for the current Raft configuration.
-type RaftConfiguration struct {
-	// Servers has the list of servers in the Raft configuration.
-	Servers []*RaftServer
-
-	// Index has the Raft index of this configuration.
-	Index uint64
-}
-
-// RaftGetConfiguration is used to query the current Raft peer set.
-func (op *Operator) RaftGetConfiguration(q *QueryOptions) (*RaftConfiguration, error) {
-	r := op.c.newRequest("GET", "/v1/operator/raft/configuration")
-	r.setQueryOptions(q)
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var out RaftConfiguration
-	if err := decodeBody(resp, &out); err != nil {
-		return nil, err
-	}
-	return &out, nil
-}
-
-// RaftRemovePeerByAddress is used to kick a stale peer (one that it in the Raft
-// quorum but no longer known to Serf or the catalog) by address in the form of
-// "IP:port".
-func (op *Operator) RaftRemovePeerByAddress(address string, q *WriteOptions) error {
-	r := op.c.newRequest("DELETE", "/v1/operator/raft/peer")
-	r.setWriteOptions(q)
-
-	r.params.Set("address", string(address))
-
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-
-	resp.Body.Close()
-	return nil
-}
-
-// RaftRemovePeerByID is used to kick a stale peer (one that it in the Raft
-// quorum but no longer known to Serf or the catalog) by ID.
-func (op *Operator) RaftRemovePeerByID(id string, q *WriteOptions) error {
-	r := op.c.newRequest("DELETE", "/v1/operator/raft/peer")
-	r.setWriteOptions(q)
-
-	r.params.Set("id", string(id))
-
-	_, resp, err := requireOK(op.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-
-	resp.Body.Close()
-	return nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/operator_segment.go b/vendor/github.com/hashicorp/consul/api/operator_segment.go
deleted file mode 100644
index 92b05d3..0000000
--- a/vendor/github.com/hashicorp/consul/api/operator_segment.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package api
-
-// SegmentList returns all the available LAN segments.
-func (op *Operator) SegmentList(q *QueryOptions) ([]string, *QueryMeta, error) {
-	var out []string
-	qm, err := op.c.query("/v1/operator/segment", &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/prepared_query.go b/vendor/github.com/hashicorp/consul/api/prepared_query.go
deleted file mode 100644
index 0204581..0000000
--- a/vendor/github.com/hashicorp/consul/api/prepared_query.go
+++ /dev/null
@@ -1,217 +0,0 @@
-package api
-
-// QueryDatacenterOptions sets options about how we fail over if there are no
-// healthy nodes in the local datacenter.
-type QueryDatacenterOptions struct {
-	// NearestN is set to the number of remote datacenters to try, based on
-	// network coordinates.
-	NearestN int
-
-	// Datacenters is a fixed list of datacenters to try after NearestN. We
-	// never try a datacenter multiple times, so those are subtracted from
-	// this list before proceeding.
-	Datacenters []string
-}
-
-// QueryDNSOptions controls settings when query results are served over DNS.
-type QueryDNSOptions struct {
-	// TTL is the time to live for the served DNS results.
-	TTL string
-}
-
-// ServiceQuery is used to query for a set of healthy nodes offering a specific
-// service.
-type ServiceQuery struct {
-	// Service is the service to query.
-	Service string
-
-	// Near allows baking in the name of a node to automatically distance-
-	// sort from. The magic "_agent" value is supported, which sorts near
-	// the agent which initiated the request by default.
-	Near string
-
-	// Failover controls what we do if there are no healthy nodes in the
-	// local datacenter.
-	Failover QueryDatacenterOptions
-
-	// IgnoreCheckIDs is an optional list of health check IDs to ignore when
-	// considering which nodes are healthy. It is useful as an emergency measure
-	// to temporarily override some health check that is producing false negatives
-	// for example.
-	IgnoreCheckIDs []string
-
-	// If OnlyPassing is true then we will only include nodes with passing
-	// health checks (critical AND warning checks will cause a node to be
-	// discarded)
-	OnlyPassing bool
-
-	// Tags are a set of required and/or disallowed tags. If a tag is in
-	// this list it must be present. If the tag is preceded with "!" then
-	// it is disallowed.
-	Tags []string
-
-	// NodeMeta is a map of required node metadata fields. If a key/value
-	// pair is in this map it must be present on the node in order for the
-	// service entry to be returned.
-	NodeMeta map[string]string
-
-	// ServiceMeta is a map of required service metadata fields. If a key/value
-	// pair is in this map it must be present on the node in order for the
-	// service entry to be returned.
-	ServiceMeta map[string]string
-
-	// Connect if true will filter the prepared query results to only
-	// include Connect-capable services. These include both native services
-	// and proxies for matching services. Note that if a proxy matches,
-	// the constraints in the query above (Near, OnlyPassing, etc.) apply
-	// to the _proxy_ and not the service being proxied. In practice, proxies
-	// should be directly next to their services so this isn't an issue.
-	Connect bool
-}
-
-// QueryTemplate carries the arguments for creating a templated query.
-type QueryTemplate struct {
-	// Type specifies the type of the query template. Currently only
-	// "name_prefix_match" is supported. This field is required.
-	Type string
-
-	// Regexp allows specifying a regex pattern to match against the name
-	// of the query being executed.
-	Regexp string
-}
-
-// PreparedQueryDefinition defines a complete prepared query.
-type PreparedQueryDefinition struct {
-	// ID is this UUID-based ID for the query, always generated by Consul.
-	ID string
-
-	// Name is an optional friendly name for the query supplied by the
-	// user. NOTE - if this feature is used then it will reduce the security
-	// of any read ACL associated with this query/service since this name
-	// can be used to locate nodes with supplying any ACL.
-	Name string
-
-	// Session is an optional session to tie this query's lifetime to. If
-	// this is omitted then the query will not expire.
-	Session string
-
-	// Token is the ACL token used when the query was created, and it is
-	// used when a query is subsequently executed. This token, or a token
-	// with management privileges, must be used to change the query later.
-	Token string
-
-	// Service defines a service query (leaving things open for other types
-	// later).
-	Service ServiceQuery
-
-	// DNS has options that control how the results of this query are
-	// served over DNS.
-	DNS QueryDNSOptions
-
-	// Template is used to pass through the arguments for creating a
-	// prepared query with an attached template. If a template is given,
-	// interpolations are possible in other struct fields.
-	Template QueryTemplate
-}
-
-// PreparedQueryExecuteResponse has the results of executing a query.
-type PreparedQueryExecuteResponse struct {
-	// Service is the service that was queried.
-	Service string
-
-	// Nodes has the nodes that were output by the query.
-	Nodes []ServiceEntry
-
-	// DNS has the options for serving these results over DNS.
-	DNS QueryDNSOptions
-
-	// Datacenter is the datacenter that these results came from.
-	Datacenter string
-
-	// Failovers is a count of how many times we had to query a remote
-	// datacenter.
-	Failovers int
-}
-
-// PreparedQuery can be used to query the prepared query endpoints.
-type PreparedQuery struct {
-	c *Client
-}
-
-// PreparedQuery returns a handle to the prepared query endpoints.
-func (c *Client) PreparedQuery() *PreparedQuery {
-	return &PreparedQuery{c}
-}
-
-// Create makes a new prepared query. The ID of the new query is returned.
-func (c *PreparedQuery) Create(query *PreparedQueryDefinition, q *WriteOptions) (string, *WriteMeta, error) {
-	r := c.c.newRequest("POST", "/v1/query")
-	r.setWriteOptions(q)
-	r.obj = query
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return "", nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-
-	var out struct{ ID string }
-	if err := decodeBody(resp, &out); err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// Update makes updates to an existing prepared query.
-func (c *PreparedQuery) Update(query *PreparedQueryDefinition, q *WriteOptions) (*WriteMeta, error) {
-	return c.c.write("/v1/query/"+query.ID, query, nil, q)
-}
-
-// List is used to fetch all the prepared queries (always requires a management
-// token).
-func (c *PreparedQuery) List(q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) {
-	var out []*PreparedQueryDefinition
-	qm, err := c.c.query("/v1/query", &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Get is used to fetch a specific prepared query.
-func (c *PreparedQuery) Get(queryID string, q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) {
-	var out []*PreparedQueryDefinition
-	qm, err := c.c.query("/v1/query/"+queryID, &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
-
-// Delete is used to delete a specific prepared query.
-func (c *PreparedQuery) Delete(queryID string, q *WriteOptions) (*WriteMeta, error) {
-	r := c.c.newRequest("DELETE", "/v1/query/"+queryID)
-	r.setWriteOptions(q)
-	rtt, resp, err := requireOK(c.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{}
-	wm.RequestTime = rtt
-	return wm, nil
-}
-
-// Execute is used to execute a specific prepared query. You can execute using
-// a query ID or name.
-func (c *PreparedQuery) Execute(queryIDOrName string, q *QueryOptions) (*PreparedQueryExecuteResponse, *QueryMeta, error) {
-	var out *PreparedQueryExecuteResponse
-	qm, err := c.c.query("/v1/query/"+queryIDOrName+"/execute", &out, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return out, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/raw.go b/vendor/github.com/hashicorp/consul/api/raw.go
deleted file mode 100644
index 745a208..0000000
--- a/vendor/github.com/hashicorp/consul/api/raw.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package api
-
-// Raw can be used to do raw queries against custom endpoints
-type Raw struct {
-	c *Client
-}
-
-// Raw returns a handle to query endpoints
-func (c *Client) Raw() *Raw {
-	return &Raw{c}
-}
-
-// Query is used to do a GET request against an endpoint
-// and deserialize the response into an interface using
-// standard Consul conventions.
-func (raw *Raw) Query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) {
-	return raw.c.query(endpoint, out, q)
-}
-
-// Write is used to do a PUT request against an endpoint
-// and serialize/deserialized using the standard Consul conventions.
-func (raw *Raw) Write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) {
-	return raw.c.write(endpoint, in, out, q)
-}
diff --git a/vendor/github.com/hashicorp/consul/api/semaphore.go b/vendor/github.com/hashicorp/consul/api/semaphore.go
deleted file mode 100644
index bc4f885..0000000
--- a/vendor/github.com/hashicorp/consul/api/semaphore.go
+++ /dev/null
@@ -1,514 +0,0 @@
-package api
-
-import (
-	"encoding/json"
-	"fmt"
-	"path"
-	"sync"
-	"time"
-)
-
-const (
-	// DefaultSemaphoreSessionName is the Session Name we assign if none is provided
-	DefaultSemaphoreSessionName = "Consul API Semaphore"
-
-	// DefaultSemaphoreSessionTTL is the default session TTL if no Session is provided
-	// when creating a new Semaphore. This is used because we do not have another
-	// other check to depend upon.
-	DefaultSemaphoreSessionTTL = "15s"
-
-	// DefaultSemaphoreWaitTime is how long we block for at a time to check if semaphore
-	// acquisition is possible. This affects the minimum time it takes to cancel
-	// a Semaphore acquisition.
-	DefaultSemaphoreWaitTime = 15 * time.Second
-
-	// DefaultSemaphoreKey is the key used within the prefix to
-	// use for coordination between all the contenders.
-	DefaultSemaphoreKey = ".lock"
-
-	// SemaphoreFlagValue is a magic flag we set to indicate a key
-	// is being used for a semaphore. It is used to detect a potential
-	// conflict with a lock.
-	SemaphoreFlagValue = 0xe0f69a2baa414de0
-)
-
-var (
-	// ErrSemaphoreHeld is returned if we attempt to double lock
-	ErrSemaphoreHeld = fmt.Errorf("Semaphore already held")
-
-	// ErrSemaphoreNotHeld is returned if we attempt to unlock a semaphore
-	// that we do not hold.
-	ErrSemaphoreNotHeld = fmt.Errorf("Semaphore not held")
-
-	// ErrSemaphoreInUse is returned if we attempt to destroy a semaphore
-	// that is in use.
-	ErrSemaphoreInUse = fmt.Errorf("Semaphore in use")
-
-	// ErrSemaphoreConflict is returned if the flags on a key
-	// used for a semaphore do not match expectation
-	ErrSemaphoreConflict = fmt.Errorf("Existing key does not match semaphore use")
-)
-
-// Semaphore is used to implement a distributed semaphore
-// using the Consul KV primitives.
-type Semaphore struct {
-	c    *Client
-	opts *SemaphoreOptions
-
-	isHeld       bool
-	sessionRenew chan struct{}
-	lockSession  string
-	l            sync.Mutex
-}
-
-// SemaphoreOptions is used to parameterize the Semaphore
-type SemaphoreOptions struct {
-	Prefix            string        // Must be set and have write permissions
-	Limit             int           // Must be set, and be positive
-	Value             []byte        // Optional, value to associate with the contender entry
-	Session           string        // Optional, created if not specified
-	SessionName       string        // Optional, defaults to DefaultLockSessionName
-	SessionTTL        string        // Optional, defaults to DefaultLockSessionTTL
-	MonitorRetries    int           // Optional, defaults to 0 which means no retries
-	MonitorRetryTime  time.Duration // Optional, defaults to DefaultMonitorRetryTime
-	SemaphoreWaitTime time.Duration // Optional, defaults to DefaultSemaphoreWaitTime
-	SemaphoreTryOnce  bool          // Optional, defaults to false which means try forever
-}
-
-// semaphoreLock is written under the DefaultSemaphoreKey and
-// is used to coordinate between all the contenders.
-type semaphoreLock struct {
-	// Limit is the integer limit of holders. This is used to
-	// verify that all the holders agree on the value.
-	Limit int
-
-	// Holders is a list of all the semaphore holders.
-	// It maps the session ID to true. It is used as a set effectively.
-	Holders map[string]bool
-}
-
-// SemaphorePrefix is used to created a Semaphore which will operate
-// at the given KV prefix and uses the given limit for the semaphore.
-// The prefix must have write privileges, and the limit must be agreed
-// upon by all contenders.
-func (c *Client) SemaphorePrefix(prefix string, limit int) (*Semaphore, error) {
-	opts := &SemaphoreOptions{
-		Prefix: prefix,
-		Limit:  limit,
-	}
-	return c.SemaphoreOpts(opts)
-}
-
-// SemaphoreOpts is used to create a Semaphore with the given options.
-// The prefix must have write privileges, and the limit must be agreed
-// upon by all contenders. If a Session is not provided, one will be created.
-func (c *Client) SemaphoreOpts(opts *SemaphoreOptions) (*Semaphore, error) {
-	if opts.Prefix == "" {
-		return nil, fmt.Errorf("missing prefix")
-	}
-	if opts.Limit <= 0 {
-		return nil, fmt.Errorf("semaphore limit must be positive")
-	}
-	if opts.SessionName == "" {
-		opts.SessionName = DefaultSemaphoreSessionName
-	}
-	if opts.SessionTTL == "" {
-		opts.SessionTTL = DefaultSemaphoreSessionTTL
-	} else {
-		if _, err := time.ParseDuration(opts.SessionTTL); err != nil {
-			return nil, fmt.Errorf("invalid SessionTTL: %v", err)
-		}
-	}
-	if opts.MonitorRetryTime == 0 {
-		opts.MonitorRetryTime = DefaultMonitorRetryTime
-	}
-	if opts.SemaphoreWaitTime == 0 {
-		opts.SemaphoreWaitTime = DefaultSemaphoreWaitTime
-	}
-	s := &Semaphore{
-		c:    c,
-		opts: opts,
-	}
-	return s, nil
-}
-
-// Acquire attempts to reserve a slot in the semaphore, blocking until
-// success, interrupted via the stopCh or an error is encountered.
-// Providing a non-nil stopCh can be used to abort the attempt.
-// On success, a channel is returned that represents our slot.
-// This channel could be closed at any time due to session invalidation,
-// communication errors, operator intervention, etc. It is NOT safe to
-// assume that the slot is held until Release() unless the Session is specifically
-// created without any associated health checks. By default Consul sessions
-// prefer liveness over safety and an application must be able to handle
-// the session being lost.
-func (s *Semaphore) Acquire(stopCh <-chan struct{}) (<-chan struct{}, error) {
-	// Hold the lock as we try to acquire
-	s.l.Lock()
-	defer s.l.Unlock()
-
-	// Check if we already hold the semaphore
-	if s.isHeld {
-		return nil, ErrSemaphoreHeld
-	}
-
-	// Check if we need to create a session first
-	s.lockSession = s.opts.Session
-	if s.lockSession == "" {
-		sess, err := s.createSession()
-		if err != nil {
-			return nil, fmt.Errorf("failed to create session: %v", err)
-		}
-
-		s.sessionRenew = make(chan struct{})
-		s.lockSession = sess
-		session := s.c.Session()
-		go session.RenewPeriodic(s.opts.SessionTTL, sess, nil, s.sessionRenew)
-
-		// If we fail to acquire the lock, cleanup the session
-		defer func() {
-			if !s.isHeld {
-				close(s.sessionRenew)
-				s.sessionRenew = nil
-			}
-		}()
-	}
-
-	// Create the contender entry
-	kv := s.c.KV()
-	made, _, err := kv.Acquire(s.contenderEntry(s.lockSession), nil)
-	if err != nil || !made {
-		return nil, fmt.Errorf("failed to make contender entry: %v", err)
-	}
-
-	// Setup the query options
-	qOpts := &QueryOptions{
-		WaitTime: s.opts.SemaphoreWaitTime,
-	}
-
-	start := time.Now()
-	attempts := 0
-WAIT:
-	// Check if we should quit
-	select {
-	case <-stopCh:
-		return nil, nil
-	default:
-	}
-
-	// Handle the one-shot mode.
-	if s.opts.SemaphoreTryOnce && attempts > 0 {
-		elapsed := time.Since(start)
-		if elapsed > s.opts.SemaphoreWaitTime {
-			return nil, nil
-		}
-
-		// Query wait time should not exceed the semaphore wait time
-		qOpts.WaitTime = s.opts.SemaphoreWaitTime - elapsed
-	}
-	attempts++
-
-	// Read the prefix
-	pairs, meta, err := kv.List(s.opts.Prefix, qOpts)
-	if err != nil {
-		return nil, fmt.Errorf("failed to read prefix: %v", err)
-	}
-
-	// Decode the lock
-	lockPair := s.findLock(pairs)
-	if lockPair.Flags != SemaphoreFlagValue {
-		return nil, ErrSemaphoreConflict
-	}
-	lock, err := s.decodeLock(lockPair)
-	if err != nil {
-		return nil, err
-	}
-
-	// Verify we agree with the limit
-	if lock.Limit != s.opts.Limit {
-		return nil, fmt.Errorf("semaphore limit conflict (lock: %d, local: %d)",
-			lock.Limit, s.opts.Limit)
-	}
-
-	// Prune the dead holders
-	s.pruneDeadHolders(lock, pairs)
-
-	// Check if the lock is held
-	if len(lock.Holders) >= lock.Limit {
-		qOpts.WaitIndex = meta.LastIndex
-		goto WAIT
-	}
-
-	// Create a new lock with us as a holder
-	lock.Holders[s.lockSession] = true
-	newLock, err := s.encodeLock(lock, lockPair.ModifyIndex)
-	if err != nil {
-		return nil, err
-	}
-
-	// Attempt the acquisition
-	didSet, _, err := kv.CAS(newLock, nil)
-	if err != nil {
-		return nil, fmt.Errorf("failed to update lock: %v", err)
-	}
-	if !didSet {
-		// Update failed, could have been a race with another contender,
-		// retry the operation
-		goto WAIT
-	}
-
-	// Watch to ensure we maintain ownership of the slot
-	lockCh := make(chan struct{})
-	go s.monitorLock(s.lockSession, lockCh)
-
-	// Set that we own the lock
-	s.isHeld = true
-
-	// Acquired! All done
-	return lockCh, nil
-}
-
-// Release is used to voluntarily give up our semaphore slot. It is
-// an error to call this if the semaphore has not been acquired.
-func (s *Semaphore) Release() error {
-	// Hold the lock as we try to release
-	s.l.Lock()
-	defer s.l.Unlock()
-
-	// Ensure the lock is actually held
-	if !s.isHeld {
-		return ErrSemaphoreNotHeld
-	}
-
-	// Set that we no longer own the lock
-	s.isHeld = false
-
-	// Stop the session renew
-	if s.sessionRenew != nil {
-		defer func() {
-			close(s.sessionRenew)
-			s.sessionRenew = nil
-		}()
-	}
-
-	// Get and clear the lock session
-	lockSession := s.lockSession
-	s.lockSession = ""
-
-	// Remove ourselves as a lock holder
-	kv := s.c.KV()
-	key := path.Join(s.opts.Prefix, DefaultSemaphoreKey)
-READ:
-	pair, _, err := kv.Get(key, nil)
-	if err != nil {
-		return err
-	}
-	if pair == nil {
-		pair = &KVPair{}
-	}
-	lock, err := s.decodeLock(pair)
-	if err != nil {
-		return err
-	}
-
-	// Create a new lock without us as a holder
-	if _, ok := lock.Holders[lockSession]; ok {
-		delete(lock.Holders, lockSession)
-		newLock, err := s.encodeLock(lock, pair.ModifyIndex)
-		if err != nil {
-			return err
-		}
-
-		// Swap the locks
-		didSet, _, err := kv.CAS(newLock, nil)
-		if err != nil {
-			return fmt.Errorf("failed to update lock: %v", err)
-		}
-		if !didSet {
-			goto READ
-		}
-	}
-
-	// Destroy the contender entry
-	contenderKey := path.Join(s.opts.Prefix, lockSession)
-	if _, err := kv.Delete(contenderKey, nil); err != nil {
-		return err
-	}
-	return nil
-}
-
-// Destroy is used to cleanup the semaphore entry. It is not necessary
-// to invoke. It will fail if the semaphore is in use.
-func (s *Semaphore) Destroy() error {
-	// Hold the lock as we try to acquire
-	s.l.Lock()
-	defer s.l.Unlock()
-
-	// Check if we already hold the semaphore
-	if s.isHeld {
-		return ErrSemaphoreHeld
-	}
-
-	// List for the semaphore
-	kv := s.c.KV()
-	pairs, _, err := kv.List(s.opts.Prefix, nil)
-	if err != nil {
-		return fmt.Errorf("failed to read prefix: %v", err)
-	}
-
-	// Find the lock pair, bail if it doesn't exist
-	lockPair := s.findLock(pairs)
-	if lockPair.ModifyIndex == 0 {
-		return nil
-	}
-	if lockPair.Flags != SemaphoreFlagValue {
-		return ErrSemaphoreConflict
-	}
-
-	// Decode the lock
-	lock, err := s.decodeLock(lockPair)
-	if err != nil {
-		return err
-	}
-
-	// Prune the dead holders
-	s.pruneDeadHolders(lock, pairs)
-
-	// Check if there are any holders
-	if len(lock.Holders) > 0 {
-		return ErrSemaphoreInUse
-	}
-
-	// Attempt the delete
-	didRemove, _, err := kv.DeleteCAS(lockPair, nil)
-	if err != nil {
-		return fmt.Errorf("failed to remove semaphore: %v", err)
-	}
-	if !didRemove {
-		return ErrSemaphoreInUse
-	}
-	return nil
-}
-
-// createSession is used to create a new managed session
-func (s *Semaphore) createSession() (string, error) {
-	session := s.c.Session()
-	se := &SessionEntry{
-		Name:     s.opts.SessionName,
-		TTL:      s.opts.SessionTTL,
-		Behavior: SessionBehaviorDelete,
-	}
-	id, _, err := session.Create(se, nil)
-	if err != nil {
-		return "", err
-	}
-	return id, nil
-}
-
-// contenderEntry returns a formatted KVPair for the contender
-func (s *Semaphore) contenderEntry(session string) *KVPair {
-	return &KVPair{
-		Key:     path.Join(s.opts.Prefix, session),
-		Value:   s.opts.Value,
-		Session: session,
-		Flags:   SemaphoreFlagValue,
-	}
-}
-
-// findLock is used to find the KV Pair which is used for coordination
-func (s *Semaphore) findLock(pairs KVPairs) *KVPair {
-	key := path.Join(s.opts.Prefix, DefaultSemaphoreKey)
-	for _, pair := range pairs {
-		if pair.Key == key {
-			return pair
-		}
-	}
-	return &KVPair{Flags: SemaphoreFlagValue}
-}
-
-// decodeLock is used to decode a semaphoreLock from an
-// entry in Consul
-func (s *Semaphore) decodeLock(pair *KVPair) (*semaphoreLock, error) {
-	// Handle if there is no lock
-	if pair == nil || pair.Value == nil {
-		return &semaphoreLock{
-			Limit:   s.opts.Limit,
-			Holders: make(map[string]bool),
-		}, nil
-	}
-
-	l := &semaphoreLock{}
-	if err := json.Unmarshal(pair.Value, l); err != nil {
-		return nil, fmt.Errorf("lock decoding failed: %v", err)
-	}
-	return l, nil
-}
-
-// encodeLock is used to encode a semaphoreLock into a KVPair
-// that can be PUT
-func (s *Semaphore) encodeLock(l *semaphoreLock, oldIndex uint64) (*KVPair, error) {
-	enc, err := json.Marshal(l)
-	if err != nil {
-		return nil, fmt.Errorf("lock encoding failed: %v", err)
-	}
-	pair := &KVPair{
-		Key:         path.Join(s.opts.Prefix, DefaultSemaphoreKey),
-		Value:       enc,
-		Flags:       SemaphoreFlagValue,
-		ModifyIndex: oldIndex,
-	}
-	return pair, nil
-}
-
-// pruneDeadHolders is used to remove all the dead lock holders
-func (s *Semaphore) pruneDeadHolders(lock *semaphoreLock, pairs KVPairs) {
-	// Gather all the live holders
-	alive := make(map[string]struct{}, len(pairs))
-	for _, pair := range pairs {
-		if pair.Session != "" {
-			alive[pair.Session] = struct{}{}
-		}
-	}
-
-	// Remove any holders that are dead
-	for holder := range lock.Holders {
-		if _, ok := alive[holder]; !ok {
-			delete(lock.Holders, holder)
-		}
-	}
-}
-
-// monitorLock is a long running routine to monitor a semaphore ownership
-// It closes the stopCh if we lose our slot.
-func (s *Semaphore) monitorLock(session string, stopCh chan struct{}) {
-	defer close(stopCh)
-	kv := s.c.KV()
-	opts := &QueryOptions{RequireConsistent: true}
-WAIT:
-	retries := s.opts.MonitorRetries
-RETRY:
-	pairs, meta, err := kv.List(s.opts.Prefix, opts)
-	if err != nil {
-		// If configured we can try to ride out a brief Consul unavailability
-		// by doing retries. Note that we have to attempt the retry in a non-
-		// blocking fashion so that we have a clean place to reset the retry
-		// counter if service is restored.
-		if retries > 0 && IsRetryableError(err) {
-			time.Sleep(s.opts.MonitorRetryTime)
-			retries--
-			opts.WaitIndex = 0
-			goto RETRY
-		}
-		return
-	}
-	lockPair := s.findLock(pairs)
-	lock, err := s.decodeLock(lockPair)
-	if err != nil {
-		return
-	}
-	s.pruneDeadHolders(lock, pairs)
-	if _, ok := lock.Holders[session]; ok {
-		opts.WaitIndex = meta.LastIndex
-		goto WAIT
-	}
-}
diff --git a/vendor/github.com/hashicorp/consul/api/session.go b/vendor/github.com/hashicorp/consul/api/session.go
deleted file mode 100644
index 1613f11..0000000
--- a/vendor/github.com/hashicorp/consul/api/session.go
+++ /dev/null
@@ -1,224 +0,0 @@
-package api
-
-import (
-	"errors"
-	"fmt"
-	"time"
-)
-
-const (
-	// SessionBehaviorRelease is the default behavior and causes
-	// all associated locks to be released on session invalidation.
-	SessionBehaviorRelease = "release"
-
-	// SessionBehaviorDelete is new in Consul 0.5 and changes the
-	// behavior to delete all associated locks on session invalidation.
-	// It can be used in a way similar to Ephemeral Nodes in ZooKeeper.
-	SessionBehaviorDelete = "delete"
-)
-
-var ErrSessionExpired = errors.New("session expired")
-
-// SessionEntry represents a session in consul
-type SessionEntry struct {
-	CreateIndex uint64
-	ID          string
-	Name        string
-	Node        string
-	Checks      []string
-	LockDelay   time.Duration
-	Behavior    string
-	TTL         string
-}
-
-// Session can be used to query the Session endpoints
-type Session struct {
-	c *Client
-}
-
-// Session returns a handle to the session endpoints
-func (c *Client) Session() *Session {
-	return &Session{c}
-}
-
-// CreateNoChecks is like Create but is used specifically to create
-// a session with no associated health checks.
-func (s *Session) CreateNoChecks(se *SessionEntry, q *WriteOptions) (string, *WriteMeta, error) {
-	body := make(map[string]interface{})
-	body["Checks"] = []string{}
-	if se != nil {
-		if se.Name != "" {
-			body["Name"] = se.Name
-		}
-		if se.Node != "" {
-			body["Node"] = se.Node
-		}
-		if se.LockDelay != 0 {
-			body["LockDelay"] = durToMsec(se.LockDelay)
-		}
-		if se.Behavior != "" {
-			body["Behavior"] = se.Behavior
-		}
-		if se.TTL != "" {
-			body["TTL"] = se.TTL
-		}
-	}
-	return s.create(body, q)
-
-}
-
-// Create makes a new session. Providing a session entry can
-// customize the session. It can also be nil to use defaults.
-func (s *Session) Create(se *SessionEntry, q *WriteOptions) (string, *WriteMeta, error) {
-	var obj interface{}
-	if se != nil {
-		body := make(map[string]interface{})
-		obj = body
-		if se.Name != "" {
-			body["Name"] = se.Name
-		}
-		if se.Node != "" {
-			body["Node"] = se.Node
-		}
-		if se.LockDelay != 0 {
-			body["LockDelay"] = durToMsec(se.LockDelay)
-		}
-		if len(se.Checks) > 0 {
-			body["Checks"] = se.Checks
-		}
-		if se.Behavior != "" {
-			body["Behavior"] = se.Behavior
-		}
-		if se.TTL != "" {
-			body["TTL"] = se.TTL
-		}
-	}
-	return s.create(obj, q)
-}
-
-func (s *Session) create(obj interface{}, q *WriteOptions) (string, *WriteMeta, error) {
-	var out struct{ ID string }
-	wm, err := s.c.write("/v1/session/create", obj, &out, q)
-	if err != nil {
-		return "", nil, err
-	}
-	return out.ID, wm, nil
-}
-
-// Destroy invalidates a given session
-func (s *Session) Destroy(id string, q *WriteOptions) (*WriteMeta, error) {
-	wm, err := s.c.write("/v1/session/destroy/"+id, nil, nil, q)
-	if err != nil {
-		return nil, err
-	}
-	return wm, nil
-}
-
-// Renew renews the TTL on a given session
-func (s *Session) Renew(id string, q *WriteOptions) (*SessionEntry, *WriteMeta, error) {
-	r := s.c.newRequest("PUT", "/v1/session/renew/"+id)
-	r.setWriteOptions(q)
-	rtt, resp, err := s.c.doRequest(r)
-	if err != nil {
-		return nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	wm := &WriteMeta{RequestTime: rtt}
-
-	if resp.StatusCode == 404 {
-		return nil, wm, nil
-	} else if resp.StatusCode != 200 {
-		return nil, nil, fmt.Errorf("Unexpected response code: %d", resp.StatusCode)
-	}
-
-	var entries []*SessionEntry
-	if err := decodeBody(resp, &entries); err != nil {
-		return nil, nil, fmt.Errorf("Failed to read response: %v", err)
-	}
-	if len(entries) > 0 {
-		return entries[0], wm, nil
-	}
-	return nil, wm, nil
-}
-
-// RenewPeriodic is used to periodically invoke Session.Renew on a
-// session until a doneCh is closed. This is meant to be used in a long running
-// goroutine to ensure a session stays valid.
-func (s *Session) RenewPeriodic(initialTTL string, id string, q *WriteOptions, doneCh <-chan struct{}) error {
-	ctx := q.Context()
-
-	ttl, err := time.ParseDuration(initialTTL)
-	if err != nil {
-		return err
-	}
-
-	waitDur := ttl / 2
-	lastRenewTime := time.Now()
-	var lastErr error
-	for {
-		if time.Since(lastRenewTime) > ttl {
-			return lastErr
-		}
-		select {
-		case <-time.After(waitDur):
-			entry, _, err := s.Renew(id, q)
-			if err != nil {
-				waitDur = time.Second
-				lastErr = err
-				continue
-			}
-			if entry == nil {
-				return ErrSessionExpired
-			}
-
-			// Handle the server updating the TTL
-			ttl, _ = time.ParseDuration(entry.TTL)
-			waitDur = ttl / 2
-			lastRenewTime = time.Now()
-
-		case <-doneCh:
-			// Attempt a session destroy
-			s.Destroy(id, q)
-			return nil
-
-		case <-ctx.Done():
-			// Bail immediately since attempting the destroy would
-			// use the canceled context in q, which would just bail.
-			return ctx.Err()
-		}
-	}
-}
-
-// Info looks up a single session
-func (s *Session) Info(id string, q *QueryOptions) (*SessionEntry, *QueryMeta, error) {
-	var entries []*SessionEntry
-	qm, err := s.c.query("/v1/session/info/"+id, &entries, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	if len(entries) > 0 {
-		return entries[0], qm, nil
-	}
-	return nil, qm, nil
-}
-
-// List gets sessions for a node
-func (s *Session) Node(node string, q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) {
-	var entries []*SessionEntry
-	qm, err := s.c.query("/v1/session/node/"+node, &entries, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
-
-// List gets all active sessions
-func (s *Session) List(q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) {
-	var entries []*SessionEntry
-	qm, err := s.c.query("/v1/session/list", &entries, q)
-	if err != nil {
-		return nil, nil, err
-	}
-	return entries, qm, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/snapshot.go b/vendor/github.com/hashicorp/consul/api/snapshot.go
deleted file mode 100644
index e902377..0000000
--- a/vendor/github.com/hashicorp/consul/api/snapshot.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package api
-
-import (
-	"io"
-)
-
-// Snapshot can be used to query the /v1/snapshot endpoint to take snapshots of
-// Consul's internal state and restore snapshots for disaster recovery.
-type Snapshot struct {
-	c *Client
-}
-
-// Snapshot returns a handle that exposes the snapshot endpoints.
-func (c *Client) Snapshot() *Snapshot {
-	return &Snapshot{c}
-}
-
-// Save requests a new snapshot and provides an io.ReadCloser with the snapshot
-// data to save. If this doesn't return an error, then it's the responsibility
-// of the caller to close it. Only a subset of the QueryOptions are supported:
-// Datacenter, AllowStale, and Token.
-func (s *Snapshot) Save(q *QueryOptions) (io.ReadCloser, *QueryMeta, error) {
-	r := s.c.newRequest("GET", "/v1/snapshot")
-	r.setQueryOptions(q)
-
-	rtt, resp, err := requireOK(s.c.doRequest(r))
-	if err != nil {
-		return nil, nil, err
-	}
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-	return resp.Body, qm, nil
-}
-
-// Restore streams in an existing snapshot and attempts to restore it.
-func (s *Snapshot) Restore(q *WriteOptions, in io.Reader) error {
-	r := s.c.newRequest("PUT", "/v1/snapshot")
-	r.body = in
-	r.setWriteOptions(q)
-	_, _, err := requireOK(s.c.doRequest(r))
-	if err != nil {
-		return err
-	}
-	return nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/status.go b/vendor/github.com/hashicorp/consul/api/status.go
deleted file mode 100644
index 74ef61a..0000000
--- a/vendor/github.com/hashicorp/consul/api/status.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package api
-
-// Status can be used to query the Status endpoints
-type Status struct {
-	c *Client
-}
-
-// Status returns a handle to the status endpoints
-func (c *Client) Status() *Status {
-	return &Status{c}
-}
-
-// Leader is used to query for a known leader
-func (s *Status) Leader() (string, error) {
-	r := s.c.newRequest("GET", "/v1/status/leader")
-	_, resp, err := requireOK(s.c.doRequest(r))
-	if err != nil {
-		return "", err
-	}
-	defer resp.Body.Close()
-
-	var leader string
-	if err := decodeBody(resp, &leader); err != nil {
-		return "", err
-	}
-	return leader, nil
-}
-
-// Peers is used to query for a known raft peers
-func (s *Status) Peers() ([]string, error) {
-	r := s.c.newRequest("GET", "/v1/status/peers")
-	_, resp, err := requireOK(s.c.doRequest(r))
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-
-	var peers []string
-	if err := decodeBody(resp, &peers); err != nil {
-		return nil, err
-	}
-	return peers, nil
-}
diff --git a/vendor/github.com/hashicorp/consul/api/txn.go b/vendor/github.com/hashicorp/consul/api/txn.go
deleted file mode 100644
index 65d7a16..0000000
--- a/vendor/github.com/hashicorp/consul/api/txn.go
+++ /dev/null
@@ -1,230 +0,0 @@
-package api
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"net/http"
-)
-
-// Txn is used to manipulate the Txn API
-type Txn struct {
-	c *Client
-}
-
-// Txn is used to return a handle to the K/V apis
-func (c *Client) Txn() *Txn {
-	return &Txn{c}
-}
-
-// TxnOp is the internal format we send to Consul. Currently only K/V and
-// check operations are supported.
-type TxnOp struct {
-	KV      *KVTxnOp
-	Node    *NodeTxnOp
-	Service *ServiceTxnOp
-	Check   *CheckTxnOp
-}
-
-// TxnOps is a list of transaction operations.
-type TxnOps []*TxnOp
-
-// TxnResult is the internal format we receive from Consul.
-type TxnResult struct {
-	KV      *KVPair
-	Node    *Node
-	Service *CatalogService
-	Check   *HealthCheck
-}
-
-// TxnResults is a list of TxnResult objects.
-type TxnResults []*TxnResult
-
-// TxnError is used to return information about an operation in a transaction.
-type TxnError struct {
-	OpIndex int
-	What    string
-}
-
-// TxnErrors is a list of TxnError objects.
-type TxnErrors []*TxnError
-
-// TxnResponse is the internal format we receive from Consul.
-type TxnResponse struct {
-	Results TxnResults
-	Errors  TxnErrors
-}
-
-// KVOp constants give possible operations available in a transaction.
-type KVOp string
-
-const (
-	KVSet            KVOp = "set"
-	KVDelete         KVOp = "delete"
-	KVDeleteCAS      KVOp = "delete-cas"
-	KVDeleteTree     KVOp = "delete-tree"
-	KVCAS            KVOp = "cas"
-	KVLock           KVOp = "lock"
-	KVUnlock         KVOp = "unlock"
-	KVGet            KVOp = "get"
-	KVGetTree        KVOp = "get-tree"
-	KVCheckSession   KVOp = "check-session"
-	KVCheckIndex     KVOp = "check-index"
-	KVCheckNotExists KVOp = "check-not-exists"
-)
-
-// KVTxnOp defines a single operation inside a transaction.
-type KVTxnOp struct {
-	Verb    KVOp
-	Key     string
-	Value   []byte
-	Flags   uint64
-	Index   uint64
-	Session string
-}
-
-// KVTxnOps defines a set of operations to be performed inside a single
-// transaction.
-type KVTxnOps []*KVTxnOp
-
-// KVTxnResponse has the outcome of a transaction.
-type KVTxnResponse struct {
-	Results []*KVPair
-	Errors  TxnErrors
-}
-
-// NodeOp constants give possible operations available in a transaction.
-type NodeOp string
-
-const (
-	NodeGet       NodeOp = "get"
-	NodeSet       NodeOp = "set"
-	NodeCAS       NodeOp = "cas"
-	NodeDelete    NodeOp = "delete"
-	NodeDeleteCAS NodeOp = "delete-cas"
-)
-
-// NodeTxnOp defines a single operation inside a transaction.
-type NodeTxnOp struct {
-	Verb NodeOp
-	Node Node
-}
-
-// ServiceOp constants give possible operations available in a transaction.
-type ServiceOp string
-
-const (
-	ServiceGet       ServiceOp = "get"
-	ServiceSet       ServiceOp = "set"
-	ServiceCAS       ServiceOp = "cas"
-	ServiceDelete    ServiceOp = "delete"
-	ServiceDeleteCAS ServiceOp = "delete-cas"
-)
-
-// ServiceTxnOp defines a single operation inside a transaction.
-type ServiceTxnOp struct {
-	Verb    ServiceOp
-	Node    string
-	Service AgentService
-}
-
-// CheckOp constants give possible operations available in a transaction.
-type CheckOp string
-
-const (
-	CheckGet       CheckOp = "get"
-	CheckSet       CheckOp = "set"
-	CheckCAS       CheckOp = "cas"
-	CheckDelete    CheckOp = "delete"
-	CheckDeleteCAS CheckOp = "delete-cas"
-)
-
-// CheckTxnOp defines a single operation inside a transaction.
-type CheckTxnOp struct {
-	Verb  CheckOp
-	Check HealthCheck
-}
-
-// Txn is used to apply multiple Consul operations in a single, atomic transaction.
-//
-// Note that Go will perform the required base64 encoding on the values
-// automatically because the type is a byte slice. Transactions are defined as a
-// list of operations to perform, using the different fields in the TxnOp structure
-// to define operations. If any operation fails, none of the changes are applied
-// to the state store.
-//
-// Even though this is generally a write operation, we take a QueryOptions input
-// and return a QueryMeta output. If the transaction contains only read ops, then
-// Consul will fast-path it to a different endpoint internally which supports
-// consistency controls, but not blocking. If there are write operations then
-// the request will always be routed through raft and any consistency settings
-// will be ignored.
-//
-// Here's an example:
-//
-//	   ops := KVTxnOps{
-//		   &KVTxnOp{
-//			   Verb:    KVLock,
-//			   Key:     "test/lock",
-//			   Session: "adf4238a-882b-9ddc-4a9d-5b6758e4159e",
-//			   Value:   []byte("hello"),
-//		   },
-//		   &KVTxnOp{
-//			   Verb:    KVGet,
-//			   Key:     "another/key",
-//		   },
-//		   &CheckTxnOp{
-//			   Verb:        CheckSet,
-//			   HealthCheck: HealthCheck{
-//				   Node:    "foo",
-//				   CheckID: "redis:a",
-//				   Name:    "Redis Health Check",
-//				   Status:  "passing",
-//			   },
-//		   }
-//	   }
-//	   ok, response, _, err := kv.Txn(&ops, nil)
-//
-// If there is a problem making the transaction request then an error will be
-// returned. Otherwise, the ok value will be true if the transaction succeeded
-// or false if it was rolled back. The response is a structured return value which
-// will have the outcome of the transaction. Its Results member will have entries
-// for each operation. For KV operations, Deleted keys will have a nil entry in the
-// results, and to save space, the Value of each key in the Results will be nil
-// unless the operation is a KVGet. If the transaction was rolled back, the Errors
-// member will have entries referencing the index of the operation that failed
-// along with an error message.
-func (t *Txn) Txn(txn TxnOps, q *QueryOptions) (bool, *TxnResponse, *QueryMeta, error) {
-	return t.c.txn(txn, q)
-}
-
-func (c *Client) txn(txn TxnOps, q *QueryOptions) (bool, *TxnResponse, *QueryMeta, error) {
-	r := c.newRequest("PUT", "/v1/txn")
-	r.setQueryOptions(q)
-
-	r.obj = txn
-	rtt, resp, err := c.doRequest(r)
-	if err != nil {
-		return false, nil, nil, err
-	}
-	defer resp.Body.Close()
-
-	qm := &QueryMeta{}
-	parseQueryMeta(resp, qm)
-	qm.RequestTime = rtt
-
-	if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusConflict {
-		var txnResp TxnResponse
-		if err := decodeBody(resp, &txnResp); err != nil {
-			return false, nil, nil, err
-		}
-
-		return resp.StatusCode == http.StatusOK, &txnResp, qm, nil
-	}
-
-	var buf bytes.Buffer
-	if _, err := io.Copy(&buf, resp.Body); err != nil {
-		return false, nil, nil, fmt.Errorf("Failed to read response: %v", err)
-	}
-	return false, nil, nil, fmt.Errorf("Failed request: %s", buf.String())
-}
diff --git a/vendor/github.com/hashicorp/go-cleanhttp/LICENSE b/vendor/github.com/hashicorp/go-cleanhttp/LICENSE
deleted file mode 100644
index e87a115..0000000
--- a/vendor/github.com/hashicorp/go-cleanhttp/LICENSE
+++ /dev/null
@@ -1,363 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
-     means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the terms of
-        a Secondary License.
-
-1.6. "Executable Form"
-
-     means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
-     means a work that combines Covered Software with other material, in a
-     separate file or files, that is not Covered Software.
-
-1.8. "License"
-
-     means this document.
-
-1.9. "Licensable"
-
-     means having the right to grant, to the maximum extent possible, whether
-     at the time of the initial grant or subsequently, any and all of the
-     rights conveyed by this License.
-
-1.10. "Modifications"
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
-      means any patent claim(s), including without limitation, method,
-      process, and apparatus claims, in any patent Licensable by such
-      Contributor that would be infringed, but for the grant of the License,
-      by the making, using, selling, offering for sale, having made, import,
-      or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
-      means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, "You" includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, "control" means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or
-        as part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its
-        Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution
-     become effective for each Contribution on the date the Contributor first
-     distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under
-     this License. No additional rights or licenses will be implied from the
-     distribution or licensing of Covered Software under this License.
-     Notwithstanding Section 2.1(b) above, no patent license is granted by a
-     Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party's
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of
-        its Contributions.
-
-     This License does not grant any rights in the trademarks, service marks,
-     or logos of any Contributor (except as may be necessary to comply with
-     the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this
-     License (see Section 10.2) or under the terms of a Secondary License (if
-     permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its
-     Contributions are its original creation(s) or it has sufficient rights to
-     grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under
-     applicable copyright doctrines of fair use, fair dealing, or other
-     equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under
-     the terms of this License. You must inform recipients that the Source
-     Code Form of the Covered Software is governed by the terms of this
-     License, and how they can obtain a copy of this License. You may not
-     attempt to alter or restrict the recipients' rights in the Source Code
-     Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this
-        License, or sublicense it under different terms, provided that the
-        license for the Executable Form does not attempt to limit or alter the
-        recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for
-     the Covered Software. If the Larger Work is a combination of Covered
-     Software with a work governed by one or more Secondary Licenses, and the
-     Covered Software is not Incompatible With Secondary Licenses, this
-     License permits You to additionally distribute such Covered Software
-     under the terms of such Secondary License(s), so that the recipient of
-     the Larger Work may, at their option, further distribute the Covered
-     Software under the terms of either this License or such Secondary
-     License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices
-     (including copyright notices, patent notices, disclaimers of warranty, or
-     limitations of liability) contained within the Source Code Form of the
-     Covered Software, except that You may alter any license notices to the
-     extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on
-     behalf of any Contributor. You must make it absolutely clear that any
-     such warranty, support, indemnity, or liability obligation is offered by
-     You alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute,
-   judicial order, or regulation then You must: (a) comply with the terms of
-   this License to the maximum extent possible; and (b) describe the
-   limitations and the code they affect. Such description must be placed in a
-   text file included with all distributions of the Covered Software under
-   this License. Except to the extent prohibited by statute or regulation,
-   such description must be sufficiently detailed for a recipient of ordinary
-   skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing
-     basis, if such Contributor fails to notify You of the non-compliance by
-     some reasonable means prior to 60 days after You have come back into
-     compliance. Moreover, Your grants from a particular Contributor are
-     reinstated on an ongoing basis if such Contributor notifies You of the
-     non-compliance by some reasonable means, this is the first time You have
-     received notice of non-compliance with this License from such
-     Contributor, and You become compliant prior to 30 days after Your receipt
-     of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions,
-     counter-claims, and cross-claims) alleging that a Contributor Version
-     directly or indirectly infringes any patent, then the rights granted to
-     You by any and all Contributors for the Covered Software under Section
-     2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an "as is" basis,
-   without warranty of any kind, either expressed, implied, or statutory,
-   including, without limitation, warranties that the Covered Software is free
-   of defects, merchantable, fit for a particular purpose or non-infringing.
-   The entire risk as to the quality and performance of the Covered Software
-   is with You. Should any Covered Software prove defective in any respect,
-   You (not any Contributor) assume the cost of any necessary servicing,
-   repair, or correction. This disclaimer of warranty constitutes an essential
-   part of this License. No use of  any Covered Software is authorized under
-   this License except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from
-   such party's negligence to the extent applicable law prohibits such
-   limitation. Some jurisdictions do not allow the exclusion or limitation of
-   incidental or consequential damages, so this exclusion and limitation may
-   not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts
-   of a jurisdiction where the defendant maintains its principal place of
-   business and such litigation shall be governed by laws of that
-   jurisdiction, without reference to its conflict-of-law provisions. Nothing
-   in this Section shall prevent a party's ability to bring cross-claims or
-   counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject
-   matter hereof. If any provision of this License is held to be
-   unenforceable, such provision shall be reformed only to the extent
-   necessary to make it enforceable. Any law or regulation which provides that
-   the language of a contract shall be construed against the drafter shall not
-   be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version
-      of the License under which You originally received the Covered Software,
-      or under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a
-      modified version of this License if you rename the license and remove
-      any references to the name of the license steward (except to note that
-      such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-      Licenses If You choose to distribute Source Code Form that is
-      Incompatible With Secondary Licenses under the terms of this version of
-      the License, the notice described in Exhibit B of this License must be
-      attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
-      This Source Code Form is "Incompatible
-      With Secondary Licenses", as defined by
-      the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/hashicorp/go-cleanhttp/README.md b/vendor/github.com/hashicorp/go-cleanhttp/README.md
deleted file mode 100644
index 036e531..0000000
--- a/vendor/github.com/hashicorp/go-cleanhttp/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# cleanhttp
-
-Functions for accessing "clean" Go http.Client values
-
--------------
-
-The Go standard library contains a default `http.Client` called
-`http.DefaultClient`. It is a common idiom in Go code to start with
-`http.DefaultClient` and tweak it as necessary, and in fact, this is
-encouraged; from the `http` package documentation:
-
-> The Client's Transport typically has internal state (cached TCP connections),
-so Clients should be reused instead of created as needed. Clients are safe for
-concurrent use by multiple goroutines.
-
-Unfortunately, this is a shared value, and it is not uncommon for libraries to
-assume that they are free to modify it at will. With enough dependencies, it
-can be very easy to encounter strange problems and race conditions due to
-manipulation of this shared value across libraries and goroutines (clients are
-safe for concurrent use, but writing values to the client struct itself is not
-protected).
-
-Making things worse is the fact that a bare `http.Client` will use a default
-`http.Transport` called `http.DefaultTransport`, which is another global value
-that behaves the same way. So it is not simply enough to replace
-`http.DefaultClient` with `&http.Client{}`.
-
-This repository provides some simple functions to get a "clean" `http.Client`
--- one that uses the same default values as the Go standard library, but
-returns a client that does not share any state with other clients.
diff --git a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go
deleted file mode 100644
index 8d306bf..0000000
--- a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package cleanhttp
-
-import (
-	"net"
-	"net/http"
-	"runtime"
-	"time"
-)
-
-// DefaultTransport returns a new http.Transport with similar default values to
-// http.DefaultTransport, but with idle connections and keepalives disabled.
-func DefaultTransport() *http.Transport {
-	transport := DefaultPooledTransport()
-	transport.DisableKeepAlives = true
-	transport.MaxIdleConnsPerHost = -1
-	return transport
-}
-
-// DefaultPooledTransport returns a new http.Transport with similar default
-// values to http.DefaultTransport. Do not use this for transient transports as
-// it can leak file descriptors over time. Only use this for transports that
-// will be re-used for the same host(s).
-func DefaultPooledTransport() *http.Transport {
-	transport := &http.Transport{
-		Proxy: http.ProxyFromEnvironment,
-		DialContext: (&net.Dialer{
-			Timeout:   30 * time.Second,
-			KeepAlive: 30 * time.Second,
-			DualStack: true,
-		}).DialContext,
-		MaxIdleConns:          100,
-		IdleConnTimeout:       90 * time.Second,
-		TLSHandshakeTimeout:   10 * time.Second,
-		ExpectContinueTimeout: 1 * time.Second,
-		MaxIdleConnsPerHost:   runtime.GOMAXPROCS(0) + 1,
-	}
-	return transport
-}
-
-// DefaultClient returns a new http.Client with similar default values to
-// http.Client, but with a non-shared Transport, idle connections disabled, and
-// keepalives disabled.
-func DefaultClient() *http.Client {
-	return &http.Client{
-		Transport: DefaultTransport(),
-	}
-}
-
-// DefaultPooledClient returns a new http.Client with similar default values to
-// http.Client, but with a shared Transport. Do not use this function for
-// transient clients as it can leak file descriptors over time. Only use this
-// for clients that will be re-used for the same host(s).
-func DefaultPooledClient() *http.Client {
-	return &http.Client{
-		Transport: DefaultPooledTransport(),
-	}
-}
diff --git a/vendor/github.com/hashicorp/go-cleanhttp/doc.go b/vendor/github.com/hashicorp/go-cleanhttp/doc.go
deleted file mode 100644
index 0584109..0000000
--- a/vendor/github.com/hashicorp/go-cleanhttp/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Package cleanhttp offers convenience utilities for acquiring "clean"
-// http.Transport and http.Client structs.
-//
-// Values set on http.DefaultClient and http.DefaultTransport affect all
-// callers. This can have detrimental effects, esepcially in TLS contexts,
-// where client or root certificates set to talk to multiple endpoints can end
-// up displacing each other, leading to hard-to-debug issues. This package
-// provides non-shared http.Client and http.Transport structs to ensure that
-// the configuration will not be overwritten by other parts of the application
-// or dependencies.
-//
-// The DefaultClient and DefaultTransport functions disable idle connections
-// and keepalives. Without ensuring that idle connections are closed before
-// garbage collection, short-term clients/transports can leak file descriptors,
-// eventually leading to "too many open files" errors. If you will be
-// connecting to the same hosts repeatedly from the same client, you can use
-// DefaultPooledClient to receive a client that has connection pooling
-// semantics similar to http.DefaultClient.
-//
-package cleanhttp
diff --git a/vendor/github.com/hashicorp/go-cleanhttp/go.mod b/vendor/github.com/hashicorp/go-cleanhttp/go.mod
deleted file mode 100644
index 310f075..0000000
--- a/vendor/github.com/hashicorp/go-cleanhttp/go.mod
+++ /dev/null
@@ -1 +0,0 @@
-module github.com/hashicorp/go-cleanhttp
diff --git a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go b/vendor/github.com/hashicorp/go-cleanhttp/handlers.go
deleted file mode 100644
index 3c845dc..0000000
--- a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package cleanhttp
-
-import (
-	"net/http"
-	"strings"
-	"unicode"
-)
-
-// HandlerInput provides input options to cleanhttp's handlers
-type HandlerInput struct {
-	ErrStatus int
-}
-
-// PrintablePathCheckHandler is a middleware that ensures the request path
-// contains only printable runes.
-func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler {
-	// Nil-check on input to make it optional
-	if input == nil {
-		input = &HandlerInput{
-			ErrStatus: http.StatusBadRequest,
-		}
-	}
-
-	// Default to http.StatusBadRequest on error
-	if input.ErrStatus == 0 {
-		input.ErrStatus = http.StatusBadRequest
-	}
-
-	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		if r != nil {
-			// Check URL path for non-printable characters
-			idx := strings.IndexFunc(r.URL.Path, func(c rune) bool {
-				return !unicode.IsPrint(c)
-			})
-
-			if idx != -1 {
-				w.WriteHeader(input.ErrStatus)
-				return
-			}
-
-			if next != nil {
-				next.ServeHTTP(w, r)
-			}
-		}
-
-		return
-	})
-}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/.gitignore b/vendor/github.com/hashicorp/go-immutable-radix/.gitignore
deleted file mode 100644
index daf913b..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/.travis.yml b/vendor/github.com/hashicorp/go-immutable-radix/.travis.yml
deleted file mode 100644
index 1a0bbea..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: go
-go:
-  - tip
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md b/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md
deleted file mode 100644
index dd7c0ef..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# 1.1.0 (May 22nd, 2019)
-
-FEATURES
-
-* Add `SeekLowerBound` to allow for range scans. [[GH-24](https://github.com/hashicorp/go-immutable-radix/pull/24)]
-
-# 1.0.0 (August 30th, 2018)
-
-* go mod adopted
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/LICENSE b/vendor/github.com/hashicorp/go-immutable-radix/LICENSE
deleted file mode 100644
index e87a115..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/LICENSE
+++ /dev/null
@@ -1,363 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
-     means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the terms of
-        a Secondary License.
-
-1.6. "Executable Form"
-
-     means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
-     means a work that combines Covered Software with other material, in a
-     separate file or files, that is not Covered Software.
-
-1.8. "License"
-
-     means this document.
-
-1.9. "Licensable"
-
-     means having the right to grant, to the maximum extent possible, whether
-     at the time of the initial grant or subsequently, any and all of the
-     rights conveyed by this License.
-
-1.10. "Modifications"
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
-      means any patent claim(s), including without limitation, method,
-      process, and apparatus claims, in any patent Licensable by such
-      Contributor that would be infringed, but for the grant of the License,
-      by the making, using, selling, offering for sale, having made, import,
-      or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
-      means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, "You" includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, "control" means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or
-        as part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its
-        Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution
-     become effective for each Contribution on the date the Contributor first
-     distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under
-     this License. No additional rights or licenses will be implied from the
-     distribution or licensing of Covered Software under this License.
-     Notwithstanding Section 2.1(b) above, no patent license is granted by a
-     Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party's
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of
-        its Contributions.
-
-     This License does not grant any rights in the trademarks, service marks,
-     or logos of any Contributor (except as may be necessary to comply with
-     the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this
-     License (see Section 10.2) or under the terms of a Secondary License (if
-     permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its
-     Contributions are its original creation(s) or it has sufficient rights to
-     grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under
-     applicable copyright doctrines of fair use, fair dealing, or other
-     equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under
-     the terms of this License. You must inform recipients that the Source
-     Code Form of the Covered Software is governed by the terms of this
-     License, and how they can obtain a copy of this License. You may not
-     attempt to alter or restrict the recipients' rights in the Source Code
-     Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this
-        License, or sublicense it under different terms, provided that the
-        license for the Executable Form does not attempt to limit or alter the
-        recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for
-     the Covered Software. If the Larger Work is a combination of Covered
-     Software with a work governed by one or more Secondary Licenses, and the
-     Covered Software is not Incompatible With Secondary Licenses, this
-     License permits You to additionally distribute such Covered Software
-     under the terms of such Secondary License(s), so that the recipient of
-     the Larger Work may, at their option, further distribute the Covered
-     Software under the terms of either this License or such Secondary
-     License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices
-     (including copyright notices, patent notices, disclaimers of warranty, or
-     limitations of liability) contained within the Source Code Form of the
-     Covered Software, except that You may alter any license notices to the
-     extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on
-     behalf of any Contributor. You must make it absolutely clear that any
-     such warranty, support, indemnity, or liability obligation is offered by
-     You alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute,
-   judicial order, or regulation then You must: (a) comply with the terms of
-   this License to the maximum extent possible; and (b) describe the
-   limitations and the code they affect. Such description must be placed in a
-   text file included with all distributions of the Covered Software under
-   this License. Except to the extent prohibited by statute or regulation,
-   such description must be sufficiently detailed for a recipient of ordinary
-   skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing
-     basis, if such Contributor fails to notify You of the non-compliance by
-     some reasonable means prior to 60 days after You have come back into
-     compliance. Moreover, Your grants from a particular Contributor are
-     reinstated on an ongoing basis if such Contributor notifies You of the
-     non-compliance by some reasonable means, this is the first time You have
-     received notice of non-compliance with this License from such
-     Contributor, and You become compliant prior to 30 days after Your receipt
-     of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions,
-     counter-claims, and cross-claims) alleging that a Contributor Version
-     directly or indirectly infringes any patent, then the rights granted to
-     You by any and all Contributors for the Covered Software under Section
-     2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an "as is" basis,
-   without warranty of any kind, either expressed, implied, or statutory,
-   including, without limitation, warranties that the Covered Software is free
-   of defects, merchantable, fit for a particular purpose or non-infringing.
-   The entire risk as to the quality and performance of the Covered Software
-   is with You. Should any Covered Software prove defective in any respect,
-   You (not any Contributor) assume the cost of any necessary servicing,
-   repair, or correction. This disclaimer of warranty constitutes an essential
-   part of this License. No use of  any Covered Software is authorized under
-   this License except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from
-   such party's negligence to the extent applicable law prohibits such
-   limitation. Some jurisdictions do not allow the exclusion or limitation of
-   incidental or consequential damages, so this exclusion and limitation may
-   not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts
-   of a jurisdiction where the defendant maintains its principal place of
-   business and such litigation shall be governed by laws of that
-   jurisdiction, without reference to its conflict-of-law provisions. Nothing
-   in this Section shall prevent a party's ability to bring cross-claims or
-   counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject
-   matter hereof. If any provision of this License is held to be
-   unenforceable, such provision shall be reformed only to the extent
-   necessary to make it enforceable. Any law or regulation which provides that
-   the language of a contract shall be construed against the drafter shall not
-   be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version
-      of the License under which You originally received the Covered Software,
-      or under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a
-      modified version of this License if you rename the license and remove
-      any references to the name of the license steward (except to note that
-      such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-      Licenses If You choose to distribute Source Code Form that is
-      Incompatible With Secondary Licenses under the terms of this version of
-      the License, the notice described in Exhibit B of this License must be
-      attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
-      This Source Code Form is "Incompatible
-      With Secondary Licenses", as defined by
-      the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/README.md b/vendor/github.com/hashicorp/go-immutable-radix/README.md
deleted file mode 100644
index 4b6338b..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/README.md
+++ /dev/null
@@ -1,66 +0,0 @@
-go-immutable-radix [![Build Status](https://travis-ci.org/hashicorp/go-immutable-radix.png)](https://travis-ci.org/hashicorp/go-immutable-radix)
-=========
-
-Provides the `iradix` package that implements an immutable [radix tree](http://en.wikipedia.org/wiki/Radix_tree).
-The package only provides a single `Tree` implementation, optimized for sparse nodes.
-
-As a radix tree, it provides the following:
- * O(k) operations. In many cases, this can be faster than a hash table since
-   the hash function is an O(k) operation, and hash tables have very poor cache locality.
- * Minimum / Maximum value lookups
- * Ordered iteration
-
-A tree supports using a transaction to batch multiple updates (insert, delete)
-in a more efficient manner than performing each operation one at a time.
-
-For a mutable variant, see [go-radix](https://github.com/armon/go-radix).
-
-Documentation
-=============
-
-The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-immutable-radix).
-
-Example
-=======
-
-Below is a simple example of usage
-
-```go
-// Create a tree
-r := iradix.New()
-r, _, _ = r.Insert([]byte("foo"), 1)
-r, _, _ = r.Insert([]byte("bar"), 2)
-r, _, _ = r.Insert([]byte("foobar"), 2)
-
-// Find the longest prefix match
-m, _, _ := r.Root().LongestPrefix([]byte("foozip"))
-if string(m) != "foo" {
-    panic("should be foo")
-}
-```
-
-Here is an example of performing a range scan of the keys.
-
-```go
-// Create a tree
-r := iradix.New()
-r, _, _ = r.Insert([]byte("001"), 1)
-r, _, _ = r.Insert([]byte("002"), 2)
-r, _, _ = r.Insert([]byte("005"), 5)
-r, _, _ = r.Insert([]byte("010"), 10)
-r, _, _ = r.Insert([]byte("100"), 10)
-
-// Range scan over the keys that sort lexicographically between [003, 050)
-it := r.Root().Iterator()
-it.SeekLowerBound([]byte("003"))
-for key, _, ok := it.Next(); ok; key, _, ok = it.Next() {
-  if key >= "050" {
-      break
-  }
-  fmt.Println(key)
-}
-// Output:
-//  005
-//  010
-```
-
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/edges.go b/vendor/github.com/hashicorp/go-immutable-radix/edges.go
deleted file mode 100644
index a636747..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/edges.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package iradix
-
-import "sort"
-
-type edges []edge
-
-func (e edges) Len() int {
-	return len(e)
-}
-
-func (e edges) Less(i, j int) bool {
-	return e[i].label < e[j].label
-}
-
-func (e edges) Swap(i, j int) {
-	e[i], e[j] = e[j], e[i]
-}
-
-func (e edges) Sort() {
-	sort.Sort(e)
-}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.mod b/vendor/github.com/hashicorp/go-immutable-radix/go.mod
deleted file mode 100644
index 27e7b7c..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/go.mod
+++ /dev/null
@@ -1,6 +0,0 @@
-module github.com/hashicorp/go-immutable-radix
-
-require (
-	github.com/hashicorp/go-uuid v1.0.0
-	github.com/hashicorp/golang-lru v0.5.0
-)
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/go.sum b/vendor/github.com/hashicorp/go-immutable-radix/go.sum
deleted file mode 100644
index 7de5dfc..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/go.sum
+++ /dev/null
@@ -1,4 +0,0 @@
-github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/iradix.go b/vendor/github.com/hashicorp/go-immutable-radix/iradix.go
deleted file mode 100644
index e5e6e57..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/iradix.go
+++ /dev/null
@@ -1,662 +0,0 @@
-package iradix
-
-import (
-	"bytes"
-	"strings"
-
-	"github.com/hashicorp/golang-lru/simplelru"
-)
-
-const (
-	// defaultModifiedCache is the default size of the modified node
-	// cache used per transaction. This is used to cache the updates
-	// to the nodes near the root, while the leaves do not need to be
-	// cached. This is important for very large transactions to prevent
-	// the modified cache from growing to be enormous. This is also used
-	// to set the max size of the mutation notify maps since those should
-	// also be bounded in a similar way.
-	defaultModifiedCache = 8192
-)
-
-// Tree implements an immutable radix tree. This can be treated as a
-// Dictionary abstract data type. The main advantage over a standard
-// hash map is prefix-based lookups and ordered iteration. The immutability
-// means that it is safe to concurrently read from a Tree without any
-// coordination.
-type Tree struct {
-	root *Node
-	size int
-}
-
-// New returns an empty Tree
-func New() *Tree {
-	t := &Tree{
-		root: &Node{
-			mutateCh: make(chan struct{}),
-		},
-	}
-	return t
-}
-
-// Len is used to return the number of elements in the tree
-func (t *Tree) Len() int {
-	return t.size
-}
-
-// Txn is a transaction on the tree. This transaction is applied
-// atomically and returns a new tree when committed. A transaction
-// is not thread safe, and should only be used by a single goroutine.
-type Txn struct {
-	// root is the modified root for the transaction.
-	root *Node
-
-	// snap is a snapshot of the root node for use if we have to run the
-	// slow notify algorithm.
-	snap *Node
-
-	// size tracks the size of the tree as it is modified during the
-	// transaction.
-	size int
-
-	// writable is a cache of writable nodes that have been created during
-	// the course of the transaction. This allows us to re-use the same
-	// nodes for further writes and avoid unnecessary copies of nodes that
-	// have never been exposed outside the transaction. This will only hold
-	// up to defaultModifiedCache number of entries.
-	writable *simplelru.LRU
-
-	// trackChannels is used to hold channels that need to be notified to
-	// signal mutation of the tree. This will only hold up to
-	// defaultModifiedCache number of entries, after which we will set the
-	// trackOverflow flag, which will cause us to use a more expensive
-	// algorithm to perform the notifications. Mutation tracking is only
-	// performed if trackMutate is true.
-	trackChannels map[chan struct{}]struct{}
-	trackOverflow bool
-	trackMutate   bool
-}
-
-// Txn starts a new transaction that can be used to mutate the tree
-func (t *Tree) Txn() *Txn {
-	txn := &Txn{
-		root: t.root,
-		snap: t.root,
-		size: t.size,
-	}
-	return txn
-}
-
-// TrackMutate can be used to toggle if mutations are tracked. If this is enabled
-// then notifications will be issued for affected internal nodes and leaves when
-// the transaction is committed.
-func (t *Txn) TrackMutate(track bool) {
-	t.trackMutate = track
-}
-
-// trackChannel safely attempts to track the given mutation channel, setting the
-// overflow flag if we can no longer track any more. This limits the amount of
-// state that will accumulate during a transaction and we have a slower algorithm
-// to switch to if we overflow.
-func (t *Txn) trackChannel(ch chan struct{}) {
-	// In overflow, make sure we don't store any more objects.
-	if t.trackOverflow {
-		return
-	}
-
-	// If this would overflow the state we reject it and set the flag (since
-	// we aren't tracking everything that's required any longer).
-	if len(t.trackChannels) >= defaultModifiedCache {
-		// Mark that we are in the overflow state
-		t.trackOverflow = true
-
-		// Clear the map so that the channels can be garbage collected. It is
-		// safe to do this since we have already overflowed and will be using
-		// the slow notify algorithm.
-		t.trackChannels = nil
-		return
-	}
-
-	// Create the map on the fly when we need it.
-	if t.trackChannels == nil {
-		t.trackChannels = make(map[chan struct{}]struct{})
-	}
-
-	// Otherwise we are good to track it.
-	t.trackChannels[ch] = struct{}{}
-}
-
-// writeNode returns a node to be modified, if the current node has already been
-// modified during the course of the transaction, it is used in-place. Set
-// forLeafUpdate to true if you are getting a write node to update the leaf,
-// which will set leaf mutation tracking appropriately as well.
-func (t *Txn) writeNode(n *Node, forLeafUpdate bool) *Node {
-	// Ensure the writable set exists.
-	if t.writable == nil {
-		lru, err := simplelru.NewLRU(defaultModifiedCache, nil)
-		if err != nil {
-			panic(err)
-		}
-		t.writable = lru
-	}
-
-	// If this node has already been modified, we can continue to use it
-	// during this transaction. We know that we don't need to track it for
-	// a node update since the node is writable, but if this is for a leaf
-	// update we track it, in case the initial write to this node didn't
-	// update the leaf.
-	if _, ok := t.writable.Get(n); ok {
-		if t.trackMutate && forLeafUpdate && n.leaf != nil {
-			t.trackChannel(n.leaf.mutateCh)
-		}
-		return n
-	}
-
-	// Mark this node as being mutated.
-	if t.trackMutate {
-		t.trackChannel(n.mutateCh)
-	}
-
-	// Mark its leaf as being mutated, if appropriate.
-	if t.trackMutate && forLeafUpdate && n.leaf != nil {
-		t.trackChannel(n.leaf.mutateCh)
-	}
-
-	// Copy the existing node. If you have set forLeafUpdate it will be
-	// safe to replace this leaf with another after you get your node for
-	// writing. You MUST replace it, because the channel associated with
-	// this leaf will be closed when this transaction is committed.
-	nc := &Node{
-		mutateCh: make(chan struct{}),
-		leaf:     n.leaf,
-	}
-	if n.prefix != nil {
-		nc.prefix = make([]byte, len(n.prefix))
-		copy(nc.prefix, n.prefix)
-	}
-	if len(n.edges) != 0 {
-		nc.edges = make([]edge, len(n.edges))
-		copy(nc.edges, n.edges)
-	}
-
-	// Mark this node as writable.
-	t.writable.Add(nc, nil)
-	return nc
-}
-
-// Visit all the nodes in the tree under n, and add their mutateChannels to the transaction
-// Returns the size of the subtree visited
-func (t *Txn) trackChannelsAndCount(n *Node) int {
-	// Count only leaf nodes
-	leaves := 0
-	if n.leaf != nil {
-		leaves = 1
-	}
-	// Mark this node as being mutated.
-	if t.trackMutate {
-		t.trackChannel(n.mutateCh)
-	}
-
-	// Mark its leaf as being mutated, if appropriate.
-	if t.trackMutate && n.leaf != nil {
-		t.trackChannel(n.leaf.mutateCh)
-	}
-
-	// Recurse on the children
-	for _, e := range n.edges {
-		leaves += t.trackChannelsAndCount(e.node)
-	}
-	return leaves
-}
-
-// mergeChild is called to collapse the given node with its child. This is only
-// called when the given node is not a leaf and has a single edge.
-func (t *Txn) mergeChild(n *Node) {
-	// Mark the child node as being mutated since we are about to abandon
-	// it. We don't need to mark the leaf since we are retaining it if it
-	// is there.
-	e := n.edges[0]
-	child := e.node
-	if t.trackMutate {
-		t.trackChannel(child.mutateCh)
-	}
-
-	// Merge the nodes.
-	n.prefix = concat(n.prefix, child.prefix)
-	n.leaf = child.leaf
-	if len(child.edges) != 0 {
-		n.edges = make([]edge, len(child.edges))
-		copy(n.edges, child.edges)
-	} else {
-		n.edges = nil
-	}
-}
-
-// insert does a recursive insertion
-func (t *Txn) insert(n *Node, k, search []byte, v interface{}) (*Node, interface{}, bool) {
-	// Handle key exhaustion
-	if len(search) == 0 {
-		var oldVal interface{}
-		didUpdate := false
-		if n.isLeaf() {
-			oldVal = n.leaf.val
-			didUpdate = true
-		}
-
-		nc := t.writeNode(n, true)
-		nc.leaf = &leafNode{
-			mutateCh: make(chan struct{}),
-			key:      k,
-			val:      v,
-		}
-		return nc, oldVal, didUpdate
-	}
-
-	// Look for the edge
-	idx, child := n.getEdge(search[0])
-
-	// No edge, create one
-	if child == nil {
-		e := edge{
-			label: search[0],
-			node: &Node{
-				mutateCh: make(chan struct{}),
-				leaf: &leafNode{
-					mutateCh: make(chan struct{}),
-					key:      k,
-					val:      v,
-				},
-				prefix: search,
-			},
-		}
-		nc := t.writeNode(n, false)
-		nc.addEdge(e)
-		return nc, nil, false
-	}
-
-	// Determine longest prefix of the search key on match
-	commonPrefix := longestPrefix(search, child.prefix)
-	if commonPrefix == len(child.prefix) {
-		search = search[commonPrefix:]
-		newChild, oldVal, didUpdate := t.insert(child, k, search, v)
-		if newChild != nil {
-			nc := t.writeNode(n, false)
-			nc.edges[idx].node = newChild
-			return nc, oldVal, didUpdate
-		}
-		return nil, oldVal, didUpdate
-	}
-
-	// Split the node
-	nc := t.writeNode(n, false)
-	splitNode := &Node{
-		mutateCh: make(chan struct{}),
-		prefix:   search[:commonPrefix],
-	}
-	nc.replaceEdge(edge{
-		label: search[0],
-		node:  splitNode,
-	})
-
-	// Restore the existing child node
-	modChild := t.writeNode(child, false)
-	splitNode.addEdge(edge{
-		label: modChild.prefix[commonPrefix],
-		node:  modChild,
-	})
-	modChild.prefix = modChild.prefix[commonPrefix:]
-
-	// Create a new leaf node
-	leaf := &leafNode{
-		mutateCh: make(chan struct{}),
-		key:      k,
-		val:      v,
-	}
-
-	// If the new key is a subset, add to to this node
-	search = search[commonPrefix:]
-	if len(search) == 0 {
-		splitNode.leaf = leaf
-		return nc, nil, false
-	}
-
-	// Create a new edge for the node
-	splitNode.addEdge(edge{
-		label: search[0],
-		node: &Node{
-			mutateCh: make(chan struct{}),
-			leaf:     leaf,
-			prefix:   search,
-		},
-	})
-	return nc, nil, false
-}
-
-// delete does a recursive deletion
-func (t *Txn) delete(parent, n *Node, search []byte) (*Node, *leafNode) {
-	// Check for key exhaustion
-	if len(search) == 0 {
-		if !n.isLeaf() {
-			return nil, nil
-		}
-		// Copy the pointer in case we are in a transaction that already
-		// modified this node since the node will be reused. Any changes
-		// made to the node will not affect returning the original leaf
-		// value.
-		oldLeaf := n.leaf
-
-		// Remove the leaf node
-		nc := t.writeNode(n, true)
-		nc.leaf = nil
-
-		// Check if this node should be merged
-		if n != t.root && len(nc.edges) == 1 {
-			t.mergeChild(nc)
-		}
-		return nc, oldLeaf
-	}
-
-	// Look for an edge
-	label := search[0]
-	idx, child := n.getEdge(label)
-	if child == nil || !bytes.HasPrefix(search, child.prefix) {
-		return nil, nil
-	}
-
-	// Consume the search prefix
-	search = search[len(child.prefix):]
-	newChild, leaf := t.delete(n, child, search)
-	if newChild == nil {
-		return nil, nil
-	}
-
-	// Copy this node. WATCH OUT - it's safe to pass "false" here because we
-	// will only ADD a leaf via nc.mergeChild() if there isn't one due to
-	// the !nc.isLeaf() check in the logic just below. This is pretty subtle,
-	// so be careful if you change any of the logic here.
-	nc := t.writeNode(n, false)
-
-	// Delete the edge if the node has no edges
-	if newChild.leaf == nil && len(newChild.edges) == 0 {
-		nc.delEdge(label)
-		if n != t.root && len(nc.edges) == 1 && !nc.isLeaf() {
-			t.mergeChild(nc)
-		}
-	} else {
-		nc.edges[idx].node = newChild
-	}
-	return nc, leaf
-}
-
-// delete does a recursive deletion
-func (t *Txn) deletePrefix(parent, n *Node, search []byte) (*Node, int) {
-	// Check for key exhaustion
-	if len(search) == 0 {
-		nc := t.writeNode(n, true)
-		if n.isLeaf() {
-			nc.leaf = nil
-		}
-		nc.edges = nil
-		return nc, t.trackChannelsAndCount(n)
-	}
-
-	// Look for an edge
-	label := search[0]
-	idx, child := n.getEdge(label)
-	// We make sure that either the child node's prefix starts with the search term, or the search term starts with the child node's prefix
-	// Need to do both so that we can delete prefixes that don't correspond to any node in the tree
-	if child == nil || (!bytes.HasPrefix(child.prefix, search) && !bytes.HasPrefix(search, child.prefix)) {
-		return nil, 0
-	}
-
-	// Consume the search prefix
-	if len(child.prefix) > len(search) {
-		search = []byte("")
-	} else {
-		search = search[len(child.prefix):]
-	}
-	newChild, numDeletions := t.deletePrefix(n, child, search)
-	if newChild == nil {
-		return nil, 0
-	}
-	// Copy this node. WATCH OUT - it's safe to pass "false" here because we
-	// will only ADD a leaf via nc.mergeChild() if there isn't one due to
-	// the !nc.isLeaf() check in the logic just below. This is pretty subtle,
-	// so be careful if you change any of the logic here.
-
-	nc := t.writeNode(n, false)
-
-	// Delete the edge if the node has no edges
-	if newChild.leaf == nil && len(newChild.edges) == 0 {
-		nc.delEdge(label)
-		if n != t.root && len(nc.edges) == 1 && !nc.isLeaf() {
-			t.mergeChild(nc)
-		}
-	} else {
-		nc.edges[idx].node = newChild
-	}
-	return nc, numDeletions
-}
-
-// Insert is used to add or update a given key. The return provides
-// the previous value and a bool indicating if any was set.
-func (t *Txn) Insert(k []byte, v interface{}) (interface{}, bool) {
-	newRoot, oldVal, didUpdate := t.insert(t.root, k, k, v)
-	if newRoot != nil {
-		t.root = newRoot
-	}
-	if !didUpdate {
-		t.size++
-	}
-	return oldVal, didUpdate
-}
-
-// Delete is used to delete a given key. Returns the old value if any,
-// and a bool indicating if the key was set.
-func (t *Txn) Delete(k []byte) (interface{}, bool) {
-	newRoot, leaf := t.delete(nil, t.root, k)
-	if newRoot != nil {
-		t.root = newRoot
-	}
-	if leaf != nil {
-		t.size--
-		return leaf.val, true
-	}
-	return nil, false
-}
-
-// DeletePrefix is used to delete an entire subtree that matches the prefix
-// This will delete all nodes under that prefix
-func (t *Txn) DeletePrefix(prefix []byte) bool {
-	newRoot, numDeletions := t.deletePrefix(nil, t.root, prefix)
-	if newRoot != nil {
-		t.root = newRoot
-		t.size = t.size - numDeletions
-		return true
-	}
-	return false
-
-}
-
-// Root returns the current root of the radix tree within this
-// transaction. The root is not safe across insert and delete operations,
-// but can be used to read the current state during a transaction.
-func (t *Txn) Root() *Node {
-	return t.root
-}
-
-// Get is used to lookup a specific key, returning
-// the value and if it was found
-func (t *Txn) Get(k []byte) (interface{}, bool) {
-	return t.root.Get(k)
-}
-
-// GetWatch is used to lookup a specific key, returning
-// the watch channel, value and if it was found
-func (t *Txn) GetWatch(k []byte) (<-chan struct{}, interface{}, bool) {
-	return t.root.GetWatch(k)
-}
-
-// Commit is used to finalize the transaction and return a new tree. If mutation
-// tracking is turned on then notifications will also be issued.
-func (t *Txn) Commit() *Tree {
-	nt := t.CommitOnly()
-	if t.trackMutate {
-		t.Notify()
-	}
-	return nt
-}
-
-// CommitOnly is used to finalize the transaction and return a new tree, but
-// does not issue any notifications until Notify is called.
-func (t *Txn) CommitOnly() *Tree {
-	nt := &Tree{t.root, t.size}
-	t.writable = nil
-	return nt
-}
-
-// slowNotify does a complete comparison of the before and after trees in order
-// to trigger notifications. This doesn't require any additional state but it
-// is very expensive to compute.
-func (t *Txn) slowNotify() {
-	snapIter := t.snap.rawIterator()
-	rootIter := t.root.rawIterator()
-	for snapIter.Front() != nil || rootIter.Front() != nil {
-		// If we've exhausted the nodes in the old snapshot, we know
-		// there's nothing remaining to notify.
-		if snapIter.Front() == nil {
-			return
-		}
-		snapElem := snapIter.Front()
-
-		// If we've exhausted the nodes in the new root, we know we need
-		// to invalidate everything that remains in the old snapshot. We
-		// know from the loop condition there's something in the old
-		// snapshot.
-		if rootIter.Front() == nil {
-			close(snapElem.mutateCh)
-			if snapElem.isLeaf() {
-				close(snapElem.leaf.mutateCh)
-			}
-			snapIter.Next()
-			continue
-		}
-
-		// Do one string compare so we can check the various conditions
-		// below without repeating the compare.
-		cmp := strings.Compare(snapIter.Path(), rootIter.Path())
-
-		// If the snapshot is behind the root, then we must have deleted
-		// this node during the transaction.
-		if cmp < 0 {
-			close(snapElem.mutateCh)
-			if snapElem.isLeaf() {
-				close(snapElem.leaf.mutateCh)
-			}
-			snapIter.Next()
-			continue
-		}
-
-		// If the snapshot is ahead of the root, then we must have added
-		// this node during the transaction.
-		if cmp > 0 {
-			rootIter.Next()
-			continue
-		}
-
-		// If we have the same path, then we need to see if we mutated a
-		// node and possibly the leaf.
-		rootElem := rootIter.Front()
-		if snapElem != rootElem {
-			close(snapElem.mutateCh)
-			if snapElem.leaf != nil && (snapElem.leaf != rootElem.leaf) {
-				close(snapElem.leaf.mutateCh)
-			}
-		}
-		snapIter.Next()
-		rootIter.Next()
-	}
-}
-
-// Notify is used along with TrackMutate to trigger notifications. This must
-// only be done once a transaction is committed via CommitOnly, and it is called
-// automatically by Commit.
-func (t *Txn) Notify() {
-	if !t.trackMutate {
-		return
-	}
-
-	// If we've overflowed the tracking state we can't use it in any way and
-	// need to do a full tree compare.
-	if t.trackOverflow {
-		t.slowNotify()
-	} else {
-		for ch := range t.trackChannels {
-			close(ch)
-		}
-	}
-
-	// Clean up the tracking state so that a re-notify is safe (will trigger
-	// the else clause above which will be a no-op).
-	t.trackChannels = nil
-	t.trackOverflow = false
-}
-
-// Insert is used to add or update a given key. The return provides
-// the new tree, previous value and a bool indicating if any was set.
-func (t *Tree) Insert(k []byte, v interface{}) (*Tree, interface{}, bool) {
-	txn := t.Txn()
-	old, ok := txn.Insert(k, v)
-	return txn.Commit(), old, ok
-}
-
-// Delete is used to delete a given key. Returns the new tree,
-// old value if any, and a bool indicating if the key was set.
-func (t *Tree) Delete(k []byte) (*Tree, interface{}, bool) {
-	txn := t.Txn()
-	old, ok := txn.Delete(k)
-	return txn.Commit(), old, ok
-}
-
-// DeletePrefix is used to delete all nodes starting with a given prefix. Returns the new tree,
-// and a bool indicating if the prefix matched any nodes
-func (t *Tree) DeletePrefix(k []byte) (*Tree, bool) {
-	txn := t.Txn()
-	ok := txn.DeletePrefix(k)
-	return txn.Commit(), ok
-}
-
-// Root returns the root node of the tree which can be used for richer
-// query operations.
-func (t *Tree) Root() *Node {
-	return t.root
-}
-
-// Get is used to lookup a specific key, returning
-// the value and if it was found
-func (t *Tree) Get(k []byte) (interface{}, bool) {
-	return t.root.Get(k)
-}
-
-// longestPrefix finds the length of the shared prefix
-// of two strings
-func longestPrefix(k1, k2 []byte) int {
-	max := len(k1)
-	if l := len(k2); l < max {
-		max = l
-	}
-	var i int
-	for i = 0; i < max; i++ {
-		if k1[i] != k2[i] {
-			break
-		}
-	}
-	return i
-}
-
-// concat two byte slices, returning a third new copy
-func concat(a, b []byte) []byte {
-	c := make([]byte, len(a)+len(b))
-	copy(c, a)
-	copy(c[len(a):], b)
-	return c
-}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/iter.go b/vendor/github.com/hashicorp/go-immutable-radix/iter.go
deleted file mode 100644
index 1ecaf83..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/iter.go
+++ /dev/null
@@ -1,188 +0,0 @@
-package iradix
-
-import (
-	"bytes"
-)
-
-// Iterator is used to iterate over a set of nodes
-// in pre-order
-type Iterator struct {
-	node  *Node
-	stack []edges
-}
-
-// SeekPrefixWatch is used to seek the iterator to a given prefix
-// and returns the watch channel of the finest granularity
-func (i *Iterator) SeekPrefixWatch(prefix []byte) (watch <-chan struct{}) {
-	// Wipe the stack
-	i.stack = nil
-	n := i.node
-	watch = n.mutateCh
-	search := prefix
-	for {
-		// Check for key exhaution
-		if len(search) == 0 {
-			i.node = n
-			return
-		}
-
-		// Look for an edge
-		_, n = n.getEdge(search[0])
-		if n == nil {
-			i.node = nil
-			return
-		}
-
-		// Update to the finest granularity as the search makes progress
-		watch = n.mutateCh
-
-		// Consume the search prefix
-		if bytes.HasPrefix(search, n.prefix) {
-			search = search[len(n.prefix):]
-
-		} else if bytes.HasPrefix(n.prefix, search) {
-			i.node = n
-			return
-		} else {
-			i.node = nil
-			return
-		}
-	}
-}
-
-// SeekPrefix is used to seek the iterator to a given prefix
-func (i *Iterator) SeekPrefix(prefix []byte) {
-	i.SeekPrefixWatch(prefix)
-}
-
-func (i *Iterator) recurseMin(n *Node) *Node {
-	// Traverse to the minimum child
-	if n.leaf != nil {
-		return n
-	}
-	if len(n.edges) > 0 {
-		// Add all the other edges to the stack (the min node will be added as
-		// we recurse)
-		i.stack = append(i.stack, n.edges[1:])
-		return i.recurseMin(n.edges[0].node)
-	}
-	// Shouldn't be possible
-	return nil
-}
-
-// SeekLowerBound is used to seek the iterator to the smallest key that is
-// greater or equal to the given key. There is no watch variant as it's hard to
-// predict based on the radix structure which node(s) changes might affect the
-// result.
-func (i *Iterator) SeekLowerBound(key []byte) {
-	// Wipe the stack. Unlike Prefix iteration, we need to build the stack as we
-	// go because we need only a subset of edges of many nodes in the path to the
-	// leaf with the lower bound.
-	i.stack = []edges{}
-	n := i.node
-	search := key
-
-	found := func(n *Node) {
-		i.node = n
-		i.stack = append(i.stack, edges{edge{node: n}})
-	}
-
-	for {
-		// Compare current prefix with the search key's same-length prefix.
-		var prefixCmp int
-		if len(n.prefix) < len(search) {
-			prefixCmp = bytes.Compare(n.prefix, search[0:len(n.prefix)])
-		} else {
-			prefixCmp = bytes.Compare(n.prefix, search)
-		}
-
-		if prefixCmp > 0 {
-			// Prefix is larger, that means the lower bound is greater than the search
-			// and from now on we need to follow the minimum path to the smallest
-			// leaf under this subtree.
-			n = i.recurseMin(n)
-			if n != nil {
-				found(n)
-			}
-			return
-		}
-
-		if prefixCmp < 0 {
-			// Prefix is smaller than search prefix, that means there is no lower
-			// bound
-			i.node = nil
-			return
-		}
-
-		// Prefix is equal, we are still heading for an exact match. If this is a
-		// leaf we're done.
-		if n.leaf != nil {
-			if bytes.Compare(n.leaf.key, key) < 0 {
-				i.node = nil
-				return
-			}
-			found(n)
-			return
-		}
-
-		// Consume the search prefix
-		if len(n.prefix) > len(search) {
-			search = []byte{}
-		} else {
-			search = search[len(n.prefix):]
-		}
-
-		// Otherwise, take the lower bound next edge.
-		idx, lbNode := n.getLowerBoundEdge(search[0])
-		if lbNode == nil {
-			i.node = nil
-			return
-		}
-
-		// Create stack edges for the all strictly higher edges in this node.
-		if idx+1 < len(n.edges) {
-			i.stack = append(i.stack, n.edges[idx+1:])
-		}
-
-		i.node = lbNode
-		// Recurse
-		n = lbNode
-	}
-}
-
-// Next returns the next node in order
-func (i *Iterator) Next() ([]byte, interface{}, bool) {
-	// Initialize our stack if needed
-	if i.stack == nil && i.node != nil {
-		i.stack = []edges{
-			edges{
-				edge{node: i.node},
-			},
-		}
-	}
-
-	for len(i.stack) > 0 {
-		// Inspect the last element of the stack
-		n := len(i.stack)
-		last := i.stack[n-1]
-		elem := last[0].node
-
-		// Update the stack
-		if len(last) > 1 {
-			i.stack[n-1] = last[1:]
-		} else {
-			i.stack = i.stack[:n-1]
-		}
-
-		// Push the edges onto the frontier
-		if len(elem.edges) > 0 {
-			i.stack = append(i.stack, elem.edges)
-		}
-
-		// Return the leaf values if any
-		if elem.leaf != nil {
-			return elem.leaf.key, elem.leaf.val, true
-		}
-	}
-	return nil, nil, false
-}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/node.go b/vendor/github.com/hashicorp/go-immutable-radix/node.go
deleted file mode 100644
index 3ab904e..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/node.go
+++ /dev/null
@@ -1,304 +0,0 @@
-package iradix
-
-import (
-	"bytes"
-	"sort"
-)
-
-// WalkFn is used when walking the tree. Takes a
-// key and value, returning if iteration should
-// be terminated.
-type WalkFn func(k []byte, v interface{}) bool
-
-// leafNode is used to represent a value
-type leafNode struct {
-	mutateCh chan struct{}
-	key      []byte
-	val      interface{}
-}
-
-// edge is used to represent an edge node
-type edge struct {
-	label byte
-	node  *Node
-}
-
-// Node is an immutable node in the radix tree
-type Node struct {
-	// mutateCh is closed if this node is modified
-	mutateCh chan struct{}
-
-	// leaf is used to store possible leaf
-	leaf *leafNode
-
-	// prefix is the common prefix we ignore
-	prefix []byte
-
-	// Edges should be stored in-order for iteration.
-	// We avoid a fully materialized slice to save memory,
-	// since in most cases we expect to be sparse
-	edges edges
-}
-
-func (n *Node) isLeaf() bool {
-	return n.leaf != nil
-}
-
-func (n *Node) addEdge(e edge) {
-	num := len(n.edges)
-	idx := sort.Search(num, func(i int) bool {
-		return n.edges[i].label >= e.label
-	})
-	n.edges = append(n.edges, e)
-	if idx != num {
-		copy(n.edges[idx+1:], n.edges[idx:num])
-		n.edges[idx] = e
-	}
-}
-
-func (n *Node) replaceEdge(e edge) {
-	num := len(n.edges)
-	idx := sort.Search(num, func(i int) bool {
-		return n.edges[i].label >= e.label
-	})
-	if idx < num && n.edges[idx].label == e.label {
-		n.edges[idx].node = e.node
-		return
-	}
-	panic("replacing missing edge")
-}
-
-func (n *Node) getEdge(label byte) (int, *Node) {
-	num := len(n.edges)
-	idx := sort.Search(num, func(i int) bool {
-		return n.edges[i].label >= label
-	})
-	if idx < num && n.edges[idx].label == label {
-		return idx, n.edges[idx].node
-	}
-	return -1, nil
-}
-
-func (n *Node) getLowerBoundEdge(label byte) (int, *Node) {
-	num := len(n.edges)
-	idx := sort.Search(num, func(i int) bool {
-		return n.edges[i].label >= label
-	})
-	// we want lower bound behavior so return even if it's not an exact match
-	if idx < num {
-		return idx, n.edges[idx].node
-	}
-	return -1, nil
-}
-
-func (n *Node) delEdge(label byte) {
-	num := len(n.edges)
-	idx := sort.Search(num, func(i int) bool {
-		return n.edges[i].label >= label
-	})
-	if idx < num && n.edges[idx].label == label {
-		copy(n.edges[idx:], n.edges[idx+1:])
-		n.edges[len(n.edges)-1] = edge{}
-		n.edges = n.edges[:len(n.edges)-1]
-	}
-}
-
-func (n *Node) GetWatch(k []byte) (<-chan struct{}, interface{}, bool) {
-	search := k
-	watch := n.mutateCh
-	for {
-		// Check for key exhaustion
-		if len(search) == 0 {
-			if n.isLeaf() {
-				return n.leaf.mutateCh, n.leaf.val, true
-			}
-			break
-		}
-
-		// Look for an edge
-		_, n = n.getEdge(search[0])
-		if n == nil {
-			break
-		}
-
-		// Update to the finest granularity as the search makes progress
-		watch = n.mutateCh
-
-		// Consume the search prefix
-		if bytes.HasPrefix(search, n.prefix) {
-			search = search[len(n.prefix):]
-		} else {
-			break
-		}
-	}
-	return watch, nil, false
-}
-
-func (n *Node) Get(k []byte) (interface{}, bool) {
-	_, val, ok := n.GetWatch(k)
-	return val, ok
-}
-
-// LongestPrefix is like Get, but instead of an
-// exact match, it will return the longest prefix match.
-func (n *Node) LongestPrefix(k []byte) ([]byte, interface{}, bool) {
-	var last *leafNode
-	search := k
-	for {
-		// Look for a leaf node
-		if n.isLeaf() {
-			last = n.leaf
-		}
-
-		// Check for key exhaution
-		if len(search) == 0 {
-			break
-		}
-
-		// Look for an edge
-		_, n = n.getEdge(search[0])
-		if n == nil {
-			break
-		}
-
-		// Consume the search prefix
-		if bytes.HasPrefix(search, n.prefix) {
-			search = search[len(n.prefix):]
-		} else {
-			break
-		}
-	}
-	if last != nil {
-		return last.key, last.val, true
-	}
-	return nil, nil, false
-}
-
-// Minimum is used to return the minimum value in the tree
-func (n *Node) Minimum() ([]byte, interface{}, bool) {
-	for {
-		if n.isLeaf() {
-			return n.leaf.key, n.leaf.val, true
-		}
-		if len(n.edges) > 0 {
-			n = n.edges[0].node
-		} else {
-			break
-		}
-	}
-	return nil, nil, false
-}
-
-// Maximum is used to return the maximum value in the tree
-func (n *Node) Maximum() ([]byte, interface{}, bool) {
-	for {
-		if num := len(n.edges); num > 0 {
-			n = n.edges[num-1].node
-			continue
-		}
-		if n.isLeaf() {
-			return n.leaf.key, n.leaf.val, true
-		} else {
-			break
-		}
-	}
-	return nil, nil, false
-}
-
-// Iterator is used to return an iterator at
-// the given node to walk the tree
-func (n *Node) Iterator() *Iterator {
-	return &Iterator{node: n}
-}
-
-// rawIterator is used to return a raw iterator at the given node to walk the
-// tree.
-func (n *Node) rawIterator() *rawIterator {
-	iter := &rawIterator{node: n}
-	iter.Next()
-	return iter
-}
-
-// Walk is used to walk the tree
-func (n *Node) Walk(fn WalkFn) {
-	recursiveWalk(n, fn)
-}
-
-// WalkPrefix is used to walk the tree under a prefix
-func (n *Node) WalkPrefix(prefix []byte, fn WalkFn) {
-	search := prefix
-	for {
-		// Check for key exhaution
-		if len(search) == 0 {
-			recursiveWalk(n, fn)
-			return
-		}
-
-		// Look for an edge
-		_, n = n.getEdge(search[0])
-		if n == nil {
-			break
-		}
-
-		// Consume the search prefix
-		if bytes.HasPrefix(search, n.prefix) {
-			search = search[len(n.prefix):]
-
-		} else if bytes.HasPrefix(n.prefix, search) {
-			// Child may be under our search prefix
-			recursiveWalk(n, fn)
-			return
-		} else {
-			break
-		}
-	}
-}
-
-// WalkPath is used to walk the tree, but only visiting nodes
-// from the root down to a given leaf. Where WalkPrefix walks
-// all the entries *under* the given prefix, this walks the
-// entries *above* the given prefix.
-func (n *Node) WalkPath(path []byte, fn WalkFn) {
-	search := path
-	for {
-		// Visit the leaf values if any
-		if n.leaf != nil && fn(n.leaf.key, n.leaf.val) {
-			return
-		}
-
-		// Check for key exhaution
-		if len(search) == 0 {
-			return
-		}
-
-		// Look for an edge
-		_, n = n.getEdge(search[0])
-		if n == nil {
-			return
-		}
-
-		// Consume the search prefix
-		if bytes.HasPrefix(search, n.prefix) {
-			search = search[len(n.prefix):]
-		} else {
-			break
-		}
-	}
-}
-
-// recursiveWalk is used to do a pre-order walk of a node
-// recursively. Returns true if the walk should be aborted
-func recursiveWalk(n *Node, fn WalkFn) bool {
-	// Visit the leaf values if any
-	if n.leaf != nil && fn(n.leaf.key, n.leaf.val) {
-		return true
-	}
-
-	// Recurse on the children
-	for _, e := range n.edges {
-		if recursiveWalk(e.node, fn) {
-			return true
-		}
-	}
-	return false
-}
diff --git a/vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go b/vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go
deleted file mode 100644
index 04814c1..0000000
--- a/vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package iradix
-
-// rawIterator visits each of the nodes in the tree, even the ones that are not
-// leaves. It keeps track of the effective path (what a leaf at a given node
-// would be called), which is useful for comparing trees.
-type rawIterator struct {
-	// node is the starting node in the tree for the iterator.
-	node *Node
-
-	// stack keeps track of edges in the frontier.
-	stack []rawStackEntry
-
-	// pos is the current position of the iterator.
-	pos *Node
-
-	// path is the effective path of the current iterator position,
-	// regardless of whether the current node is a leaf.
-	path string
-}
-
-// rawStackEntry is used to keep track of the cumulative common path as well as
-// its associated edges in the frontier.
-type rawStackEntry struct {
-	path  string
-	edges edges
-}
-
-// Front returns the current node that has been iterated to.
-func (i *rawIterator) Front() *Node {
-	return i.pos
-}
-
-// Path returns the effective path of the current node, even if it's not actually
-// a leaf.
-func (i *rawIterator) Path() string {
-	return i.path
-}
-
-// Next advances the iterator to the next node.
-func (i *rawIterator) Next() {
-	// Initialize our stack if needed.
-	if i.stack == nil && i.node != nil {
-		i.stack = []rawStackEntry{
-			rawStackEntry{
-				edges: edges{
-					edge{node: i.node},
-				},
-			},
-		}
-	}
-
-	for len(i.stack) > 0 {
-		// Inspect the last element of the stack.
-		n := len(i.stack)
-		last := i.stack[n-1]
-		elem := last.edges[0].node
-
-		// Update the stack.
-		if len(last.edges) > 1 {
-			i.stack[n-1].edges = last.edges[1:]
-		} else {
-			i.stack = i.stack[:n-1]
-		}
-
-		// Push the edges onto the frontier.
-		if len(elem.edges) > 0 {
-			path := last.path + string(elem.prefix)
-			i.stack = append(i.stack, rawStackEntry{path, elem.edges})
-		}
-
-		i.pos = elem
-		i.path = last.path + string(elem.prefix)
-		return
-	}
-
-	i.pos = nil
-	i.path = ""
-}
diff --git a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml b/vendor/github.com/hashicorp/go-rootcerts/.travis.yml
deleted file mode 100644
index 80e1de4..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-sudo: false
-
-language: go
-
-go:
-  - 1.6
-
-branches:
-  only:
-    - master
-
-script: make test
diff --git a/vendor/github.com/hashicorp/go-rootcerts/LICENSE b/vendor/github.com/hashicorp/go-rootcerts/LICENSE
deleted file mode 100644
index e87a115..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/LICENSE
+++ /dev/null
@@ -1,363 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
-     means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the terms of
-        a Secondary License.
-
-1.6. "Executable Form"
-
-     means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
-     means a work that combines Covered Software with other material, in a
-     separate file or files, that is not Covered Software.
-
-1.8. "License"
-
-     means this document.
-
-1.9. "Licensable"
-
-     means having the right to grant, to the maximum extent possible, whether
-     at the time of the initial grant or subsequently, any and all of the
-     rights conveyed by this License.
-
-1.10. "Modifications"
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
-      means any patent claim(s), including without limitation, method,
-      process, and apparatus claims, in any patent Licensable by such
-      Contributor that would be infringed, but for the grant of the License,
-      by the making, using, selling, offering for sale, having made, import,
-      or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
-      means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, "You" includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, "control" means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or
-        as part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its
-        Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution
-     become effective for each Contribution on the date the Contributor first
-     distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under
-     this License. No additional rights or licenses will be implied from the
-     distribution or licensing of Covered Software under this License.
-     Notwithstanding Section 2.1(b) above, no patent license is granted by a
-     Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party's
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of
-        its Contributions.
-
-     This License does not grant any rights in the trademarks, service marks,
-     or logos of any Contributor (except as may be necessary to comply with
-     the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this
-     License (see Section 10.2) or under the terms of a Secondary License (if
-     permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its
-     Contributions are its original creation(s) or it has sufficient rights to
-     grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under
-     applicable copyright doctrines of fair use, fair dealing, or other
-     equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under
-     the terms of this License. You must inform recipients that the Source
-     Code Form of the Covered Software is governed by the terms of this
-     License, and how they can obtain a copy of this License. You may not
-     attempt to alter or restrict the recipients' rights in the Source Code
-     Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this
-        License, or sublicense it under different terms, provided that the
-        license for the Executable Form does not attempt to limit or alter the
-        recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for
-     the Covered Software. If the Larger Work is a combination of Covered
-     Software with a work governed by one or more Secondary Licenses, and the
-     Covered Software is not Incompatible With Secondary Licenses, this
-     License permits You to additionally distribute such Covered Software
-     under the terms of such Secondary License(s), so that the recipient of
-     the Larger Work may, at their option, further distribute the Covered
-     Software under the terms of either this License or such Secondary
-     License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices
-     (including copyright notices, patent notices, disclaimers of warranty, or
-     limitations of liability) contained within the Source Code Form of the
-     Covered Software, except that You may alter any license notices to the
-     extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on
-     behalf of any Contributor. You must make it absolutely clear that any
-     such warranty, support, indemnity, or liability obligation is offered by
-     You alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute,
-   judicial order, or regulation then You must: (a) comply with the terms of
-   this License to the maximum extent possible; and (b) describe the
-   limitations and the code they affect. Such description must be placed in a
-   text file included with all distributions of the Covered Software under
-   this License. Except to the extent prohibited by statute or regulation,
-   such description must be sufficiently detailed for a recipient of ordinary
-   skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing
-     basis, if such Contributor fails to notify You of the non-compliance by
-     some reasonable means prior to 60 days after You have come back into
-     compliance. Moreover, Your grants from a particular Contributor are
-     reinstated on an ongoing basis if such Contributor notifies You of the
-     non-compliance by some reasonable means, this is the first time You have
-     received notice of non-compliance with this License from such
-     Contributor, and You become compliant prior to 30 days after Your receipt
-     of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions,
-     counter-claims, and cross-claims) alleging that a Contributor Version
-     directly or indirectly infringes any patent, then the rights granted to
-     You by any and all Contributors for the Covered Software under Section
-     2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an "as is" basis,
-   without warranty of any kind, either expressed, implied, or statutory,
-   including, without limitation, warranties that the Covered Software is free
-   of defects, merchantable, fit for a particular purpose or non-infringing.
-   The entire risk as to the quality and performance of the Covered Software
-   is with You. Should any Covered Software prove defective in any respect,
-   You (not any Contributor) assume the cost of any necessary servicing,
-   repair, or correction. This disclaimer of warranty constitutes an essential
-   part of this License. No use of  any Covered Software is authorized under
-   this License except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from
-   such party's negligence to the extent applicable law prohibits such
-   limitation. Some jurisdictions do not allow the exclusion or limitation of
-   incidental or consequential damages, so this exclusion and limitation may
-   not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts
-   of a jurisdiction where the defendant maintains its principal place of
-   business and such litigation shall be governed by laws of that
-   jurisdiction, without reference to its conflict-of-law provisions. Nothing
-   in this Section shall prevent a party's ability to bring cross-claims or
-   counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject
-   matter hereof. If any provision of this License is held to be
-   unenforceable, such provision shall be reformed only to the extent
-   necessary to make it enforceable. Any law or regulation which provides that
-   the language of a contract shall be construed against the drafter shall not
-   be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version
-      of the License under which You originally received the Covered Software,
-      or under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a
-      modified version of this License if you rename the license and remove
-      any references to the name of the license steward (except to note that
-      such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-      Licenses If You choose to distribute Source Code Form that is
-      Incompatible With Secondary Licenses under the terms of this version of
-      the License, the notice described in Exhibit B of this License must be
-      attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
-      This Source Code Form is "Incompatible
-      With Secondary Licenses", as defined by
-      the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/hashicorp/go-rootcerts/Makefile b/vendor/github.com/hashicorp/go-rootcerts/Makefile
deleted file mode 100644
index c3989e7..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-TEST?=./...
-
-test:
-	go test $(TEST) $(TESTARGS) -timeout=3s -parallel=4
-	go vet $(TEST)
-	go test $(TEST) -race
-
-.PHONY: test
diff --git a/vendor/github.com/hashicorp/go-rootcerts/README.md b/vendor/github.com/hashicorp/go-rootcerts/README.md
deleted file mode 100644
index f5abffc..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# rootcerts
-
-Functions for loading root certificates for TLS connections.
-
------
-
-Go's standard library `crypto/tls` provides a common mechanism for configuring
-TLS connections in `tls.Config`. The `RootCAs` field on this struct is a pool
-of certificates for the client to use as a trust store when verifying server
-certificates.
-
-This library contains utility functions for loading certificates destined for
-that field, as well as one other important thing:
-
-When the `RootCAs` field is `nil`, the standard library attempts to load the
-host's root CA set.  This behavior is OS-specific, and the Darwin
-implementation contains [a bug that prevents trusted certificates from the
-System and Login keychains from being loaded][1]. This library contains
-Darwin-specific behavior that works around that bug.
-
-[1]: https://github.com/golang/go/issues/14514
-
-## Example Usage
-
-Here's a snippet demonstrating how this library is meant to be used:
-
-```go
-func httpClient() (*http.Client, error)
-	tlsConfig := &tls.Config{}
-	err := rootcerts.ConfigureTLS(tlsConfig, &rootcerts.Config{
-		CAFile: os.Getenv("MYAPP_CAFILE"),
-		CAPath: os.Getenv("MYAPP_CAPATH"),
-	})
-	if err != nil {
-		return nil, err
-	}
-	c := cleanhttp.DefaultClient()
-	t := cleanhttp.DefaultTransport()
-	t.TLSClientConfig = tlsConfig
-	c.Transport = t
-	return c, nil
-}
-```
diff --git a/vendor/github.com/hashicorp/go-rootcerts/doc.go b/vendor/github.com/hashicorp/go-rootcerts/doc.go
deleted file mode 100644
index b55cc62..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/doc.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Package rootcerts contains functions to aid in loading CA certificates for
-// TLS connections.
-//
-// In addition, its default behavior on Darwin works around an open issue [1]
-// in Go's crypto/x509 that prevents certicates from being loaded from the
-// System or Login keychains.
-//
-// [1] https://github.com/golang/go/issues/14514
-package rootcerts
diff --git a/vendor/github.com/hashicorp/go-rootcerts/go.mod b/vendor/github.com/hashicorp/go-rootcerts/go.mod
deleted file mode 100644
index e2dd024..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/go.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module github.com/hashicorp/go-rootcerts
-
-go 1.12
-
-require github.com/mitchellh/go-homedir v1.1.0
diff --git a/vendor/github.com/hashicorp/go-rootcerts/go.sum b/vendor/github.com/hashicorp/go-rootcerts/go.sum
deleted file mode 100644
index ae38d14..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/go.sum
+++ /dev/null
@@ -1,2 +0,0 @@
-github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go
deleted file mode 100644
index aeb30ec..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package rootcerts
-
-import (
-	"crypto/tls"
-	"crypto/x509"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-)
-
-// Config determines where LoadCACerts will load certificates from. When both
-// CAFile and CAPath are blank, this library's functions will either load
-// system roots explicitly and return them, or set the CertPool to nil to allow
-// Go's standard library to load system certs.
-type Config struct {
-	// CAFile is a path to a PEM-encoded certificate file or bundle. Takes
-	// precedence over CAPath.
-	CAFile string
-
-	// CAPath is a path to a directory populated with PEM-encoded certificates.
-	CAPath string
-}
-
-// ConfigureTLS sets up the RootCAs on the provided tls.Config based on the
-// Config specified.
-func ConfigureTLS(t *tls.Config, c *Config) error {
-	if t == nil {
-		return nil
-	}
-	pool, err := LoadCACerts(c)
-	if err != nil {
-		return err
-	}
-	t.RootCAs = pool
-	return nil
-}
-
-// LoadCACerts loads a CertPool based on the Config specified.
-func LoadCACerts(c *Config) (*x509.CertPool, error) {
-	if c == nil {
-		c = &Config{}
-	}
-	if c.CAFile != "" {
-		return LoadCAFile(c.CAFile)
-	}
-	if c.CAPath != "" {
-		return LoadCAPath(c.CAPath)
-	}
-
-	return LoadSystemCAs()
-}
-
-// LoadCAFile loads a single PEM-encoded file from the path specified.
-func LoadCAFile(caFile string) (*x509.CertPool, error) {
-	pool := x509.NewCertPool()
-
-	pem, err := ioutil.ReadFile(caFile)
-	if err != nil {
-		return nil, fmt.Errorf("Error loading CA File: %s", err)
-	}
-
-	ok := pool.AppendCertsFromPEM(pem)
-	if !ok {
-		return nil, fmt.Errorf("Error loading CA File: Couldn't parse PEM in: %s", caFile)
-	}
-
-	return pool, nil
-}
-
-// LoadCAPath walks the provided path and loads all certificates encounted into
-// a pool.
-func LoadCAPath(caPath string) (*x509.CertPool, error) {
-	pool := x509.NewCertPool()
-	walkFn := func(path string, info os.FileInfo, err error) error {
-		if err != nil {
-			return err
-		}
-
-		if info.IsDir() {
-			return nil
-		}
-
-		pem, err := ioutil.ReadFile(path)
-		if err != nil {
-			return fmt.Errorf("Error loading file from CAPath: %s", err)
-		}
-
-		ok := pool.AppendCertsFromPEM(pem)
-		if !ok {
-			return fmt.Errorf("Error loading CA Path: Couldn't parse PEM in: %s", path)
-		}
-
-		return nil
-	}
-
-	err := filepath.Walk(caPath, walkFn)
-	if err != nil {
-		return nil, err
-	}
-
-	return pool, nil
-}
diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go
deleted file mode 100644
index 66b1472..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build !darwin
-
-package rootcerts
-
-import "crypto/x509"
-
-// LoadSystemCAs does nothing on non-Darwin systems. We return nil so that
-// default behavior of standard TLS config libraries is triggered, which is to
-// load system certs.
-func LoadSystemCAs() (*x509.CertPool, error) {
-	return nil, nil
-}
diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go
deleted file mode 100644
index a9a0406..0000000
--- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package rootcerts
-
-import (
-	"crypto/x509"
-	"os/exec"
-	"path"
-
-	"github.com/mitchellh/go-homedir"
-)
-
-// LoadSystemCAs has special behavior on Darwin systems to work around
-func LoadSystemCAs() (*x509.CertPool, error) {
-	pool := x509.NewCertPool()
-
-	for _, keychain := range certKeychains() {
-		err := addCertsFromKeychain(pool, keychain)
-		if err != nil {
-			return nil, err
-		}
-	}
-
-	return pool, nil
-}
-
-func addCertsFromKeychain(pool *x509.CertPool, keychain string) error {
-	cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", keychain)
-	data, err := cmd.Output()
-	if err != nil {
-		return err
-	}
-
-	pool.AppendCertsFromPEM(data)
-
-	return nil
-}
-
-func certKeychains() []string {
-	keychains := []string{
-		"/System/Library/Keychains/SystemRootCertificates.keychain",
-		"/Library/Keychains/System.keychain",
-	}
-	home, err := homedir.Dir()
-	if err == nil {
-		loginKeychain := path.Join(home, "Library", "Keychains", "login.keychain")
-		keychains = append(keychains, loginKeychain)
-	}
-	return keychains
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE
deleted file mode 100644
index be2cc4d..0000000
--- a/vendor/github.com/hashicorp/golang-lru/LICENSE
+++ /dev/null
@@ -1,362 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. "Contributor"
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-
-     means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the terms of
-        a Secondary License.
-
-1.6. "Executable Form"
-
-     means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-
-     means a work that combines Covered Software with other material, in a
-     separate file or files, that is not Covered Software.
-
-1.8. "License"
-
-     means this document.
-
-1.9. "Licensable"
-
-     means having the right to grant, to the maximum extent possible, whether
-     at the time of the initial grant or subsequently, any and all of the
-     rights conveyed by this License.
-
-1.10. "Modifications"
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. "Patent Claims" of a Contributor
-
-      means any patent claim(s), including without limitation, method,
-      process, and apparatus claims, in any patent Licensable by such
-      Contributor that would be infringed, but for the grant of the License,
-      by the making, using, selling, offering for sale, having made, import,
-      or transfer of either its Contributions or its Contributor Version.
-
-1.12. "Secondary License"
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. "Source Code Form"
-
-      means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, "You" includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, "control" means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or
-        as part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its
-        Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution
-     become effective for each Contribution on the date the Contributor first
-     distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under
-     this License. No additional rights or licenses will be implied from the
-     distribution or licensing of Covered Software under this License.
-     Notwithstanding Section 2.1(b) above, no patent license is granted by a
-     Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party's
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of
-        its Contributions.
-
-     This License does not grant any rights in the trademarks, service marks,
-     or logos of any Contributor (except as may be necessary to comply with
-     the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this
-     License (see Section 10.2) or under the terms of a Secondary License (if
-     permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its
-     Contributions are its original creation(s) or it has sufficient rights to
-     grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under
-     applicable copyright doctrines of fair use, fair dealing, or other
-     equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under
-     the terms of this License. You must inform recipients that the Source
-     Code Form of the Covered Software is governed by the terms of this
-     License, and how they can obtain a copy of this License. You may not
-     attempt to alter or restrict the recipients' rights in the Source Code
-     Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this
-        License, or sublicense it under different terms, provided that the
-        license for the Executable Form does not attempt to limit or alter the
-        recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for
-     the Covered Software. If the Larger Work is a combination of Covered
-     Software with a work governed by one or more Secondary Licenses, and the
-     Covered Software is not Incompatible With Secondary Licenses, this
-     License permits You to additionally distribute such Covered Software
-     under the terms of such Secondary License(s), so that the recipient of
-     the Larger Work may, at their option, further distribute the Covered
-     Software under the terms of either this License or such Secondary
-     License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices
-     (including copyright notices, patent notices, disclaimers of warranty, or
-     limitations of liability) contained within the Source Code Form of the
-     Covered Software, except that You may alter any license notices to the
-     extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on
-     behalf of any Contributor. You must make it absolutely clear that any
-     such warranty, support, indemnity, or liability obligation is offered by
-     You alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute,
-   judicial order, or regulation then You must: (a) comply with the terms of
-   this License to the maximum extent possible; and (b) describe the
-   limitations and the code they affect. Such description must be placed in a
-   text file included with all distributions of the Covered Software under
-   this License. Except to the extent prohibited by statute or regulation,
-   such description must be sufficiently detailed for a recipient of ordinary
-   skill to be able to understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing
-     basis, if such Contributor fails to notify You of the non-compliance by
-     some reasonable means prior to 60 days after You have come back into
-     compliance. Moreover, Your grants from a particular Contributor are
-     reinstated on an ongoing basis if such Contributor notifies You of the
-     non-compliance by some reasonable means, this is the first time You have
-     received notice of non-compliance with this License from such
-     Contributor, and You become compliant prior to 30 days after Your receipt
-     of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions,
-     counter-claims, and cross-claims) alleging that a Contributor Version
-     directly or indirectly infringes any patent, then the rights granted to
-     You by any and all Contributors for the Covered Software under Section
-     2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an "as is" basis,
-   without warranty of any kind, either expressed, implied, or statutory,
-   including, without limitation, warranties that the Covered Software is free
-   of defects, merchantable, fit for a particular purpose or non-infringing.
-   The entire risk as to the quality and performance of the Covered Software
-   is with You. Should any Covered Software prove defective in any respect,
-   You (not any Contributor) assume the cost of any necessary servicing,
-   repair, or correction. This disclaimer of warranty constitutes an essential
-   part of this License. No use of  any Covered Software is authorized under
-   this License except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from
-   such party's negligence to the extent applicable law prohibits such
-   limitation. Some jurisdictions do not allow the exclusion or limitation of
-   incidental or consequential damages, so this exclusion and limitation may
-   not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts
-   of a jurisdiction where the defendant maintains its principal place of
-   business and such litigation shall be governed by laws of that
-   jurisdiction, without reference to its conflict-of-law provisions. Nothing
-   in this Section shall prevent a party's ability to bring cross-claims or
-   counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject
-   matter hereof. If any provision of this License is held to be
-   unenforceable, such provision shall be reformed only to the extent
-   necessary to make it enforceable. Any law or regulation which provides that
-   the language of a contract shall be construed against the drafter shall not
-   be used to construe this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version
-      of the License under which You originally received the Covered Software,
-      or under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a
-      modified version of this License if you rename the license and remove
-      any references to the name of the license steward (except to note that
-      such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-      Licenses If You choose to distribute Source Code Form that is
-      Incompatible With Secondary Licenses under the terms of this version of
-      the License, the notice described in Exhibit B of this License must be
-      attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file,
-then You may include the notice in a location (such as a LICENSE file in a
-relevant directory) where a recipient would be likely to look for such a
-notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
-
-      This Source Code Form is "Incompatible
-      With Secondary Licenses", as defined by
-      the Mozilla Public License, v. 2.0.
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
deleted file mode 100644
index a86c853..0000000
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package simplelru
-
-import (
-	"container/list"
-	"errors"
-)
-
-// EvictCallback is used to get a callback when a cache entry is evicted
-type EvictCallback func(key interface{}, value interface{})
-
-// LRU implements a non-thread safe fixed size LRU cache
-type LRU struct {
-	size      int
-	evictList *list.List
-	items     map[interface{}]*list.Element
-	onEvict   EvictCallback
-}
-
-// entry is used to hold a value in the evictList
-type entry struct {
-	key   interface{}
-	value interface{}
-}
-
-// NewLRU constructs an LRU of the given size
-func NewLRU(size int, onEvict EvictCallback) (*LRU, error) {
-	if size <= 0 {
-		return nil, errors.New("Must provide a positive size")
-	}
-	c := &LRU{
-		size:      size,
-		evictList: list.New(),
-		items:     make(map[interface{}]*list.Element),
-		onEvict:   onEvict,
-	}
-	return c, nil
-}
-
-// Purge is used to completely clear the cache.
-func (c *LRU) Purge() {
-	for k, v := range c.items {
-		if c.onEvict != nil {
-			c.onEvict(k, v.Value.(*entry).value)
-		}
-		delete(c.items, k)
-	}
-	c.evictList.Init()
-}
-
-// Add adds a value to the cache.  Returns true if an eviction occurred.
-func (c *LRU) Add(key, value interface{}) (evicted bool) {
-	// Check for existing item
-	if ent, ok := c.items[key]; ok {
-		c.evictList.MoveToFront(ent)
-		ent.Value.(*entry).value = value
-		return false
-	}
-
-	// Add new item
-	ent := &entry{key, value}
-	entry := c.evictList.PushFront(ent)
-	c.items[key] = entry
-
-	evict := c.evictList.Len() > c.size
-	// Verify size not exceeded
-	if evict {
-		c.removeOldest()
-	}
-	return evict
-}
-
-// Get looks up a key's value from the cache.
-func (c *LRU) Get(key interface{}) (value interface{}, ok bool) {
-	if ent, ok := c.items[key]; ok {
-		c.evictList.MoveToFront(ent)
-		if ent.Value.(*entry) == nil {
-			return nil, false
-		}
-		return ent.Value.(*entry).value, true
-	}
-	return
-}
-
-// Contains checks if a key is in the cache, without updating the recent-ness
-// or deleting it for being stale.
-func (c *LRU) Contains(key interface{}) (ok bool) {
-	_, ok = c.items[key]
-	return ok
-}
-
-// Peek returns the key value (or undefined if not found) without updating
-// the "recently used"-ness of the key.
-func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) {
-	var ent *list.Element
-	if ent, ok = c.items[key]; ok {
-		return ent.Value.(*entry).value, true
-	}
-	return nil, ok
-}
-
-// Remove removes the provided key from the cache, returning if the
-// key was contained.
-func (c *LRU) Remove(key interface{}) (present bool) {
-	if ent, ok := c.items[key]; ok {
-		c.removeElement(ent)
-		return true
-	}
-	return false
-}
-
-// RemoveOldest removes the oldest item from the cache.
-func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) {
-	ent := c.evictList.Back()
-	if ent != nil {
-		c.removeElement(ent)
-		kv := ent.Value.(*entry)
-		return kv.key, kv.value, true
-	}
-	return nil, nil, false
-}
-
-// GetOldest returns the oldest entry
-func (c *LRU) GetOldest() (key interface{}, value interface{}, ok bool) {
-	ent := c.evictList.Back()
-	if ent != nil {
-		kv := ent.Value.(*entry)
-		return kv.key, kv.value, true
-	}
-	return nil, nil, false
-}
-
-// Keys returns a slice of the keys in the cache, from oldest to newest.
-func (c *LRU) Keys() []interface{} {
-	keys := make([]interface{}, len(c.items))
-	i := 0
-	for ent := c.evictList.Back(); ent != nil; ent = ent.Prev() {
-		keys[i] = ent.Value.(*entry).key
-		i++
-	}
-	return keys
-}
-
-// Len returns the number of items in the cache.
-func (c *LRU) Len() int {
-	return c.evictList.Len()
-}
-
-// Resize changes the cache size.
-func (c *LRU) Resize(size int) (evicted int) {
-	diff := c.Len() - size
-	if diff < 0 {
-		diff = 0
-	}
-	for i := 0; i < diff; i++ {
-		c.removeOldest()
-	}
-	c.size = size
-	return diff
-}
-
-// removeOldest removes the oldest item from the cache.
-func (c *LRU) removeOldest() {
-	ent := c.evictList.Back()
-	if ent != nil {
-		c.removeElement(ent)
-	}
-}
-
-// removeElement is used to remove a given list element from the cache
-func (c *LRU) removeElement(e *list.Element) {
-	c.evictList.Remove(e)
-	kv := e.Value.(*entry)
-	delete(c.items, kv.key)
-	if c.onEvict != nil {
-		c.onEvict(kv.key, kv.value)
-	}
-}
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
deleted file mode 100644
index 92d7093..0000000
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package simplelru
-
-// LRUCache is the interface for simple LRU cache.
-type LRUCache interface {
-	// Adds a value to the cache, returns true if an eviction occurred and
-	// updates the "recently used"-ness of the key.
-	Add(key, value interface{}) bool
-
-	// Returns key's value from the cache and
-	// updates the "recently used"-ness of the key. #value, isFound
-	Get(key interface{}) (value interface{}, ok bool)
-
-	// Checks if a key exists in cache without updating the recent-ness.
-	Contains(key interface{}) (ok bool)
-
-	// Returns key's value without updating the "recently used"-ness of the key.
-	Peek(key interface{}) (value interface{}, ok bool)
-
-	// Removes a key from the cache.
-	Remove(key interface{}) bool
-
-	// Removes the oldest entry from cache.
-	RemoveOldest() (interface{}, interface{}, bool)
-
-	// Returns the oldest entry from the cache. #key, value, isFound
-	GetOldest() (interface{}, interface{}, bool)
-
-	// Returns a slice of the keys in the cache, from oldest to newest.
-	Keys() []interface{}
-
-	// Returns the number of items in the cache.
-	Len() int
-
-	// Clears all cache entries.
-	Purge()
-
-  // Resizes cache, returning number evicted
-  Resize(int) int
-}
diff --git a/vendor/github.com/hashicorp/serf/LICENSE b/vendor/github.com/hashicorp/serf/LICENSE
deleted file mode 100644
index c33dcc7..0000000
--- a/vendor/github.com/hashicorp/serf/LICENSE
+++ /dev/null
@@ -1,354 +0,0 @@
-Mozilla Public License, version 2.0
-
-1. Definitions
-
-1.1. “Contributor”
-
-     means each individual or legal entity that creates, contributes to the
-     creation of, or owns Covered Software.
-
-1.2. “Contributor Version”
-
-     means the combination of the Contributions of others (if any) used by a
-     Contributor and that particular Contributor’s Contribution.
-
-1.3. “Contribution”
-
-     means Covered Software of a particular Contributor.
-
-1.4. “Covered Software”
-
-     means Source Code Form to which the initial Contributor has attached the
-     notice in Exhibit A, the Executable Form of such Source Code Form, and
-     Modifications of such Source Code Form, in each case including portions
-     thereof.
-
-1.5. “Incompatible With Secondary Licenses”
-     means
-
-     a. that the initial Contributor has attached the notice described in
-        Exhibit B to the Covered Software; or
-
-     b. that the Covered Software was made available under the terms of version
-        1.1 or earlier of the License, but not also under the terms of a
-        Secondary License.
-
-1.6. “Executable Form”
-
-     means any form of the work other than Source Code Form.
-
-1.7. “Larger Work”
-
-     means a work that combines Covered Software with other material, in a separate
-     file or files, that is not Covered Software.
-
-1.8. “License”
-
-     means this document.
-
-1.9. “Licensable”
-
-     means having the right to grant, to the maximum extent possible, whether at the
-     time of the initial grant or subsequently, any and all of the rights conveyed by
-     this License.
-
-1.10. “Modifications”
-
-     means any of the following:
-
-     a. any file in Source Code Form that results from an addition to, deletion
-        from, or modification of the contents of Covered Software; or
-
-     b. any new file in Source Code Form that contains any Covered Software.
-
-1.11. “Patent Claims” of a Contributor
-
-      means any patent claim(s), including without limitation, method, process,
-      and apparatus claims, in any patent Licensable by such Contributor that
-      would be infringed, but for the grant of the License, by the making,
-      using, selling, offering for sale, having made, import, or transfer of
-      either its Contributions or its Contributor Version.
-
-1.12. “Secondary License”
-
-      means either the GNU General Public License, Version 2.0, the GNU Lesser
-      General Public License, Version 2.1, the GNU Affero General Public
-      License, Version 3.0, or any later versions of those licenses.
-
-1.13. “Source Code Form”
-
-      means the form of the work preferred for making modifications.
-
-1.14. “You” (or “Your”)
-
-      means an individual or a legal entity exercising rights under this
-      License. For legal entities, “You” includes any entity that controls, is
-      controlled by, or is under common control with You. For purposes of this
-      definition, “control” means (a) the power, direct or indirect, to cause
-      the direction or management of such entity, whether by contract or
-      otherwise, or (b) ownership of more than fifty percent (50%) of the
-      outstanding shares or beneficial ownership of such entity.
-
-
-2. License Grants and Conditions
-
-2.1. Grants
-
-     Each Contributor hereby grants You a world-wide, royalty-free,
-     non-exclusive license:
-
-     a. under intellectual property rights (other than patent or trademark)
-        Licensable by such Contributor to use, reproduce, make available,
-        modify, display, perform, distribute, and otherwise exploit its
-        Contributions, either on an unmodified basis, with Modifications, or as
-        part of a Larger Work; and
-
-     b. under Patent Claims of such Contributor to make, use, sell, offer for
-        sale, have made, import, and otherwise transfer either its Contributions
-        or its Contributor Version.
-
-2.2. Effective Date
-
-     The licenses granted in Section 2.1 with respect to any Contribution become
-     effective for each Contribution on the date the Contributor first distributes
-     such Contribution.
-
-2.3. Limitations on Grant Scope
-
-     The licenses granted in this Section 2 are the only rights granted under this
-     License. No additional rights or licenses will be implied from the distribution
-     or licensing of Covered Software under this License. Notwithstanding Section
-     2.1(b) above, no patent license is granted by a Contributor:
-
-     a. for any code that a Contributor has removed from Covered Software; or
-
-     b. for infringements caused by: (i) Your and any other third party’s
-        modifications of Covered Software, or (ii) the combination of its
-        Contributions with other software (except as part of its Contributor
-        Version); or
-
-     c. under Patent Claims infringed by Covered Software in the absence of its
-        Contributions.
-
-     This License does not grant any rights in the trademarks, service marks, or
-     logos of any Contributor (except as may be necessary to comply with the
-     notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-     No Contributor makes additional grants as a result of Your choice to
-     distribute the Covered Software under a subsequent version of this License
-     (see Section 10.2) or under the terms of a Secondary License (if permitted
-     under the terms of Section 3.3).
-
-2.5. Representation
-
-     Each Contributor represents that the Contributor believes its Contributions
-     are its original creation(s) or it has sufficient rights to grant the
-     rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-     This License is not intended to limit any rights You have under applicable
-     copyright doctrines of fair use, fair dealing, or other equivalents.
-
-2.7. Conditions
-
-     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
-     Section 2.1.
-
-
-3. Responsibilities
-
-3.1. Distribution of Source Form
-
-     All distribution of Covered Software in Source Code Form, including any
-     Modifications that You create or to which You contribute, must be under the
-     terms of this License. You must inform recipients that the Source Code Form
-     of the Covered Software is governed by the terms of this License, and how
-     they can obtain a copy of this License. You may not attempt to alter or
-     restrict the recipients’ rights in the Source Code Form.
-
-3.2. Distribution of Executable Form
-
-     If You distribute Covered Software in Executable Form then:
-
-     a. such Covered Software must also be made available in Source Code Form,
-        as described in Section 3.1, and You must inform recipients of the
-        Executable Form how they can obtain a copy of such Source Code Form by
-        reasonable means in a timely manner, at a charge no more than the cost
-        of distribution to the recipient; and
-
-     b. You may distribute such Executable Form under the terms of this License,
-        or sublicense it under different terms, provided that the license for
-        the Executable Form does not attempt to limit or alter the recipients’
-        rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-     You may create and distribute a Larger Work under terms of Your choice,
-     provided that You also comply with the requirements of this License for the
-     Covered Software. If the Larger Work is a combination of Covered Software
-     with a work governed by one or more Secondary Licenses, and the Covered
-     Software is not Incompatible With Secondary Licenses, this License permits
-     You to additionally distribute such Covered Software under the terms of
-     such Secondary License(s), so that the recipient of the Larger Work may, at
-     their option, further distribute the Covered Software under the terms of
-     either this License or such Secondary License(s).
-
-3.4. Notices
-
-     You may not remove or alter the substance of any license notices (including
-     copyright notices, patent notices, disclaimers of warranty, or limitations
-     of liability) contained within the Source Code Form of the Covered
-     Software, except that You may alter any license notices to the extent
-     required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-     You may choose to offer, and to charge a fee for, warranty, support,
-     indemnity or liability obligations to one or more recipients of Covered
-     Software. However, You may do so only on Your own behalf, and not on behalf
-     of any Contributor. You must make it absolutely clear that any such
-     warranty, support, indemnity, or liability obligation is offered by You
-     alone, and You hereby agree to indemnify every Contributor for any
-     liability incurred by such Contributor as a result of warranty, support,
-     indemnity or liability terms You offer. You may include additional
-     disclaimers of warranty and limitations of liability specific to any
-     jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
-
-   If it is impossible for You to comply with any of the terms of this License
-   with respect to some or all of the Covered Software due to statute, judicial
-   order, or regulation then You must: (a) comply with the terms of this License
-   to the maximum extent possible; and (b) describe the limitations and the code
-   they affect. Such description must be placed in a text file included with all
-   distributions of the Covered Software under this License. Except to the
-   extent prohibited by statute or regulation, such description must be
-   sufficiently detailed for a recipient of ordinary skill to be able to
-   understand it.
-
-5. Termination
-
-5.1. The rights granted under this License will terminate automatically if You
-     fail to comply with any of its terms. However, if You become compliant,
-     then the rights granted under this License from a particular Contributor
-     are reinstated (a) provisionally, unless and until such Contributor
-     explicitly and finally terminates Your grants, and (b) on an ongoing basis,
-     if such Contributor fails to notify You of the non-compliance by some
-     reasonable means prior to 60 days after You have come back into compliance.
-     Moreover, Your grants from a particular Contributor are reinstated on an
-     ongoing basis if such Contributor notifies You of the non-compliance by
-     some reasonable means, this is the first time You have received notice of
-     non-compliance with this License from such Contributor, and You become
-     compliant prior to 30 days after Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-     infringement claim (excluding declaratory judgment actions, counter-claims,
-     and cross-claims) alleging that a Contributor Version directly or
-     indirectly infringes any patent, then the rights granted to You by any and
-     all Contributors for the Covered Software under Section 2.1 of this License
-     shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
-     license agreements (excluding distributors and resellers) which have been
-     validly granted by You or Your distributors under this License prior to
-     termination shall survive termination.
-
-6. Disclaimer of Warranty
-
-   Covered Software is provided under this License on an “as is” basis, without
-   warranty of any kind, either expressed, implied, or statutory, including,
-   without limitation, warranties that the Covered Software is free of defects,
-   merchantable, fit for a particular purpose or non-infringing. The entire
-   risk as to the quality and performance of the Covered Software is with You.
-   Should any Covered Software prove defective in any respect, You (not any
-   Contributor) assume the cost of any necessary servicing, repair, or
-   correction. This disclaimer of warranty constitutes an essential part of this
-   License. No use of  any Covered Software is authorized under this License
-   except under this disclaimer.
-
-7. Limitation of Liability
-
-   Under no circumstances and under no legal theory, whether tort (including
-   negligence), contract, or otherwise, shall any Contributor, or anyone who
-   distributes Covered Software as permitted above, be liable to You for any
-   direct, indirect, special, incidental, or consequential damages of any
-   character including, without limitation, damages for lost profits, loss of
-   goodwill, work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses, even if such party shall have been
-   informed of the possibility of such damages. This limitation of liability
-   shall not apply to liability for death or personal injury resulting from such
-   party’s negligence to the extent applicable law prohibits such limitation.
-   Some jurisdictions do not allow the exclusion or limitation of incidental or
-   consequential damages, so this exclusion and limitation may not apply to You.
-
-8. Litigation
-
-   Any litigation relating to this License may be brought only in the courts of
-   a jurisdiction where the defendant maintains its principal place of business
-   and such litigation shall be governed by laws of that jurisdiction, without
-   reference to its conflict-of-law provisions. Nothing in this Section shall
-   prevent a party’s ability to bring cross-claims or counter-claims.
-
-9. Miscellaneous
-
-   This License represents the complete agreement concerning the subject matter
-   hereof. If any provision of this License is held to be unenforceable, such
-   provision shall be reformed only to the extent necessary to make it
-   enforceable. Any law or regulation which provides that the language of a
-   contract shall be construed against the drafter shall not be used to construe
-   this License against a Contributor.
-
-
-10. Versions of the License
-
-10.1. New Versions
-
-      Mozilla Foundation is the license steward. Except as provided in Section
-      10.3, no one other than the license steward has the right to modify or
-      publish new versions of this License. Each version will be given a
-      distinguishing version number.
-
-10.2. Effect of New Versions
-
-      You may distribute the Covered Software under the terms of the version of
-      the License under which You originally received the Covered Software, or
-      under the terms of any subsequent version published by the license
-      steward.
-
-10.3. Modified Versions
-
-      If you create software not governed by this License, and you want to
-      create a new license for such software, you may create and use a modified
-      version of this License if you rename the license and remove any
-      references to the name of the license steward (except to note that such
-      modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
-      If You choose to distribute Source Code Form that is Incompatible With
-      Secondary Licenses under the terms of this version of the License, the
-      notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
-
-      This Source Code Form is subject to the
-      terms of the Mozilla Public License, v.
-      2.0. If a copy of the MPL was not
-      distributed with this file, You can
-      obtain one at
-      http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular file, then
-You may include the notice in a location (such as a LICENSE file in a relevant
-directory) where a recipient would be likely to look for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - “Incompatible With Secondary Licenses” Notice
-
-      This Source Code Form is “Incompatible
-      With Secondary Licenses”, as defined by
-      the Mozilla Public License, v. 2.0.
-
diff --git a/vendor/github.com/hashicorp/serf/coordinate/client.go b/vendor/github.com/hashicorp/serf/coordinate/client.go
deleted file mode 100644
index 3582ee4..0000000
--- a/vendor/github.com/hashicorp/serf/coordinate/client.go
+++ /dev/null
@@ -1,243 +0,0 @@
-package coordinate
-
-import (
-	"fmt"
-	"math"
-	"sort"
-	"sync"
-	"time"
-
-	"github.com/armon/go-metrics"
-)
-
-// Client manages the estimated network coordinate for a given node, and adjusts
-// it as the node observes round trip times and estimated coordinates from other
-// nodes. The core algorithm is based on Vivaldi, see the documentation for Config
-// for more details.
-type Client struct {
-	// coord is the current estimate of the client's network coordinate.
-	coord *Coordinate
-
-	// origin is a coordinate sitting at the origin.
-	origin *Coordinate
-
-	// config contains the tuning parameters that govern the performance of
-	// the algorithm.
-	config *Config
-
-	// adjustmentIndex is the current index into the adjustmentSamples slice.
-	adjustmentIndex uint
-
-	// adjustment is used to store samples for the adjustment calculation.
-	adjustmentSamples []float64
-
-	// latencyFilterSamples is used to store the last several RTT samples,
-	// keyed by node name. We will use the config's LatencyFilterSamples
-	// value to determine how many samples we keep, per node.
-	latencyFilterSamples map[string][]float64
-
-	// stats is used to record events that occur when updating coordinates.
-	stats ClientStats
-
-	// mutex enables safe concurrent access to the client.
-	mutex sync.RWMutex
-}
-
-// ClientStats is used to record events that occur when updating coordinates.
-type ClientStats struct {
-	// Resets is incremented any time we reset our local coordinate because
-	// our calculations have resulted in an invalid state.
-	Resets int
-}
-
-// NewClient creates a new Client and verifies the configuration is valid.
-func NewClient(config *Config) (*Client, error) {
-	if !(config.Dimensionality > 0) {
-		return nil, fmt.Errorf("dimensionality must be >0")
-	}
-
-	return &Client{
-		coord:                NewCoordinate(config),
-		origin:               NewCoordinate(config),
-		config:               config,
-		adjustmentIndex:      0,
-		adjustmentSamples:    make([]float64, config.AdjustmentWindowSize),
-		latencyFilterSamples: make(map[string][]float64),
-	}, nil
-}
-
-// GetCoordinate returns a copy of the coordinate for this client.
-func (c *Client) GetCoordinate() *Coordinate {
-	c.mutex.RLock()
-	defer c.mutex.RUnlock()
-
-	return c.coord.Clone()
-}
-
-// SetCoordinate forces the client's coordinate to a known state.
-func (c *Client) SetCoordinate(coord *Coordinate) error {
-	c.mutex.Lock()
-	defer c.mutex.Unlock()
-
-	if err := c.checkCoordinate(coord); err != nil {
-		return err
-	}
-
-	c.coord = coord.Clone()
-	return nil
-}
-
-// ForgetNode removes any client state for the given node.
-func (c *Client) ForgetNode(node string) {
-	c.mutex.Lock()
-	defer c.mutex.Unlock()
-
-	delete(c.latencyFilterSamples, node)
-}
-
-// Stats returns a copy of stats for the client.
-func (c *Client) Stats() ClientStats {
-	c.mutex.Lock()
-	defer c.mutex.Unlock()
-
-	return c.stats
-}
-
-// checkCoordinate returns an error if the coordinate isn't compatible with
-// this client, or if the coordinate itself isn't valid. This assumes the mutex
-// has been locked already.
-func (c *Client) checkCoordinate(coord *Coordinate) error {
-	if !c.coord.IsCompatibleWith(coord) {
-		return fmt.Errorf("dimensions aren't compatible")
-	}
-
-	if !coord.IsValid() {
-		return fmt.Errorf("coordinate is invalid")
-	}
-
-	return nil
-}
-
-// latencyFilter applies a simple moving median filter with a new sample for
-// a node. This assumes that the mutex has been locked already.
-func (c *Client) latencyFilter(node string, rttSeconds float64) float64 {
-	samples, ok := c.latencyFilterSamples[node]
-	if !ok {
-		samples = make([]float64, 0, c.config.LatencyFilterSize)
-	}
-
-	// Add the new sample and trim the list, if needed.
-	samples = append(samples, rttSeconds)
-	if len(samples) > int(c.config.LatencyFilterSize) {
-		samples = samples[1:]
-	}
-	c.latencyFilterSamples[node] = samples
-
-	// Sort a copy of the samples and return the median.
-	sorted := make([]float64, len(samples))
-	copy(sorted, samples)
-	sort.Float64s(sorted)
-	return sorted[len(sorted)/2]
-}
-
-// updateVivialdi updates the Vivaldi portion of the client's coordinate. This
-// assumes that the mutex has been locked already.
-func (c *Client) updateVivaldi(other *Coordinate, rttSeconds float64) {
-	const zeroThreshold = 1.0e-6
-
-	dist := c.coord.DistanceTo(other).Seconds()
-	if rttSeconds < zeroThreshold {
-		rttSeconds = zeroThreshold
-	}
-	wrongness := math.Abs(dist-rttSeconds) / rttSeconds
-
-	totalError := c.coord.Error + other.Error
-	if totalError < zeroThreshold {
-		totalError = zeroThreshold
-	}
-	weight := c.coord.Error / totalError
-
-	c.coord.Error = c.config.VivaldiCE*weight*wrongness + c.coord.Error*(1.0-c.config.VivaldiCE*weight)
-	if c.coord.Error > c.config.VivaldiErrorMax {
-		c.coord.Error = c.config.VivaldiErrorMax
-	}
-
-	delta := c.config.VivaldiCC * weight
-	force := delta * (rttSeconds - dist)
-	c.coord = c.coord.ApplyForce(c.config, force, other)
-}
-
-// updateAdjustment updates the adjustment portion of the client's coordinate, if
-// the feature is enabled. This assumes that the mutex has been locked already.
-func (c *Client) updateAdjustment(other *Coordinate, rttSeconds float64) {
-	if c.config.AdjustmentWindowSize == 0 {
-		return
-	}
-
-	// Note that the existing adjustment factors don't figure in to this
-	// calculation so we use the raw distance here.
-	dist := c.coord.rawDistanceTo(other)
-	c.adjustmentSamples[c.adjustmentIndex] = rttSeconds - dist
-	c.adjustmentIndex = (c.adjustmentIndex + 1) % c.config.AdjustmentWindowSize
-
-	sum := 0.0
-	for _, sample := range c.adjustmentSamples {
-		sum += sample
-	}
-	c.coord.Adjustment = sum / (2.0 * float64(c.config.AdjustmentWindowSize))
-}
-
-// updateGravity applies a small amount of gravity to pull coordinates towards
-// the center of the coordinate system to combat drift. This assumes that the
-// mutex is locked already.
-func (c *Client) updateGravity() {
-	dist := c.origin.DistanceTo(c.coord).Seconds()
-	force := -1.0 * math.Pow(dist/c.config.GravityRho, 2.0)
-	c.coord = c.coord.ApplyForce(c.config, force, c.origin)
-}
-
-// Update takes other, a coordinate for another node, and rtt, a round trip
-// time observation for a ping to that node, and updates the estimated position of
-// the client's coordinate. Returns the updated coordinate.
-func (c *Client) Update(node string, other *Coordinate, rtt time.Duration) (*Coordinate, error) {
-	c.mutex.Lock()
-	defer c.mutex.Unlock()
-
-	if err := c.checkCoordinate(other); err != nil {
-		return nil, err
-	}
-
-	// The code down below can handle zero RTTs, which we have seen in
-	// https://github.com/hashicorp/consul/issues/3789, presumably in
-	// environments with coarse-grained monotonic clocks (we are still
-	// trying to pin this down). In any event, this is ok from a code PoV
-	// so we don't need to alert operators with spammy messages. We did
-	// add a counter so this is still observable, though.
-	const maxRTT = 10 * time.Second
-	if rtt < 0 || rtt > maxRTT {
-		return nil, fmt.Errorf("round trip time not in valid range, duration %v is not a positive value less than %v ", rtt, maxRTT)
-	}
-	if rtt == 0 {
-		metrics.IncrCounter([]string{"serf", "coordinate", "zero-rtt"}, 1)
-	}
-
-	rttSeconds := c.latencyFilter(node, rtt.Seconds())
-	c.updateVivaldi(other, rttSeconds)
-	c.updateAdjustment(other, rttSeconds)
-	c.updateGravity()
-	if !c.coord.IsValid() {
-		c.stats.Resets++
-		c.coord = NewCoordinate(c.config)
-	}
-
-	return c.coord.Clone(), nil
-}
-
-// DistanceTo returns the estimated RTT from the client's coordinate to other, the
-// coordinate for another node.
-func (c *Client) DistanceTo(other *Coordinate) time.Duration {
-	c.mutex.RLock()
-	defer c.mutex.RUnlock()
-
-	return c.coord.DistanceTo(other)
-}
diff --git a/vendor/github.com/hashicorp/serf/coordinate/config.go b/vendor/github.com/hashicorp/serf/coordinate/config.go
deleted file mode 100644
index b85a8ab..0000000
--- a/vendor/github.com/hashicorp/serf/coordinate/config.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package coordinate
-
-// Config is used to set the parameters of the Vivaldi-based coordinate mapping
-// algorithm.
-//
-// The following references are called out at various points in the documentation
-// here:
-//
-// [1] Dabek, Frank, et al. "Vivaldi: A decentralized network coordinate system."
-//     ACM SIGCOMM Computer Communication Review. Vol. 34. No. 4. ACM, 2004.
-// [2] Ledlie, Jonathan, Paul Gardner, and Margo I. Seltzer. "Network Coordinates
-//     in the Wild." NSDI. Vol. 7. 2007.
-// [3] Lee, Sanghwan, et al. "On suitability of Euclidean embedding for
-//     host-based network coordinate systems." Networking, IEEE/ACM Transactions
-//     on 18.1 (2010): 27-40.
-type Config struct {
-	// The dimensionality of the coordinate system. As discussed in [2], more
-	// dimensions improves the accuracy of the estimates up to a point. Per [2]
-	// we chose 8 dimensions plus a non-Euclidean height.
-	Dimensionality uint
-
-	// VivaldiErrorMax is the default error value when a node hasn't yet made
-	// any observations. It also serves as an upper limit on the error value in
-	// case observations cause the error value to increase without bound.
-	VivaldiErrorMax float64
-
-	// VivaldiCE is a tuning factor that controls the maximum impact an
-	// observation can have on a node's confidence. See [1] for more details.
-	VivaldiCE float64
-
-	// VivaldiCC is a tuning factor that controls the maximum impact an
-	// observation can have on a node's coordinate. See [1] for more details.
-	VivaldiCC float64
-
-	// AdjustmentWindowSize is a tuning factor that determines how many samples
-	// we retain to calculate the adjustment factor as discussed in [3]. Setting
-	// this to zero disables this feature.
-	AdjustmentWindowSize uint
-
-	// HeightMin is the minimum value of the height parameter. Since this
-	// always must be positive, it will introduce a small amount error, so
-	// the chosen value should be relatively small compared to "normal"
-	// coordinates.
-	HeightMin float64
-
-	// LatencyFilterSamples is the maximum number of samples that are retained
-	// per node, in order to compute a median. The intent is to ride out blips
-	// but still keep the delay low, since our time to probe any given node is
-	// pretty infrequent. See [2] for more details.
-	LatencyFilterSize uint
-
-	// GravityRho is a tuning factor that sets how much gravity has an effect
-	// to try to re-center coordinates. See [2] for more details.
-	GravityRho float64
-}
-
-// DefaultConfig returns a Config that has some default values suitable for
-// basic testing of the algorithm, but not tuned to any particular type of cluster.
-func DefaultConfig() *Config {
-	return &Config{
-		Dimensionality:       8,
-		VivaldiErrorMax:      1.5,
-		VivaldiCE:            0.25,
-		VivaldiCC:            0.25,
-		AdjustmentWindowSize: 20,
-		HeightMin:            10.0e-6,
-		LatencyFilterSize:    3,
-		GravityRho:           150.0,
-	}
-}
diff --git a/vendor/github.com/hashicorp/serf/coordinate/coordinate.go b/vendor/github.com/hashicorp/serf/coordinate/coordinate.go
deleted file mode 100644
index fbe792c..0000000
--- a/vendor/github.com/hashicorp/serf/coordinate/coordinate.go
+++ /dev/null
@@ -1,203 +0,0 @@
-package coordinate
-
-import (
-	"math"
-	"math/rand"
-	"time"
-)
-
-// Coordinate is a specialized structure for holding network coordinates for the
-// Vivaldi-based coordinate mapping algorithm. All of the fields should be public
-// to enable this to be serialized. All values in here are in units of seconds.
-type Coordinate struct {
-	// Vec is the Euclidean portion of the coordinate. This is used along
-	// with the other fields to provide an overall distance estimate. The
-	// units here are seconds.
-	Vec []float64
-
-	// Err reflects the confidence in the given coordinate and is updated
-	// dynamically by the Vivaldi Client. This is dimensionless.
-	Error float64
-
-	// Adjustment is a distance offset computed based on a calculation over
-	// observations from all other nodes over a fixed window and is updated
-	// dynamically by the Vivaldi Client. The units here are seconds.
-	Adjustment float64
-
-	// Height is a distance offset that accounts for non-Euclidean effects
-	// which model the access links from nodes to the core Internet. The access
-	// links are usually set by bandwidth and congestion, and the core links
-	// usually follow distance based on geography.
-	Height float64
-}
-
-const (
-	// secondsToNanoseconds is used to convert float seconds to nanoseconds.
-	secondsToNanoseconds = 1.0e9
-
-	// zeroThreshold is used to decide if two coordinates are on top of each
-	// other.
-	zeroThreshold = 1.0e-6
-)
-
-// ErrDimensionalityConflict will be panic-d if you try to perform operations
-// with incompatible dimensions.
-type DimensionalityConflictError struct{}
-
-// Adds the error interface.
-func (e DimensionalityConflictError) Error() string {
-	return "coordinate dimensionality does not match"
-}
-
-// NewCoordinate creates a new coordinate at the origin, using the given config
-// to supply key initial values.
-func NewCoordinate(config *Config) *Coordinate {
-	return &Coordinate{
-		Vec:        make([]float64, config.Dimensionality),
-		Error:      config.VivaldiErrorMax,
-		Adjustment: 0.0,
-		Height:     config.HeightMin,
-	}
-}
-
-// Clone creates an independent copy of this coordinate.
-func (c *Coordinate) Clone() *Coordinate {
-	vec := make([]float64, len(c.Vec))
-	copy(vec, c.Vec)
-	return &Coordinate{
-		Vec:        vec,
-		Error:      c.Error,
-		Adjustment: c.Adjustment,
-		Height:     c.Height,
-	}
-}
-
-// componentIsValid returns false if a floating point value is a NaN or an
-// infinity.
-func componentIsValid(f float64) bool {
-	return !math.IsInf(f, 0) && !math.IsNaN(f)
-}
-
-// IsValid returns false if any component of a coordinate isn't valid, per the
-// componentIsValid() helper above.
-func (c *Coordinate) IsValid() bool {
-	for i := range c.Vec {
-		if !componentIsValid(c.Vec[i]) {
-			return false
-		}
-	}
-
-	return componentIsValid(c.Error) &&
-		componentIsValid(c.Adjustment) &&
-		componentIsValid(c.Height)
-}
-
-// IsCompatibleWith checks to see if the two coordinates are compatible
-// dimensionally. If this returns true then you are guaranteed to not get
-// any runtime errors operating on them.
-func (c *Coordinate) IsCompatibleWith(other *Coordinate) bool {
-	return len(c.Vec) == len(other.Vec)
-}
-
-// ApplyForce returns the result of applying the force from the direction of the
-// other coordinate.
-func (c *Coordinate) ApplyForce(config *Config, force float64, other *Coordinate) *Coordinate {
-	if !c.IsCompatibleWith(other) {
-		panic(DimensionalityConflictError{})
-	}
-
-	ret := c.Clone()
-	unit, mag := unitVectorAt(c.Vec, other.Vec)
-	ret.Vec = add(ret.Vec, mul(unit, force))
-	if mag > zeroThreshold {
-		ret.Height = (ret.Height+other.Height)*force/mag + ret.Height
-		ret.Height = math.Max(ret.Height, config.HeightMin)
-	}
-	return ret
-}
-
-// DistanceTo returns the distance between this coordinate and the other
-// coordinate, including adjustments.
-func (c *Coordinate) DistanceTo(other *Coordinate) time.Duration {
-	if !c.IsCompatibleWith(other) {
-		panic(DimensionalityConflictError{})
-	}
-
-	dist := c.rawDistanceTo(other)
-	adjustedDist := dist + c.Adjustment + other.Adjustment
-	if adjustedDist > 0.0 {
-		dist = adjustedDist
-	}
-	return time.Duration(dist * secondsToNanoseconds)
-}
-
-// rawDistanceTo returns the Vivaldi distance between this coordinate and the
-// other coordinate in seconds, not including adjustments. This assumes the
-// dimensions have already been checked to be compatible.
-func (c *Coordinate) rawDistanceTo(other *Coordinate) float64 {
-	return magnitude(diff(c.Vec, other.Vec)) + c.Height + other.Height
-}
-
-// add returns the sum of vec1 and vec2. This assumes the dimensions have
-// already been checked to be compatible.
-func add(vec1 []float64, vec2 []float64) []float64 {
-	ret := make([]float64, len(vec1))
-	for i := range ret {
-		ret[i] = vec1[i] + vec2[i]
-	}
-	return ret
-}
-
-// diff returns the difference between the vec1 and vec2. This assumes the
-// dimensions have already been checked to be compatible.
-func diff(vec1 []float64, vec2 []float64) []float64 {
-	ret := make([]float64, len(vec1))
-	for i := range ret {
-		ret[i] = vec1[i] - vec2[i]
-	}
-	return ret
-}
-
-// mul returns vec multiplied by a scalar factor.
-func mul(vec []float64, factor float64) []float64 {
-	ret := make([]float64, len(vec))
-	for i := range vec {
-		ret[i] = vec[i] * factor
-	}
-	return ret
-}
-
-// magnitude computes the magnitude of the vec.
-func magnitude(vec []float64) float64 {
-	sum := 0.0
-	for i := range vec {
-		sum += vec[i] * vec[i]
-	}
-	return math.Sqrt(sum)
-}
-
-// unitVectorAt returns a unit vector pointing at vec1 from vec2. If the two
-// positions are the same then a random unit vector is returned. We also return
-// the distance between the points for use in the later height calculation.
-func unitVectorAt(vec1 []float64, vec2 []float64) ([]float64, float64) {
-	ret := diff(vec1, vec2)
-
-	// If the coordinates aren't on top of each other we can normalize.
-	if mag := magnitude(ret); mag > zeroThreshold {
-		return mul(ret, 1.0/mag), mag
-	}
-
-	// Otherwise, just return a random unit vector.
-	for i := range ret {
-		ret[i] = rand.Float64() - 0.5
-	}
-	if mag := magnitude(ret); mag > zeroThreshold {
-		return mul(ret, 1.0/mag), 0.0
-	}
-
-	// And finally just give up and make a unit vector along the first
-	// dimension. This should be exceedingly rare.
-	ret = make([]float64, len(ret))
-	ret[0] = 1.0
-	return ret, 0.0
-}
diff --git a/vendor/github.com/hashicorp/serf/coordinate/phantom.go b/vendor/github.com/hashicorp/serf/coordinate/phantom.go
deleted file mode 100644
index 6fb033c..0000000
--- a/vendor/github.com/hashicorp/serf/coordinate/phantom.go
+++ /dev/null
@@ -1,187 +0,0 @@
-package coordinate
-
-import (
-	"fmt"
-	"math"
-	"math/rand"
-	"time"
-)
-
-// GenerateClients returns a slice with nodes number of clients, all with the
-// given config.
-func GenerateClients(nodes int, config *Config) ([]*Client, error) {
-	clients := make([]*Client, nodes)
-	for i, _ := range clients {
-		client, err := NewClient(config)
-		if err != nil {
-			return nil, err
-		}
-
-		clients[i] = client
-	}
-	return clients, nil
-}
-
-// GenerateLine returns a truth matrix as if all the nodes are in a straight linke
-// with the given spacing between them.
-func GenerateLine(nodes int, spacing time.Duration) [][]time.Duration {
-	truth := make([][]time.Duration, nodes)
-	for i := range truth {
-		truth[i] = make([]time.Duration, nodes)
-	}
-
-	for i := 0; i < nodes; i++ {
-		for j := i + 1; j < nodes; j++ {
-			rtt := time.Duration(j-i) * spacing
-			truth[i][j], truth[j][i] = rtt, rtt
-		}
-	}
-	return truth
-}
-
-// GenerateGrid returns a truth matrix as if all the nodes are in a two dimensional
-// grid with the given spacing between them.
-func GenerateGrid(nodes int, spacing time.Duration) [][]time.Duration {
-	truth := make([][]time.Duration, nodes)
-	for i := range truth {
-		truth[i] = make([]time.Duration, nodes)
-	}
-
-	n := int(math.Sqrt(float64(nodes)))
-	for i := 0; i < nodes; i++ {
-		for j := i + 1; j < nodes; j++ {
-			x1, y1 := float64(i%n), float64(i/n)
-			x2, y2 := float64(j%n), float64(j/n)
-			dx, dy := x2-x1, y2-y1
-			dist := math.Sqrt(dx*dx + dy*dy)
-			rtt := time.Duration(dist * float64(spacing))
-			truth[i][j], truth[j][i] = rtt, rtt
-		}
-	}
-	return truth
-}
-
-// GenerateSplit returns a truth matrix as if half the nodes are close together in
-// one location and half the nodes are close together in another. The lan factor
-// is used to separate the nodes locally and the wan factor represents the split
-// between the two sides.
-func GenerateSplit(nodes int, lan time.Duration, wan time.Duration) [][]time.Duration {
-	truth := make([][]time.Duration, nodes)
-	for i := range truth {
-		truth[i] = make([]time.Duration, nodes)
-	}
-
-	split := nodes / 2
-	for i := 0; i < nodes; i++ {
-		for j := i + 1; j < nodes; j++ {
-			rtt := lan
-			if (i <= split && j > split) || (i > split && j <= split) {
-				rtt += wan
-			}
-			truth[i][j], truth[j][i] = rtt, rtt
-		}
-	}
-	return truth
-}
-
-// GenerateCircle returns a truth matrix for a set of nodes, evenly distributed
-// around a circle with the given radius. The first node is at the "center" of the
-// circle because it's equidistant from all the other nodes, but we place it at
-// double the radius, so it should show up above all the other nodes in height.
-func GenerateCircle(nodes int, radius time.Duration) [][]time.Duration {
-	truth := make([][]time.Duration, nodes)
-	for i := range truth {
-		truth[i] = make([]time.Duration, nodes)
-	}
-
-	for i := 0; i < nodes; i++ {
-		for j := i + 1; j < nodes; j++ {
-			var rtt time.Duration
-			if i == 0 {
-				rtt = 2 * radius
-			} else {
-				t1 := 2.0 * math.Pi * float64(i) / float64(nodes)
-				x1, y1 := math.Cos(t1), math.Sin(t1)
-				t2 := 2.0 * math.Pi * float64(j) / float64(nodes)
-				x2, y2 := math.Cos(t2), math.Sin(t2)
-				dx, dy := x2-x1, y2-y1
-				dist := math.Sqrt(dx*dx + dy*dy)
-				rtt = time.Duration(dist * float64(radius))
-			}
-			truth[i][j], truth[j][i] = rtt, rtt
-		}
-	}
-	return truth
-}
-
-// GenerateRandom returns a truth matrix for a set of nodes with normally
-// distributed delays, with the given mean and deviation. The RNG is re-seeded
-// so you always get the same matrix for a given size.
-func GenerateRandom(nodes int, mean time.Duration, deviation time.Duration) [][]time.Duration {
-	rand.Seed(1)
-
-	truth := make([][]time.Duration, nodes)
-	for i := range truth {
-		truth[i] = make([]time.Duration, nodes)
-	}
-
-	for i := 0; i < nodes; i++ {
-		for j := i + 1; j < nodes; j++ {
-			rttSeconds := rand.NormFloat64()*deviation.Seconds() + mean.Seconds()
-			rtt := time.Duration(rttSeconds * secondsToNanoseconds)
-			truth[i][j], truth[j][i] = rtt, rtt
-		}
-	}
-	return truth
-}
-
-// Simulate runs the given number of cycles using the given list of clients and
-// truth matrix. On each cycle, each client will pick a random node and observe
-// the truth RTT, updating its coordinate estimate. The RNG is re-seeded for
-// each simulation run to get deterministic results (for this algorithm and the
-// underlying algorithm which will use random numbers for position vectors when
-// starting out with everything at the origin).
-func Simulate(clients []*Client, truth [][]time.Duration, cycles int) {
-	rand.Seed(1)
-
-	nodes := len(clients)
-	for cycle := 0; cycle < cycles; cycle++ {
-		for i, _ := range clients {
-			if j := rand.Intn(nodes); j != i {
-				c := clients[j].GetCoordinate()
-				rtt := truth[i][j]
-				node := fmt.Sprintf("node_%d", j)
-				clients[i].Update(node, c, rtt)
-			}
-		}
-	}
-}
-
-// Stats is returned from the Evaluate function with a summary of the algorithm
-// performance.
-type Stats struct {
-	ErrorMax float64
-	ErrorAvg float64
-}
-
-// Evaluate uses the coordinates of the given clients to calculate estimated
-// distances and compares them with the given truth matrix, returning summary
-// stats.
-func Evaluate(clients []*Client, truth [][]time.Duration) (stats Stats) {
-	nodes := len(clients)
-	count := 0
-	for i := 0; i < nodes; i++ {
-		for j := i + 1; j < nodes; j++ {
-			est := clients[i].DistanceTo(clients[j].GetCoordinate()).Seconds()
-			actual := truth[i][j].Seconds()
-			error := math.Abs(est-actual) / actual
-			stats.ErrorMax = math.Max(stats.ErrorMax, error)
-			stats.ErrorAvg += error
-			count += 1
-		}
-	}
-
-	stats.ErrorAvg /= float64(count)
-	fmt.Printf("Error avg=%9.6f max=%9.6f\n", stats.ErrorAvg, stats.ErrorMax)
-	return
-}
diff --git a/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE
deleted file mode 100644
index f9c841a..0000000
--- a/vendor/github.com/mitchellh/go-homedir/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Mitchell Hashimoto
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md
deleted file mode 100644
index d70706d..0000000
--- a/vendor/github.com/mitchellh/go-homedir/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# go-homedir
-
-This is a Go library for detecting the user's home directory without
-the use of cgo, so the library can be used in cross-compilation environments.
-
-Usage is incredibly simple, just call `homedir.Dir()` to get the home directory
-for a user, and `homedir.Expand()` to expand the `~` in a path to the home
-directory.
-
-**Why not just use `os/user`?** The built-in `os/user` package requires
-cgo on Darwin systems. This means that any Go code that uses that package
-cannot cross compile. But 99% of the time the use for `os/user` is just to
-retrieve the home directory, which we can do for the current user without
-cgo. This library does that, enabling cross-compilation.
diff --git a/vendor/github.com/mitchellh/go-homedir/go.mod b/vendor/github.com/mitchellh/go-homedir/go.mod
deleted file mode 100644
index 7efa09a..0000000
--- a/vendor/github.com/mitchellh/go-homedir/go.mod
+++ /dev/null
@@ -1 +0,0 @@
-module github.com/mitchellh/go-homedir
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go
deleted file mode 100644
index 2537853..0000000
--- a/vendor/github.com/mitchellh/go-homedir/homedir.go
+++ /dev/null
@@ -1,167 +0,0 @@
-package homedir
-
-import (
-	"bytes"
-	"errors"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"strconv"
-	"strings"
-	"sync"
-)
-
-// DisableCache will disable caching of the home directory. Caching is enabled
-// by default.
-var DisableCache bool
-
-var homedirCache string
-var cacheLock sync.RWMutex
-
-// Dir returns the home directory for the executing user.
-//
-// This uses an OS-specific method for discovering the home directory.
-// An error is returned if a home directory cannot be detected.
-func Dir() (string, error) {
-	if !DisableCache {
-		cacheLock.RLock()
-		cached := homedirCache
-		cacheLock.RUnlock()
-		if cached != "" {
-			return cached, nil
-		}
-	}
-
-	cacheLock.Lock()
-	defer cacheLock.Unlock()
-
-	var result string
-	var err error
-	if runtime.GOOS == "windows" {
-		result, err = dirWindows()
-	} else {
-		// Unix-like system, so just assume Unix
-		result, err = dirUnix()
-	}
-
-	if err != nil {
-		return "", err
-	}
-	homedirCache = result
-	return result, nil
-}
-
-// Expand expands the path to include the home directory if the path
-// is prefixed with `~`. If it isn't prefixed with `~`, the path is
-// returned as-is.
-func Expand(path string) (string, error) {
-	if len(path) == 0 {
-		return path, nil
-	}
-
-	if path[0] != '~' {
-		return path, nil
-	}
-
-	if len(path) > 1 && path[1] != '/' && path[1] != '\\' {
-		return "", errors.New("cannot expand user-specific home dir")
-	}
-
-	dir, err := Dir()
-	if err != nil {
-		return "", err
-	}
-
-	return filepath.Join(dir, path[1:]), nil
-}
-
-// Reset clears the cache, forcing the next call to Dir to re-detect
-// the home directory. This generally never has to be called, but can be
-// useful in tests if you're modifying the home directory via the HOME
-// env var or something.
-func Reset() {
-	cacheLock.Lock()
-	defer cacheLock.Unlock()
-	homedirCache = ""
-}
-
-func dirUnix() (string, error) {
-	homeEnv := "HOME"
-	if runtime.GOOS == "plan9" {
-		// On plan9, env vars are lowercase.
-		homeEnv = "home"
-	}
-
-	// First prefer the HOME environmental variable
-	if home := os.Getenv(homeEnv); home != "" {
-		return home, nil
-	}
-
-	var stdout bytes.Buffer
-
-	// If that fails, try OS specific commands
-	if runtime.GOOS == "darwin" {
-		cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`)
-		cmd.Stdout = &stdout
-		if err := cmd.Run(); err == nil {
-			result := strings.TrimSpace(stdout.String())
-			if result != "" {
-				return result, nil
-			}
-		}
-	} else {
-		cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid()))
-		cmd.Stdout = &stdout
-		if err := cmd.Run(); err != nil {
-			// If the error is ErrNotFound, we ignore it. Otherwise, return it.
-			if err != exec.ErrNotFound {
-				return "", err
-			}
-		} else {
-			if passwd := strings.TrimSpace(stdout.String()); passwd != "" {
-				// username:password:uid:gid:gecos:home:shell
-				passwdParts := strings.SplitN(passwd, ":", 7)
-				if len(passwdParts) > 5 {
-					return passwdParts[5], nil
-				}
-			}
-		}
-	}
-
-	// If all else fails, try the shell
-	stdout.Reset()
-	cmd := exec.Command("sh", "-c", "cd && pwd")
-	cmd.Stdout = &stdout
-	if err := cmd.Run(); err != nil {
-		return "", err
-	}
-
-	result := strings.TrimSpace(stdout.String())
-	if result == "" {
-		return "", errors.New("blank output when reading home directory")
-	}
-
-	return result, nil
-}
-
-func dirWindows() (string, error) {
-	// First prefer the HOME environmental variable
-	if home := os.Getenv("HOME"); home != "" {
-		return home, nil
-	}
-
-	// Prefer standard environment variable USERPROFILE
-	if home := os.Getenv("USERPROFILE"); home != "" {
-		return home, nil
-	}
-
-	drive := os.Getenv("HOMEDRIVE")
-	path := os.Getenv("HOMEPATH")
-	home := drive + path
-	if drive == "" || path == "" {
-		return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank")
-	}
-
-	return home, nil
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml
deleted file mode 100644
index 1689c7d..0000000
--- a/vendor/github.com/mitchellh/mapstructure/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-
-go:
-  - "1.11.x"
-  - tip
-
-script:
-  - go test
diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
deleted file mode 100644
index 3b3cb72..0000000
--- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## 1.1.2
-
-* Fix error when decode hook decodes interface implementation into interface
-  type. [GH-140]
-
-## 1.1.1
-
-* Fix panic that can happen in `decodePtr`
-
-## 1.1.0
-
-* Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133]
-* Support struct to struct decoding [GH-137]
-* If source map value is nil, then destination map value is nil (instead of empty)
-* If source slice value is nil, then destination slice value is nil (instead of empty)
-* If source pointer is nil, then destination pointer is set to nil (instead of
-  allocated zero value of type)
-
-## 1.0.0
-
-* Initial tagged stable release.
diff --git a/vendor/github.com/mitchellh/mapstructure/LICENSE b/vendor/github.com/mitchellh/mapstructure/LICENSE
deleted file mode 100644
index f9c841a..0000000
--- a/vendor/github.com/mitchellh/mapstructure/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Mitchell Hashimoto
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/github.com/mitchellh/mapstructure/README.md b/vendor/github.com/mitchellh/mapstructure/README.md
deleted file mode 100644
index 0018dc7..0000000
--- a/vendor/github.com/mitchellh/mapstructure/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# mapstructure [![Godoc](https://godoc.org/github.com/mitchellh/mapstructure?status.svg)](https://godoc.org/github.com/mitchellh/mapstructure)
-
-mapstructure is a Go library for decoding generic map values to structures
-and vice versa, while providing helpful error handling.
-
-This library is most useful when decoding values from some data stream (JSON,
-Gob, etc.) where you don't _quite_ know the structure of the underlying data
-until you read a part of it. You can therefore read a `map[string]interface{}`
-and use this library to decode it into the proper underlying native Go
-structure.
-
-## Installation
-
-Standard `go get`:
-
-```
-$ go get github.com/mitchellh/mapstructure
-```
-
-## Usage & Example
-
-For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure).
-
-The `Decode` function has examples associated with it there.
-
-## But Why?!
-
-Go offers fantastic standard libraries for decoding formats such as JSON.
-The standard method is to have a struct pre-created, and populate that struct
-from the bytes of the encoded format. This is great, but the problem is if
-you have configuration or an encoding that changes slightly depending on
-specific fields. For example, consider this JSON:
-
-```json
-{
-  "type": "person",
-  "name": "Mitchell"
-}
-```
-
-Perhaps we can't populate a specific structure without first reading
-the "type" field from the JSON. We could always do two passes over the
-decoding of the JSON (reading the "type" first, and the rest later).
-However, it is much simpler to just decode this into a `map[string]interface{}`
-structure, read the "type" key, then use something like this library
-to decode it into the proper structure.
diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
deleted file mode 100644
index 1f0abc6..0000000
--- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
+++ /dev/null
@@ -1,217 +0,0 @@
-package mapstructure
-
-import (
-	"errors"
-	"fmt"
-	"net"
-	"reflect"
-	"strconv"
-	"strings"
-	"time"
-)
-
-// typedDecodeHook takes a raw DecodeHookFunc (an interface{}) and turns
-// it into the proper DecodeHookFunc type, such as DecodeHookFuncType.
-func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc {
-	// Create variables here so we can reference them with the reflect pkg
-	var f1 DecodeHookFuncType
-	var f2 DecodeHookFuncKind
-
-	// Fill in the variables into this interface and the rest is done
-	// automatically using the reflect package.
-	potential := []interface{}{f1, f2}
-
-	v := reflect.ValueOf(h)
-	vt := v.Type()
-	for _, raw := range potential {
-		pt := reflect.ValueOf(raw).Type()
-		if vt.ConvertibleTo(pt) {
-			return v.Convert(pt).Interface()
-		}
-	}
-
-	return nil
-}
-
-// DecodeHookExec executes the given decode hook. This should be used
-// since it'll naturally degrade to the older backwards compatible DecodeHookFunc
-// that took reflect.Kind instead of reflect.Type.
-func DecodeHookExec(
-	raw DecodeHookFunc,
-	from reflect.Type, to reflect.Type,
-	data interface{}) (interface{}, error) {
-	switch f := typedDecodeHook(raw).(type) {
-	case DecodeHookFuncType:
-		return f(from, to, data)
-	case DecodeHookFuncKind:
-		return f(from.Kind(), to.Kind(), data)
-	default:
-		return nil, errors.New("invalid decode hook signature")
-	}
-}
-
-// ComposeDecodeHookFunc creates a single DecodeHookFunc that
-// automatically composes multiple DecodeHookFuncs.
-//
-// The composed funcs are called in order, with the result of the
-// previous transformation.
-func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		var err error
-		for _, f1 := range fs {
-			data, err = DecodeHookExec(f1, f, t, data)
-			if err != nil {
-				return nil, err
-			}
-
-			// Modify the from kind to be correct with the new data
-			f = nil
-			if val := reflect.ValueOf(data); val.IsValid() {
-				f = val.Type()
-			}
-		}
-
-		return data, nil
-	}
-}
-
-// StringToSliceHookFunc returns a DecodeHookFunc that converts
-// string to []string by splitting on the given sep.
-func StringToSliceHookFunc(sep string) DecodeHookFunc {
-	return func(
-		f reflect.Kind,
-		t reflect.Kind,
-		data interface{}) (interface{}, error) {
-		if f != reflect.String || t != reflect.Slice {
-			return data, nil
-		}
-
-		raw := data.(string)
-		if raw == "" {
-			return []string{}, nil
-		}
-
-		return strings.Split(raw, sep), nil
-	}
-}
-
-// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts
-// strings to time.Duration.
-func StringToTimeDurationHookFunc() DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		if f.Kind() != reflect.String {
-			return data, nil
-		}
-		if t != reflect.TypeOf(time.Duration(5)) {
-			return data, nil
-		}
-
-		// Convert it by parsing
-		return time.ParseDuration(data.(string))
-	}
-}
-
-// StringToIPHookFunc returns a DecodeHookFunc that converts
-// strings to net.IP
-func StringToIPHookFunc() DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		if f.Kind() != reflect.String {
-			return data, nil
-		}
-		if t != reflect.TypeOf(net.IP{}) {
-			return data, nil
-		}
-
-		// Convert it by parsing
-		ip := net.ParseIP(data.(string))
-		if ip == nil {
-			return net.IP{}, fmt.Errorf("failed parsing ip %v", data)
-		}
-
-		return ip, nil
-	}
-}
-
-// StringToIPNetHookFunc returns a DecodeHookFunc that converts
-// strings to net.IPNet
-func StringToIPNetHookFunc() DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		if f.Kind() != reflect.String {
-			return data, nil
-		}
-		if t != reflect.TypeOf(net.IPNet{}) {
-			return data, nil
-		}
-
-		// Convert it by parsing
-		_, net, err := net.ParseCIDR(data.(string))
-		return net, err
-	}
-}
-
-// StringToTimeHookFunc returns a DecodeHookFunc that converts
-// strings to time.Time.
-func StringToTimeHookFunc(layout string) DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		if f.Kind() != reflect.String {
-			return data, nil
-		}
-		if t != reflect.TypeOf(time.Time{}) {
-			return data, nil
-		}
-
-		// Convert it by parsing
-		return time.Parse(layout, data.(string))
-	}
-}
-
-// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to
-// the decoder.
-//
-// Note that this is significantly different from the WeaklyTypedInput option
-// of the DecoderConfig.
-func WeaklyTypedHook(
-	f reflect.Kind,
-	t reflect.Kind,
-	data interface{}) (interface{}, error) {
-	dataVal := reflect.ValueOf(data)
-	switch t {
-	case reflect.String:
-		switch f {
-		case reflect.Bool:
-			if dataVal.Bool() {
-				return "1", nil
-			}
-			return "0", nil
-		case reflect.Float32:
-			return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil
-		case reflect.Int:
-			return strconv.FormatInt(dataVal.Int(), 10), nil
-		case reflect.Slice:
-			dataType := dataVal.Type()
-			elemKind := dataType.Elem().Kind()
-			if elemKind == reflect.Uint8 {
-				return string(dataVal.Interface().([]uint8)), nil
-			}
-		case reflect.Uint:
-			return strconv.FormatUint(dataVal.Uint(), 10), nil
-		}
-	}
-
-	return data, nil
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/error.go b/vendor/github.com/mitchellh/mapstructure/error.go
deleted file mode 100644
index 47a99e5..0000000
--- a/vendor/github.com/mitchellh/mapstructure/error.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package mapstructure
-
-import (
-	"errors"
-	"fmt"
-	"sort"
-	"strings"
-)
-
-// Error implements the error interface and can represents multiple
-// errors that occur in the course of a single decode.
-type Error struct {
-	Errors []string
-}
-
-func (e *Error) Error() string {
-	points := make([]string, len(e.Errors))
-	for i, err := range e.Errors {
-		points[i] = fmt.Sprintf("* %s", err)
-	}
-
-	sort.Strings(points)
-	return fmt.Sprintf(
-		"%d error(s) decoding:\n\n%s",
-		len(e.Errors), strings.Join(points, "\n"))
-}
-
-// WrappedErrors implements the errwrap.Wrapper interface to make this
-// return value more useful with the errwrap and go-multierror libraries.
-func (e *Error) WrappedErrors() []error {
-	if e == nil {
-		return nil
-	}
-
-	result := make([]error, len(e.Errors))
-	for i, e := range e.Errors {
-		result[i] = errors.New(e)
-	}
-
-	return result
-}
-
-func appendErrors(errors []string, err error) []string {
-	switch e := err.(type) {
-	case *Error:
-		return append(errors, e.Errors...)
-	default:
-		return append(errors, e.Error())
-	}
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/go.mod b/vendor/github.com/mitchellh/mapstructure/go.mod
deleted file mode 100644
index d2a7125..0000000
--- a/vendor/github.com/mitchellh/mapstructure/go.mod
+++ /dev/null
@@ -1 +0,0 @@
-module github.com/mitchellh/mapstructure
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
deleted file mode 100644
index 256ee63..0000000
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go
+++ /dev/null
@@ -1,1149 +0,0 @@
-// Package mapstructure exposes functionality to convert an arbitrary
-// map[string]interface{} into a native Go structure.
-//
-// The Go structure can be arbitrarily complex, containing slices,
-// other structs, etc. and the decoder will properly decode nested
-// maps and so on into the proper structures in the native Go struct.
-// See the examples to see what the decoder is capable of.
-package mapstructure
-
-import (
-	"encoding/json"
-	"errors"
-	"fmt"
-	"reflect"
-	"sort"
-	"strconv"
-	"strings"
-)
-
-// DecodeHookFunc is the callback function that can be used for
-// data transformations. See "DecodeHook" in the DecoderConfig
-// struct.
-//
-// The type should be DecodeHookFuncType or DecodeHookFuncKind.
-// Either is accepted. Types are a superset of Kinds (Types can return
-// Kinds) and are generally a richer thing to use, but Kinds are simpler
-// if you only need those.
-//
-// The reason DecodeHookFunc is multi-typed is for backwards compatibility:
-// we started with Kinds and then realized Types were the better solution,
-// but have a promise to not break backwards compat so we now support
-// both.
-type DecodeHookFunc interface{}
-
-// DecodeHookFuncType is a DecodeHookFunc which has complete information about
-// the source and target types.
-type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error)
-
-// DecodeHookFuncKind is a DecodeHookFunc which knows only the Kinds of the
-// source and target types.
-type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error)
-
-// DecoderConfig is the configuration that is used to create a new decoder
-// and allows customization of various aspects of decoding.
-type DecoderConfig struct {
-	// DecodeHook, if set, will be called before any decoding and any
-	// type conversion (if WeaklyTypedInput is on). This lets you modify
-	// the values before they're set down onto the resulting struct.
-	//
-	// If an error is returned, the entire decode will fail with that
-	// error.
-	DecodeHook DecodeHookFunc
-
-	// If ErrorUnused is true, then it is an error for there to exist
-	// keys in the original map that were unused in the decoding process
-	// (extra keys).
-	ErrorUnused bool
-
-	// ZeroFields, if set to true, will zero fields before writing them.
-	// For example, a map will be emptied before decoded values are put in
-	// it. If this is false, a map will be merged.
-	ZeroFields bool
-
-	// If WeaklyTypedInput is true, the decoder will make the following
-	// "weak" conversions:
-	//
-	//   - bools to string (true = "1", false = "0")
-	//   - numbers to string (base 10)
-	//   - bools to int/uint (true = 1, false = 0)
-	//   - strings to int/uint (base implied by prefix)
-	//   - int to bool (true if value != 0)
-	//   - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F,
-	//     FALSE, false, False. Anything else is an error)
-	//   - empty array = empty map and vice versa
-	//   - negative numbers to overflowed uint values (base 10)
-	//   - slice of maps to a merged map
-	//   - single values are converted to slices if required. Each
-	//     element is weakly decoded. For example: "4" can become []int{4}
-	//     if the target type is an int slice.
-	//
-	WeaklyTypedInput bool
-
-	// Metadata is the struct that will contain extra metadata about
-	// the decoding. If this is nil, then no metadata will be tracked.
-	Metadata *Metadata
-
-	// Result is a pointer to the struct that will contain the decoded
-	// value.
-	Result interface{}
-
-	// The tag name that mapstructure reads for field names. This
-	// defaults to "mapstructure"
-	TagName string
-}
-
-// A Decoder takes a raw interface value and turns it into structured
-// data, keeping track of rich error information along the way in case
-// anything goes wrong. Unlike the basic top-level Decode method, you can
-// more finely control how the Decoder behaves using the DecoderConfig
-// structure. The top-level Decode method is just a convenience that sets
-// up the most basic Decoder.
-type Decoder struct {
-	config *DecoderConfig
-}
-
-// Metadata contains information about decoding a structure that
-// is tedious or difficult to get otherwise.
-type Metadata struct {
-	// Keys are the keys of the structure which were successfully decoded
-	Keys []string
-
-	// Unused is a slice of keys that were found in the raw value but
-	// weren't decoded since there was no matching field in the result interface
-	Unused []string
-}
-
-// Decode takes an input structure and uses reflection to translate it to
-// the output structure. output must be a pointer to a map or struct.
-func Decode(input interface{}, output interface{}) error {
-	config := &DecoderConfig{
-		Metadata: nil,
-		Result:   output,
-	}
-
-	decoder, err := NewDecoder(config)
-	if err != nil {
-		return err
-	}
-
-	return decoder.Decode(input)
-}
-
-// WeakDecode is the same as Decode but is shorthand to enable
-// WeaklyTypedInput. See DecoderConfig for more info.
-func WeakDecode(input, output interface{}) error {
-	config := &DecoderConfig{
-		Metadata:         nil,
-		Result:           output,
-		WeaklyTypedInput: true,
-	}
-
-	decoder, err := NewDecoder(config)
-	if err != nil {
-		return err
-	}
-
-	return decoder.Decode(input)
-}
-
-// DecodeMetadata is the same as Decode, but is shorthand to
-// enable metadata collection. See DecoderConfig for more info.
-func DecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error {
-	config := &DecoderConfig{
-		Metadata: metadata,
-		Result:   output,
-	}
-
-	decoder, err := NewDecoder(config)
-	if err != nil {
-		return err
-	}
-
-	return decoder.Decode(input)
-}
-
-// WeakDecodeMetadata is the same as Decode, but is shorthand to
-// enable both WeaklyTypedInput and metadata collection. See
-// DecoderConfig for more info.
-func WeakDecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error {
-	config := &DecoderConfig{
-		Metadata:         metadata,
-		Result:           output,
-		WeaklyTypedInput: true,
-	}
-
-	decoder, err := NewDecoder(config)
-	if err != nil {
-		return err
-	}
-
-	return decoder.Decode(input)
-}
-
-// NewDecoder returns a new decoder for the given configuration. Once
-// a decoder has been returned, the same configuration must not be used
-// again.
-func NewDecoder(config *DecoderConfig) (*Decoder, error) {
-	val := reflect.ValueOf(config.Result)
-	if val.Kind() != reflect.Ptr {
-		return nil, errors.New("result must be a pointer")
-	}
-
-	val = val.Elem()
-	if !val.CanAddr() {
-		return nil, errors.New("result must be addressable (a pointer)")
-	}
-
-	if config.Metadata != nil {
-		if config.Metadata.Keys == nil {
-			config.Metadata.Keys = make([]string, 0)
-		}
-
-		if config.Metadata.Unused == nil {
-			config.Metadata.Unused = make([]string, 0)
-		}
-	}
-
-	if config.TagName == "" {
-		config.TagName = "mapstructure"
-	}
-
-	result := &Decoder{
-		config: config,
-	}
-
-	return result, nil
-}
-
-// Decode decodes the given raw interface to the target pointer specified
-// by the configuration.
-func (d *Decoder) Decode(input interface{}) error {
-	return d.decode("", input, reflect.ValueOf(d.config.Result).Elem())
-}
-
-// Decodes an unknown data type into a specific reflection value.
-func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) error {
-	var inputVal reflect.Value
-	if input != nil {
-		inputVal = reflect.ValueOf(input)
-
-		// We need to check here if input is a typed nil. Typed nils won't
-		// match the "input == nil" below so we check that here.
-		if inputVal.Kind() == reflect.Ptr && inputVal.IsNil() {
-			input = nil
-		}
-	}
-
-	if input == nil {
-		// If the data is nil, then we don't set anything, unless ZeroFields is set
-		// to true.
-		if d.config.ZeroFields {
-			outVal.Set(reflect.Zero(outVal.Type()))
-
-			if d.config.Metadata != nil && name != "" {
-				d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
-			}
-		}
-		return nil
-	}
-
-	if !inputVal.IsValid() {
-		// If the input value is invalid, then we just set the value
-		// to be the zero value.
-		outVal.Set(reflect.Zero(outVal.Type()))
-		if d.config.Metadata != nil && name != "" {
-			d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
-		}
-		return nil
-	}
-
-	if d.config.DecodeHook != nil {
-		// We have a DecodeHook, so let's pre-process the input.
-		var err error
-		input, err = DecodeHookExec(
-			d.config.DecodeHook,
-			inputVal.Type(), outVal.Type(), input)
-		if err != nil {
-			return fmt.Errorf("error decoding '%s': %s", name, err)
-		}
-	}
-
-	var err error
-	outputKind := getKind(outVal)
-	switch outputKind {
-	case reflect.Bool:
-		err = d.decodeBool(name, input, outVal)
-	case reflect.Interface:
-		err = d.decodeBasic(name, input, outVal)
-	case reflect.String:
-		err = d.decodeString(name, input, outVal)
-	case reflect.Int:
-		err = d.decodeInt(name, input, outVal)
-	case reflect.Uint:
-		err = d.decodeUint(name, input, outVal)
-	case reflect.Float32:
-		err = d.decodeFloat(name, input, outVal)
-	case reflect.Struct:
-		err = d.decodeStruct(name, input, outVal)
-	case reflect.Map:
-		err = d.decodeMap(name, input, outVal)
-	case reflect.Ptr:
-		err = d.decodePtr(name, input, outVal)
-	case reflect.Slice:
-		err = d.decodeSlice(name, input, outVal)
-	case reflect.Array:
-		err = d.decodeArray(name, input, outVal)
-	case reflect.Func:
-		err = d.decodeFunc(name, input, outVal)
-	default:
-		// If we reached this point then we weren't able to decode it
-		return fmt.Errorf("%s: unsupported type: %s", name, outputKind)
-	}
-
-	// If we reached here, then we successfully decoded SOMETHING, so
-	// mark the key as used if we're tracking metainput.
-	if d.config.Metadata != nil && name != "" {
-		d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
-	}
-
-	return err
-}
-
-// This decodes a basic type (bool, int, string, etc.) and sets the
-// value to "data" of that type.
-func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error {
-	if val.IsValid() && val.Elem().IsValid() {
-		return d.decode(name, data, val.Elem())
-	}
-
-	dataVal := reflect.ValueOf(data)
-
-	// If the input data is a pointer, and the assigned type is the dereference
-	// of that exact pointer, then indirect it so that we can assign it.
-	// Example: *string to string
-	if dataVal.Kind() == reflect.Ptr && dataVal.Type().Elem() == val.Type() {
-		dataVal = reflect.Indirect(dataVal)
-	}
-
-	if !dataVal.IsValid() {
-		dataVal = reflect.Zero(val.Type())
-	}
-
-	dataValType := dataVal.Type()
-	if !dataValType.AssignableTo(val.Type()) {
-		return fmt.Errorf(
-			"'%s' expected type '%s', got '%s'",
-			name, val.Type(), dataValType)
-	}
-
-	val.Set(dataVal)
-	return nil
-}
-
-func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataKind := getKind(dataVal)
-
-	converted := true
-	switch {
-	case dataKind == reflect.String:
-		val.SetString(dataVal.String())
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetString("1")
-		} else {
-			val.SetString("0")
-		}
-	case dataKind == reflect.Int && d.config.WeaklyTypedInput:
-		val.SetString(strconv.FormatInt(dataVal.Int(), 10))
-	case dataKind == reflect.Uint && d.config.WeaklyTypedInput:
-		val.SetString(strconv.FormatUint(dataVal.Uint(), 10))
-	case dataKind == reflect.Float32 && d.config.WeaklyTypedInput:
-		val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64))
-	case dataKind == reflect.Slice && d.config.WeaklyTypedInput,
-		dataKind == reflect.Array && d.config.WeaklyTypedInput:
-		dataType := dataVal.Type()
-		elemKind := dataType.Elem().Kind()
-		switch elemKind {
-		case reflect.Uint8:
-			var uints []uint8
-			if dataKind == reflect.Array {
-				uints = make([]uint8, dataVal.Len(), dataVal.Len())
-				for i := range uints {
-					uints[i] = dataVal.Index(i).Interface().(uint8)
-				}
-			} else {
-				uints = dataVal.Interface().([]uint8)
-			}
-			val.SetString(string(uints))
-		default:
-			converted = false
-		}
-	default:
-		converted = false
-	}
-
-	if !converted {
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataKind := getKind(dataVal)
-	dataType := dataVal.Type()
-
-	switch {
-	case dataKind == reflect.Int:
-		val.SetInt(dataVal.Int())
-	case dataKind == reflect.Uint:
-		val.SetInt(int64(dataVal.Uint()))
-	case dataKind == reflect.Float32:
-		val.SetInt(int64(dataVal.Float()))
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetInt(1)
-		} else {
-			val.SetInt(0)
-		}
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		i, err := strconv.ParseInt(dataVal.String(), 0, val.Type().Bits())
-		if err == nil {
-			val.SetInt(i)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as int: %s", name, err)
-		}
-	case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number":
-		jn := data.(json.Number)
-		i, err := jn.Int64()
-		if err != nil {
-			return fmt.Errorf(
-				"error decoding json.Number into %s: %s", name, err)
-		}
-		val.SetInt(i)
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataKind := getKind(dataVal)
-
-	switch {
-	case dataKind == reflect.Int:
-		i := dataVal.Int()
-		if i < 0 && !d.config.WeaklyTypedInput {
-			return fmt.Errorf("cannot parse '%s', %d overflows uint",
-				name, i)
-		}
-		val.SetUint(uint64(i))
-	case dataKind == reflect.Uint:
-		val.SetUint(dataVal.Uint())
-	case dataKind == reflect.Float32:
-		f := dataVal.Float()
-		if f < 0 && !d.config.WeaklyTypedInput {
-			return fmt.Errorf("cannot parse '%s', %f overflows uint",
-				name, f)
-		}
-		val.SetUint(uint64(f))
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetUint(1)
-		} else {
-			val.SetUint(0)
-		}
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		i, err := strconv.ParseUint(dataVal.String(), 0, val.Type().Bits())
-		if err == nil {
-			val.SetUint(i)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as uint: %s", name, err)
-		}
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataKind := getKind(dataVal)
-
-	switch {
-	case dataKind == reflect.Bool:
-		val.SetBool(dataVal.Bool())
-	case dataKind == reflect.Int && d.config.WeaklyTypedInput:
-		val.SetBool(dataVal.Int() != 0)
-	case dataKind == reflect.Uint && d.config.WeaklyTypedInput:
-		val.SetBool(dataVal.Uint() != 0)
-	case dataKind == reflect.Float32 && d.config.WeaklyTypedInput:
-		val.SetBool(dataVal.Float() != 0)
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		b, err := strconv.ParseBool(dataVal.String())
-		if err == nil {
-			val.SetBool(b)
-		} else if dataVal.String() == "" {
-			val.SetBool(false)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as bool: %s", name, err)
-		}
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataKind := getKind(dataVal)
-	dataType := dataVal.Type()
-
-	switch {
-	case dataKind == reflect.Int:
-		val.SetFloat(float64(dataVal.Int()))
-	case dataKind == reflect.Uint:
-		val.SetFloat(float64(dataVal.Uint()))
-	case dataKind == reflect.Float32:
-		val.SetFloat(dataVal.Float())
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetFloat(1)
-		} else {
-			val.SetFloat(0)
-		}
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		f, err := strconv.ParseFloat(dataVal.String(), val.Type().Bits())
-		if err == nil {
-			val.SetFloat(f)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as float: %s", name, err)
-		}
-	case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number":
-		jn := data.(json.Number)
-		i, err := jn.Float64()
-		if err != nil {
-			return fmt.Errorf(
-				"error decoding json.Number into %s: %s", name, err)
-		}
-		val.SetFloat(i)
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeMap(name string, data interface{}, val reflect.Value) error {
-	valType := val.Type()
-	valKeyType := valType.Key()
-	valElemType := valType.Elem()
-
-	// By default we overwrite keys in the current map
-	valMap := val
-
-	// If the map is nil or we're purposely zeroing fields, make a new map
-	if valMap.IsNil() || d.config.ZeroFields {
-		// Make a new map to hold our result
-		mapType := reflect.MapOf(valKeyType, valElemType)
-		valMap = reflect.MakeMap(mapType)
-	}
-
-	// Check input type and based on the input type jump to the proper func
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	switch dataVal.Kind() {
-	case reflect.Map:
-		return d.decodeMapFromMap(name, dataVal, val, valMap)
-
-	case reflect.Struct:
-		return d.decodeMapFromStruct(name, dataVal, val, valMap)
-
-	case reflect.Array, reflect.Slice:
-		if d.config.WeaklyTypedInput {
-			return d.decodeMapFromSlice(name, dataVal, val, valMap)
-		}
-
-		fallthrough
-
-	default:
-		return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind())
-	}
-}
-
-func (d *Decoder) decodeMapFromSlice(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error {
-	// Special case for BC reasons (covered by tests)
-	if dataVal.Len() == 0 {
-		val.Set(valMap)
-		return nil
-	}
-
-	for i := 0; i < dataVal.Len(); i++ {
-		err := d.decode(
-			fmt.Sprintf("%s[%d]", name, i),
-			dataVal.Index(i).Interface(), val)
-		if err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeMapFromMap(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error {
-	valType := val.Type()
-	valKeyType := valType.Key()
-	valElemType := valType.Elem()
-
-	// Accumulate errors
-	errors := make([]string, 0)
-
-	// If the input data is empty, then we just match what the input data is.
-	if dataVal.Len() == 0 {
-		if dataVal.IsNil() {
-			if !val.IsNil() {
-				val.Set(dataVal)
-			}
-		} else {
-			// Set to empty allocated value
-			val.Set(valMap)
-		}
-
-		return nil
-	}
-
-	for _, k := range dataVal.MapKeys() {
-		fieldName := fmt.Sprintf("%s[%s]", name, k)
-
-		// First decode the key into the proper type
-		currentKey := reflect.Indirect(reflect.New(valKeyType))
-		if err := d.decode(fieldName, k.Interface(), currentKey); err != nil {
-			errors = appendErrors(errors, err)
-			continue
-		}
-
-		// Next decode the data into the proper type
-		v := dataVal.MapIndex(k).Interface()
-		currentVal := reflect.Indirect(reflect.New(valElemType))
-		if err := d.decode(fieldName, v, currentVal); err != nil {
-			errors = appendErrors(errors, err)
-			continue
-		}
-
-		valMap.SetMapIndex(currentKey, currentVal)
-	}
-
-	// Set the built up map to the value
-	val.Set(valMap)
-
-	// If we had errors, return those
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error {
-	typ := dataVal.Type()
-	for i := 0; i < typ.NumField(); i++ {
-		// Get the StructField first since this is a cheap operation. If the
-		// field is unexported, then ignore it.
-		f := typ.Field(i)
-		if f.PkgPath != "" {
-			continue
-		}
-
-		// Next get the actual value of this field and verify it is assignable
-		// to the map value.
-		v := dataVal.Field(i)
-		if !v.Type().AssignableTo(valMap.Type().Elem()) {
-			return fmt.Errorf("cannot assign type '%s' to map value field of type '%s'", v.Type(), valMap.Type().Elem())
-		}
-
-		tagValue := f.Tag.Get(d.config.TagName)
-		tagParts := strings.Split(tagValue, ",")
-
-		// Determine the name of the key in the map
-		keyName := f.Name
-		if tagParts[0] != "" {
-			if tagParts[0] == "-" {
-				continue
-			}
-			keyName = tagParts[0]
-		}
-
-		// If "squash" is specified in the tag, we squash the field down.
-		squash := false
-		for _, tag := range tagParts[1:] {
-			if tag == "squash" {
-				squash = true
-				break
-			}
-		}
-		if squash && v.Kind() != reflect.Struct {
-			return fmt.Errorf("cannot squash non-struct type '%s'", v.Type())
-		}
-
-		switch v.Kind() {
-		// this is an embedded struct, so handle it differently
-		case reflect.Struct:
-			x := reflect.New(v.Type())
-			x.Elem().Set(v)
-
-			vType := valMap.Type()
-			vKeyType := vType.Key()
-			vElemType := vType.Elem()
-			mType := reflect.MapOf(vKeyType, vElemType)
-			vMap := reflect.MakeMap(mType)
-
-			err := d.decode(keyName, x.Interface(), vMap)
-			if err != nil {
-				return err
-			}
-
-			if squash {
-				for _, k := range vMap.MapKeys() {
-					valMap.SetMapIndex(k, vMap.MapIndex(k))
-				}
-			} else {
-				valMap.SetMapIndex(reflect.ValueOf(keyName), vMap)
-			}
-
-		default:
-			valMap.SetMapIndex(reflect.ValueOf(keyName), v)
-		}
-	}
-
-	if val.CanAddr() {
-		val.Set(valMap)
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) error {
-	// If the input data is nil, then we want to just set the output
-	// pointer to be nil as well.
-	isNil := data == nil
-	if !isNil {
-		switch v := reflect.Indirect(reflect.ValueOf(data)); v.Kind() {
-		case reflect.Chan,
-			reflect.Func,
-			reflect.Interface,
-			reflect.Map,
-			reflect.Ptr,
-			reflect.Slice:
-			isNil = v.IsNil()
-		}
-	}
-	if isNil {
-		if !val.IsNil() && val.CanSet() {
-			nilValue := reflect.New(val.Type()).Elem()
-			val.Set(nilValue)
-		}
-
-		return nil
-	}
-
-	// Create an element of the concrete (non pointer) type and decode
-	// into that. Then set the value of the pointer to this type.
-	valType := val.Type()
-	valElemType := valType.Elem()
-	if val.CanSet() {
-		realVal := val
-		if realVal.IsNil() || d.config.ZeroFields {
-			realVal = reflect.New(valElemType)
-		}
-
-		if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil {
-			return err
-		}
-
-		val.Set(realVal)
-	} else {
-		if err := d.decode(name, data, reflect.Indirect(val)); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func (d *Decoder) decodeFunc(name string, data interface{}, val reflect.Value) error {
-	// Create an element of the concrete (non pointer) type and decode
-	// into that. Then set the value of the pointer to this type.
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	if val.Type() != dataVal.Type() {
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-	val.Set(dataVal)
-	return nil
-}
-
-func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataValKind := dataVal.Kind()
-	valType := val.Type()
-	valElemType := valType.Elem()
-	sliceType := reflect.SliceOf(valElemType)
-
-	valSlice := val
-	if valSlice.IsNil() || d.config.ZeroFields {
-		if d.config.WeaklyTypedInput {
-			switch {
-			// Slice and array we use the normal logic
-			case dataValKind == reflect.Slice, dataValKind == reflect.Array:
-				break
-
-			// Empty maps turn into empty slices
-			case dataValKind == reflect.Map:
-				if dataVal.Len() == 0 {
-					val.Set(reflect.MakeSlice(sliceType, 0, 0))
-					return nil
-				}
-				// Create slice of maps of other sizes
-				return d.decodeSlice(name, []interface{}{data}, val)
-
-			case dataValKind == reflect.String && valElemType.Kind() == reflect.Uint8:
-				return d.decodeSlice(name, []byte(dataVal.String()), val)
-
-			// All other types we try to convert to the slice type
-			// and "lift" it into it. i.e. a string becomes a string slice.
-			default:
-				// Just re-try this function with data as a slice.
-				return d.decodeSlice(name, []interface{}{data}, val)
-			}
-		}
-
-		// Check input type
-		if dataValKind != reflect.Array && dataValKind != reflect.Slice {
-			return fmt.Errorf(
-				"'%s': source data must be an array or slice, got %s", name, dataValKind)
-
-		}
-
-		// If the input value is empty, then don't allocate since non-nil != nil
-		if dataVal.Len() == 0 {
-			return nil
-		}
-
-		// Make a new slice to hold our result, same size as the original data.
-		valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len())
-	}
-
-	// Accumulate any errors
-	errors := make([]string, 0)
-
-	for i := 0; i < dataVal.Len(); i++ {
-		currentData := dataVal.Index(i).Interface()
-		for valSlice.Len() <= i {
-			valSlice = reflect.Append(valSlice, reflect.Zero(valElemType))
-		}
-		currentField := valSlice.Index(i)
-
-		fieldName := fmt.Sprintf("%s[%d]", name, i)
-		if err := d.decode(fieldName, currentData, currentField); err != nil {
-			errors = appendErrors(errors, err)
-		}
-	}
-
-	// Finally, set the value to the slice we built up
-	val.Set(valSlice)
-
-	// If there were errors, we return those
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeArray(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataValKind := dataVal.Kind()
-	valType := val.Type()
-	valElemType := valType.Elem()
-	arrayType := reflect.ArrayOf(valType.Len(), valElemType)
-
-	valArray := val
-
-	if valArray.Interface() == reflect.Zero(valArray.Type()).Interface() || d.config.ZeroFields {
-		// Check input type
-		if dataValKind != reflect.Array && dataValKind != reflect.Slice {
-			if d.config.WeaklyTypedInput {
-				switch {
-				// Empty maps turn into empty arrays
-				case dataValKind == reflect.Map:
-					if dataVal.Len() == 0 {
-						val.Set(reflect.Zero(arrayType))
-						return nil
-					}
-
-				// All other types we try to convert to the array type
-				// and "lift" it into it. i.e. a string becomes a string array.
-				default:
-					// Just re-try this function with data as a slice.
-					return d.decodeArray(name, []interface{}{data}, val)
-				}
-			}
-
-			return fmt.Errorf(
-				"'%s': source data must be an array or slice, got %s", name, dataValKind)
-
-		}
-		if dataVal.Len() > arrayType.Len() {
-			return fmt.Errorf(
-				"'%s': expected source data to have length less or equal to %d, got %d", name, arrayType.Len(), dataVal.Len())
-
-		}
-
-		// Make a new array to hold our result, same size as the original data.
-		valArray = reflect.New(arrayType).Elem()
-	}
-
-	// Accumulate any errors
-	errors := make([]string, 0)
-
-	for i := 0; i < dataVal.Len(); i++ {
-		currentData := dataVal.Index(i).Interface()
-		currentField := valArray.Index(i)
-
-		fieldName := fmt.Sprintf("%s[%d]", name, i)
-		if err := d.decode(fieldName, currentData, currentField); err != nil {
-			errors = appendErrors(errors, err)
-		}
-	}
-
-	// Finally, set the value to the array we built up
-	val.Set(valArray)
-
-	// If there were errors, we return those
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeStruct(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-
-	// If the type of the value to write to and the data match directly,
-	// then we just set it directly instead of recursing into the structure.
-	if dataVal.Type() == val.Type() {
-		val.Set(dataVal)
-		return nil
-	}
-
-	dataValKind := dataVal.Kind()
-	switch dataValKind {
-	case reflect.Map:
-		return d.decodeStructFromMap(name, dataVal, val)
-
-	case reflect.Struct:
-		// Not the most efficient way to do this but we can optimize later if
-		// we want to. To convert from struct to struct we go to map first
-		// as an intermediary.
-		m := make(map[string]interface{})
-		mval := reflect.Indirect(reflect.ValueOf(&m))
-		if err := d.decodeMapFromStruct(name, dataVal, mval, mval); err != nil {
-			return err
-		}
-
-		result := d.decodeStructFromMap(name, mval, val)
-		return result
-
-	default:
-		return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind())
-	}
-}
-
-func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) error {
-	dataValType := dataVal.Type()
-	if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface {
-		return fmt.Errorf(
-			"'%s' needs a map with string keys, has '%s' keys",
-			name, dataValType.Key().Kind())
-	}
-
-	dataValKeys := make(map[reflect.Value]struct{})
-	dataValKeysUnused := make(map[interface{}]struct{})
-	for _, dataValKey := range dataVal.MapKeys() {
-		dataValKeys[dataValKey] = struct{}{}
-		dataValKeysUnused[dataValKey.Interface()] = struct{}{}
-	}
-
-	errors := make([]string, 0)
-
-	// This slice will keep track of all the structs we'll be decoding.
-	// There can be more than one struct if there are embedded structs
-	// that are squashed.
-	structs := make([]reflect.Value, 1, 5)
-	structs[0] = val
-
-	// Compile the list of all the fields that we're going to be decoding
-	// from all the structs.
-	type field struct {
-		field reflect.StructField
-		val   reflect.Value
-	}
-	fields := []field{}
-	for len(structs) > 0 {
-		structVal := structs[0]
-		structs = structs[1:]
-
-		structType := structVal.Type()
-
-		for i := 0; i < structType.NumField(); i++ {
-			fieldType := structType.Field(i)
-			fieldKind := fieldType.Type.Kind()
-
-			// If "squash" is specified in the tag, we squash the field down.
-			squash := false
-			tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",")
-			for _, tag := range tagParts[1:] {
-				if tag == "squash" {
-					squash = true
-					break
-				}
-			}
-
-			if squash {
-				if fieldKind != reflect.Struct {
-					errors = appendErrors(errors,
-						fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldKind))
-				} else {
-					structs = append(structs, structVal.FieldByName(fieldType.Name))
-				}
-				continue
-			}
-
-			// Normal struct field, store it away
-			fields = append(fields, field{fieldType, structVal.Field(i)})
-		}
-	}
-
-	// for fieldType, field := range fields {
-	for _, f := range fields {
-		field, fieldValue := f.field, f.val
-		fieldName := field.Name
-
-		tagValue := field.Tag.Get(d.config.TagName)
-		tagValue = strings.SplitN(tagValue, ",", 2)[0]
-		if tagValue != "" {
-			fieldName = tagValue
-		}
-
-		rawMapKey := reflect.ValueOf(fieldName)
-		rawMapVal := dataVal.MapIndex(rawMapKey)
-		if !rawMapVal.IsValid() {
-			// Do a slower search by iterating over each key and
-			// doing case-insensitive search.
-			for dataValKey := range dataValKeys {
-				mK, ok := dataValKey.Interface().(string)
-				if !ok {
-					// Not a string key
-					continue
-				}
-
-				if strings.EqualFold(mK, fieldName) {
-					rawMapKey = dataValKey
-					rawMapVal = dataVal.MapIndex(dataValKey)
-					break
-				}
-			}
-
-			if !rawMapVal.IsValid() {
-				// There was no matching key in the map for the value in
-				// the struct. Just ignore.
-				continue
-			}
-		}
-
-		// Delete the key we're using from the unused map so we stop tracking
-		delete(dataValKeysUnused, rawMapKey.Interface())
-
-		if !fieldValue.IsValid() {
-			// This should never happen
-			panic("field is not valid")
-		}
-
-		// If we can't set the field, then it is unexported or something,
-		// and we just continue onwards.
-		if !fieldValue.CanSet() {
-			continue
-		}
-
-		// If the name is empty string, then we're at the root, and we
-		// don't dot-join the fields.
-		if name != "" {
-			fieldName = fmt.Sprintf("%s.%s", name, fieldName)
-		}
-
-		if err := d.decode(fieldName, rawMapVal.Interface(), fieldValue); err != nil {
-			errors = appendErrors(errors, err)
-		}
-	}
-
-	if d.config.ErrorUnused && len(dataValKeysUnused) > 0 {
-		keys := make([]string, 0, len(dataValKeysUnused))
-		for rawKey := range dataValKeysUnused {
-			keys = append(keys, rawKey.(string))
-		}
-		sort.Strings(keys)
-
-		err := fmt.Errorf("'%s' has invalid keys: %s", name, strings.Join(keys, ", "))
-		errors = appendErrors(errors, err)
-	}
-
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	// Add the unused keys to the list of unused keys if we're tracking metadata
-	if d.config.Metadata != nil {
-		for rawKey := range dataValKeysUnused {
-			key := rawKey.(string)
-			if name != "" {
-				key = fmt.Sprintf("%s.%s", name, key)
-			}
-
-			d.config.Metadata.Unused = append(d.config.Metadata.Unused, key)
-		}
-	}
-
-	return nil
-}
-
-func getKind(val reflect.Value) reflect.Kind {
-	kind := val.Kind()
-
-	switch {
-	case kind >= reflect.Int && kind <= reflect.Int64:
-		return reflect.Int
-	case kind >= reflect.Uint && kind <= reflect.Uint64:
-		return reflect.Uint
-	case kind >= reflect.Float32 && kind <= reflect.Float64:
-		return reflect.Float32
-	default:
-		return kind
-	}
-}
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/config/configmanager.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/config/configmanager.go
index 4b1c841..8350225 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/config/configmanager.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/config/configmanager.go
@@ -29,7 +29,7 @@
 
 const (
 	defaultkvStoreConfigPath     = "config"
-	defaultkvStoreDataPathPrefix = "service/voltha"
+	defaultkvStoreDataPathPrefix = "service/voltha_voltha"
 	kvStorePathSeparator         = "/"
 )
 
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/backend.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/backend.go
index d6867a5..bf30a48 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/backend.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/backend.go
@@ -75,8 +75,6 @@
 
 func (b *Backend) newClient(ctx context.Context, address string, timeout time.Duration) (kvstore.Client, error) {
 	switch b.StoreType {
-	case "consul":
-		return kvstore.NewConsulClient(ctx, address, timeout)
 	case "etcd":
 		return kvstore.NewEtcdClient(ctx, address, timeout, log.WarnLevel)
 	}
@@ -170,9 +168,6 @@
 			case codes.DataLoss:
 				alive = false
 			}
-
-			//} else {
-			// TODO: Implement for consul backend; would it be needed ever?
 		}
 	}
 
@@ -239,6 +234,21 @@
 	return err
 }
 
+// DeleteWithPrefix removes items having prefix key
+func (b *Backend) DeleteWithPrefix(ctx context.Context, prefixKey string) error {
+	span, ctx := log.CreateChildSpan(ctx, "etcd-delete-with-prefix")
+	defer span.Finish()
+
+	formattedPath := b.makePath(ctx, prefixKey)
+	logger.Debugw(ctx, "deleting-prefix-key", log.Fields{"key": prefixKey, "path": formattedPath})
+
+	err := b.Client.DeleteWithPrefix(ctx, formattedPath)
+
+	b.updateLiveness(ctx, b.isErrorIndicatingAliveKvstore(ctx, err))
+
+	return err
+}
+
 // CreateWatch starts watching events for the specified key
 func (b *Backend) CreateWatch(ctx context.Context, key string, withPrefix bool) chan *kvstore.Event {
 	span, ctx := log.CreateChildSpan(ctx, "etcd-create-watch")
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/client.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/client.go
index 480d476..b35f1f3 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/client.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/client.go
@@ -21,8 +21,6 @@
 )
 
 const (
-	// Default timeout in seconds when making a kvstore request
-	defaultKVGetTimeout = 5 * time.Second
 	// Maximum channel buffer between publisher/subscriber goroutines
 	maxClientChannelBufferSize = 10
 )
@@ -80,6 +78,7 @@
 	Get(ctx context.Context, key string) (*KVPair, error)
 	Put(ctx context.Context, key string, value interface{}) error
 	Delete(ctx context.Context, key string) error
+	DeleteWithPrefix(ctx context.Context, prefixKey string) error
 	Reserve(ctx context.Context, key string, value interface{}, ttl time.Duration) (interface{}, error)
 	ReleaseReservation(ctx context.Context, key string) error
 	ReleaseAllReservations(ctx context.Context) error
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/consulclient.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/consulclient.go
deleted file mode 100644
index 2593608..0000000
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/consulclient.go
+++ /dev/null
@@ -1,512 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package kvstore
-
-import (
-	"bytes"
-	"context"
-	"errors"
-	log "github.com/opencord/voltha-lib-go/v4/pkg/log"
-	"sync"
-	"time"
-	//log "ciena.com/coordinator/common"
-	consulapi "github.com/hashicorp/consul/api"
-)
-
-type channelContextMap struct {
-	ctx     context.Context
-	channel chan *Event
-	cancel  context.CancelFunc
-}
-
-// ConsulClient represents the consul KV store client
-type ConsulClient struct {
-	session                *consulapi.Session
-	sessionID              string
-	consul                 *consulapi.Client
-	doneCh                 *chan int
-	keyReservations        map[string]interface{}
-	watchedChannelsContext map[string][]*channelContextMap
-	writeLock              sync.Mutex
-}
-
-// NewConsulClient returns a new client for the Consul KV store
-func NewConsulClient(ctx context.Context, addr string, timeout time.Duration) (*ConsulClient, error) {
-	config := consulapi.DefaultConfig()
-	config.Address = addr
-	config.WaitTime = timeout
-	consul, err := consulapi.NewClient(config)
-	if err != nil {
-		logger.Error(ctx, err)
-		return nil, err
-	}
-
-	doneCh := make(chan int, 1)
-	wChannelsContext := make(map[string][]*channelContextMap)
-	reservations := make(map[string]interface{})
-	return &ConsulClient{consul: consul, doneCh: &doneCh, watchedChannelsContext: wChannelsContext, keyReservations: reservations}, nil
-}
-
-// IsConnectionUp returns whether the connection to the Consul KV store is up
-func (c *ConsulClient) IsConnectionUp(ctx context.Context) bool {
-	logger.Error(ctx, "Unimplemented function")
-	return false
-}
-
-// List returns an array of key-value pairs with key as a prefix.  Timeout defines how long the function will
-// wait for a response
-func (c *ConsulClient) List(ctx context.Context, key string) (map[string]*KVPair, error) {
-
-	deadline, _ := ctx.Deadline()
-	kv := c.consul.KV()
-	var queryOptions consulapi.QueryOptions
-	// Substract current time from deadline to get the waitTime duration
-	queryOptions.WaitTime = time.Until(deadline)
-
-	// For now we ignore meta data
-	kvps, _, err := kv.List(key, &queryOptions)
-	if err != nil {
-		logger.Error(ctx, err)
-		return nil, err
-	}
-	m := make(map[string]*KVPair)
-	for _, kvp := range kvps {
-		m[string(kvp.Key)] = NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0, -1)
-	}
-	return m, nil
-}
-
-// Get returns a key-value pair for a given key. Timeout defines how long the function will
-// wait for a response
-func (c *ConsulClient) Get(ctx context.Context, key string) (*KVPair, error) {
-
-	deadline, _ := ctx.Deadline()
-	kv := c.consul.KV()
-	var queryOptions consulapi.QueryOptions
-	// Substract current time from deadline to get the waitTime duration
-	queryOptions.WaitTime = time.Until(deadline)
-
-	// For now we ignore meta data
-	kvp, _, err := kv.Get(key, &queryOptions)
-	if err != nil {
-		logger.Error(ctx, err)
-		return nil, err
-	}
-	if kvp != nil {
-		return NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0, -1), nil
-	}
-
-	return nil, nil
-}
-
-// Put writes a key-value pair to the KV store.  Value can only be a string or []byte since the consul API
-// accepts only a []byte as a value for a put operation. Timeout defines how long the function will
-// wait for a response
-func (c *ConsulClient) Put(ctx context.Context, key string, value interface{}) error {
-
-	// Validate that we can create a byte array from the value as consul API expects a byte array
-	var val []byte
-	var er error
-	if val, er = ToByte(value); er != nil {
-		logger.Error(ctx, er)
-		return er
-	}
-
-	// Create a key value pair
-	kvp := consulapi.KVPair{Key: key, Value: val}
-	kv := c.consul.KV()
-	var writeOptions consulapi.WriteOptions
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-	_, err := kv.Put(&kvp, &writeOptions)
-	if err != nil {
-		logger.Error(ctx, err)
-		return err
-	}
-	return nil
-}
-
-// Delete removes a key from the KV store. Timeout defines how long the function will
-// wait for a response
-func (c *ConsulClient) Delete(ctx context.Context, key string) error {
-	kv := c.consul.KV()
-	var writeOptions consulapi.WriteOptions
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-	_, err := kv.Delete(key, &writeOptions)
-	if err != nil {
-		logger.Error(ctx, err)
-		return err
-	}
-	return nil
-}
-
-func (c *ConsulClient) deleteSession(ctx context.Context) {
-	if c.sessionID != "" {
-		logger.Debug(ctx, "cleaning-up-session")
-		session := c.consul.Session()
-		_, err := session.Destroy(c.sessionID, nil)
-		if err != nil {
-			logger.Errorw(ctx, "error-cleaning-session", log.Fields{"session": c.sessionID, "error": err})
-		}
-	}
-	c.sessionID = ""
-	c.session = nil
-}
-
-func (c *ConsulClient) createSession(ctx context.Context, ttl time.Duration, retries int) (*consulapi.Session, string, error) {
-	session := c.consul.Session()
-	entry := &consulapi.SessionEntry{
-		Behavior: consulapi.SessionBehaviorDelete,
-		TTL:      ttl.String(),
-	}
-
-	for {
-		id, meta, err := session.Create(entry, nil)
-		if err != nil {
-			logger.Errorw(ctx, "create-session-error", log.Fields{"error": err})
-			if retries == 0 {
-				return nil, "", err
-			}
-		} else if meta.RequestTime == 0 {
-			logger.Errorw(ctx, "create-session-bad-meta-data", log.Fields{"meta-data": meta})
-			if retries == 0 {
-				return nil, "", errors.New("bad-meta-data")
-			}
-		} else if id == "" {
-			logger.Error(ctx, "create-session-nil-id")
-			if retries == 0 {
-				return nil, "", errors.New("ID-nil")
-			}
-		} else {
-			return session, id, nil
-		}
-		// If retry param is -1 we will retry indefinitely
-		if retries > 0 {
-			retries--
-		}
-		logger.Debug(ctx, "retrying-session-create-after-a-second-delay")
-		time.Sleep(time.Duration(1) * time.Second)
-	}
-}
-
-// Helper function to verify mostly whether the content of two interface types are the same.  Focus is []byte and
-// string types
-func isEqual(val1 interface{}, val2 interface{}) bool {
-	b1, err := ToByte(val1)
-	b2, er := ToByte(val2)
-	if err == nil && er == nil {
-		return bytes.Equal(b1, b2)
-	}
-	return val1 == val2
-}
-
-// Reserve is invoked to acquire a key and set it to a given value. Value can only be a string or []byte since
-// the consul API accepts only a []byte.  Timeout defines how long the function will wait for a response.  TTL
-// defines how long that reservation is valid.  When TTL expires the key is unreserved by the KV store itself.
-// If the key is acquired then the value returned will be the value passed in.  If the key is already acquired
-// then the value assigned to that key will be returned.
-func (c *ConsulClient) Reserve(ctx context.Context, key string, value interface{}, ttl time.Duration) (interface{}, error) {
-
-	// Validate that we can create a byte array from the value as consul API expects a byte array
-	var val []byte
-	var er error
-	if val, er = ToByte(value); er != nil {
-		logger.Error(ctx, er)
-		return nil, er
-	}
-
-	// Cleanup any existing session and recreate new ones.  A key is reserved against a session
-	if c.sessionID != "" {
-		c.deleteSession(ctx)
-	}
-
-	// Clear session if reservation is not successful
-	reservationSuccessful := false
-	defer func() {
-		if !reservationSuccessful {
-			logger.Debug(ctx, "deleting-session")
-			c.deleteSession(ctx)
-		}
-	}()
-
-	session, sessionID, err := c.createSession(ctx, ttl, -1)
-	if err != nil {
-		logger.Errorw(ctx, "no-session-created", log.Fields{"error": err})
-		return "", errors.New("no-session-created")
-	}
-	logger.Debugw(ctx, "session-created", log.Fields{"session-id": sessionID})
-	c.sessionID = sessionID
-	c.session = session
-
-	// Try to grap the Key using the session
-	kv := c.consul.KV()
-	kvp := consulapi.KVPair{Key: key, Value: val, Session: c.sessionID}
-	result, _, err := kv.Acquire(&kvp, nil)
-	if err != nil {
-		logger.Errorw(ctx, "error-acquiring-keys", log.Fields{"error": err})
-		return nil, err
-	}
-
-	logger.Debugw(ctx, "key-acquired", log.Fields{"key": key, "status": result})
-
-	// Irrespective whether we were successful in acquiring the key, let's read it back and see if it's us.
-	m, err := c.Get(ctx, key)
-	if err != nil {
-		return nil, err
-	}
-	if m != nil {
-		logger.Debugw(ctx, "response-received", log.Fields{"key": m.Key, "m.value": string(m.Value.([]byte)), "value": value})
-		if m.Key == key && isEqual(m.Value, value) {
-			// My reservation is successful - register it.  For now, support is only for 1 reservation per key
-			// per session.
-			reservationSuccessful = true
-			c.writeLock.Lock()
-			c.keyReservations[key] = m.Value
-			c.writeLock.Unlock()
-			return m.Value, nil
-		}
-		// My reservation has failed.  Return the owner of that key
-		return m.Value, nil
-	}
-	return nil, nil
-}
-
-// ReleaseAllReservations releases all key reservations previously made (using Reserve API)
-func (c *ConsulClient) ReleaseAllReservations(ctx context.Context) error {
-	kv := c.consul.KV()
-	var kvp consulapi.KVPair
-	var result bool
-	var err error
-
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-
-	for key, value := range c.keyReservations {
-		kvp = consulapi.KVPair{Key: key, Value: value.([]byte), Session: c.sessionID}
-		result, _, err = kv.Release(&kvp, nil)
-		if err != nil {
-			logger.Errorw(ctx, "cannot-release-reservation", log.Fields{"key": key, "error": err})
-			return err
-		}
-		if !result {
-			logger.Errorw(ctx, "cannot-release-reservation", log.Fields{"key": key})
-		}
-		delete(c.keyReservations, key)
-	}
-	return nil
-}
-
-// ReleaseReservation releases reservation for a specific key.
-func (c *ConsulClient) ReleaseReservation(ctx context.Context, key string) error {
-	var ok bool
-	var reservedValue interface{}
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-	if reservedValue, ok = c.keyReservations[key]; !ok {
-		return errors.New("key-not-reserved:" + key)
-	}
-	// Release the reservation
-	kv := c.consul.KV()
-	kvp := consulapi.KVPair{Key: key, Value: reservedValue.([]byte), Session: c.sessionID}
-
-	result, _, er := kv.Release(&kvp, nil)
-	if er != nil {
-		return er
-	}
-	// Remove that key entry on success
-	if result {
-		delete(c.keyReservations, key)
-		return nil
-	}
-	return errors.New("key-cannot-be-unreserved")
-}
-
-// RenewReservation renews a reservation.  A reservation will go stale after the specified TTL (Time To Live)
-// period specified when reserving the key
-func (c *ConsulClient) RenewReservation(ctx context.Context, key string) error {
-	// In the case of Consul, renew reservation of a reserve key only require renewing the client session.
-
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-
-	// Verify the key was reserved
-	if _, ok := c.keyReservations[key]; !ok {
-		return errors.New("key-not-reserved")
-	}
-
-	if c.session == nil {
-		return errors.New("no-session-exist")
-	}
-
-	var writeOptions consulapi.WriteOptions
-	if _, _, err := c.session.Renew(c.sessionID, &writeOptions); err != nil {
-		return err
-	}
-	return nil
-}
-
-// Watch provides the watch capability on a given key.  It returns a channel onto which the callee needs to
-// listen to receive Events.
-func (c *ConsulClient) Watch(ctx context.Context, key string, withPrefix bool) chan *Event {
-
-	// Create a new channel
-	ch := make(chan *Event, maxClientChannelBufferSize)
-
-	// Create a context to track this request
-	watchContext, cFunc := context.WithCancel(context.Background())
-
-	// Save the channel and context reference for later
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-	ccm := channelContextMap{channel: ch, ctx: watchContext, cancel: cFunc}
-	c.watchedChannelsContext[key] = append(c.watchedChannelsContext[key], &ccm)
-
-	// Launch a go routine to listen for updates
-	go c.listenForKeyChange(watchContext, key, ch)
-
-	return ch
-}
-
-// CloseWatch closes a specific watch. Both the key and the channel are required when closing a watch as there
-// may be multiple listeners on the same key.  The previously created channel serves as a key
-func (c *ConsulClient) CloseWatch(ctx context.Context, key string, ch chan *Event) {
-	// First close the context
-	var ok bool
-	var watchedChannelsContexts []*channelContextMap
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-	if watchedChannelsContexts, ok = c.watchedChannelsContext[key]; !ok {
-		logger.Errorw(ctx, "key-has-no-watched-context-or-channel", log.Fields{"key": key})
-		return
-	}
-	// Look for the channels
-	var pos = -1
-	for i, chCtxMap := range watchedChannelsContexts {
-		if chCtxMap.channel == ch {
-			logger.Debug(ctx, "channel-found")
-			chCtxMap.cancel()
-			//close the channel
-			close(ch)
-			pos = i
-			break
-		}
-	}
-	// Remove that entry if present
-	if pos >= 0 {
-		c.watchedChannelsContext[key] = append(c.watchedChannelsContext[key][:pos], c.watchedChannelsContext[key][pos+1:]...)
-	}
-	logger.Debugw(ctx, "watched-channel-exiting", log.Fields{"key": key, "channel": c.watchedChannelsContext[key]})
-}
-
-func (c *ConsulClient) isKVEqual(kv1 *consulapi.KVPair, kv2 *consulapi.KVPair) bool {
-	if (kv1 == nil) && (kv2 == nil) {
-		return true
-	} else if (kv1 == nil) || (kv2 == nil) {
-		return false
-	}
-	// Both the KV should be non-null here
-	if kv1.Key != kv2.Key ||
-		!bytes.Equal(kv1.Value, kv2.Value) ||
-		kv1.Session != kv2.Session ||
-		kv1.LockIndex != kv2.LockIndex ||
-		kv1.ModifyIndex != kv2.ModifyIndex {
-		return false
-	}
-	return true
-}
-
-func (c *ConsulClient) listenForKeyChange(ctx context.Context, key string, ch chan *Event) {
-	logger.Debugw(ctx, "start-watching-channel", log.Fields{"key": key, "channel": ch})
-
-	defer c.CloseWatch(ctx, key, ch)
-	kv := c.consul.KV()
-	var queryOptions consulapi.QueryOptions
-	queryOptions.WaitTime = defaultKVGetTimeout
-
-	// Get the existing value, if any
-	previousKVPair, meta, err := kv.Get(key, &queryOptions)
-	if err != nil {
-		logger.Debug(ctx, err)
-	}
-	lastIndex := meta.LastIndex
-
-	// Wait for change.  Push any change onto the channel and keep waiting for new update
-	//var waitOptions consulapi.QueryOptions
-	var pair *consulapi.KVPair
-	//watchContext, _ := context.WithCancel(context.Background())
-	waitOptions := queryOptions.WithContext(ctx)
-	for {
-		//waitOptions = consulapi.QueryOptions{WaitIndex: lastIndex}
-		waitOptions.WaitIndex = lastIndex
-		pair, meta, err = kv.Get(key, waitOptions)
-		select {
-		case <-ctx.Done():
-			logger.Debug(ctx, "done-event-received-exiting")
-			return
-		default:
-			if err != nil {
-				logger.Warnw(ctx, "error-from-watch", log.Fields{"error": err})
-				ch <- NewEvent(CONNECTIONDOWN, key, []byte(""), -1)
-			} else {
-				logger.Debugw(ctx, "index-state", log.Fields{"lastindex": lastIndex, "newindex": meta.LastIndex, "key": key})
-			}
-		}
-		if err != nil {
-			logger.Debug(ctx, err)
-			// On error, block for 10 milliseconds to prevent endless loop
-			time.Sleep(10 * time.Millisecond)
-		} else if meta.LastIndex <= lastIndex {
-			logger.Info(ctx, "no-index-change-or-negative")
-		} else {
-			logger.Debugw(ctx, "update-received", log.Fields{"pair": pair})
-			if pair == nil {
-				ch <- NewEvent(DELETE, key, []byte(""), -1)
-			} else if !c.isKVEqual(pair, previousKVPair) {
-				// Push the change onto the channel if the data has changed
-				// For now just assume it's a PUT change
-				logger.Debugw(ctx, "pair-details", log.Fields{"session": pair.Session, "key": pair.Key, "value": pair.Value})
-				ch <- NewEvent(PUT, pair.Key, pair.Value, -1)
-			}
-			previousKVPair = pair
-			lastIndex = meta.LastIndex
-		}
-	}
-}
-
-// Close closes the KV store client
-func (c *ConsulClient) Close(ctx context.Context) {
-	var writeOptions consulapi.WriteOptions
-	// Inform any goroutine it's time to say goodbye.
-	c.writeLock.Lock()
-	defer c.writeLock.Unlock()
-	if c.doneCh != nil {
-		close(*c.doneCh)
-	}
-
-	// Clear the sessionID
-	if _, err := c.consul.Session().Destroy(c.sessionID, &writeOptions); err != nil {
-		logger.Errorw(ctx, "error-closing-client", log.Fields{"error": err})
-	}
-}
-
-func (c *ConsulClient) AcquireLock(ctx context.Context, lockName string, timeout time.Duration) error {
-	return nil
-}
-
-func (c *ConsulClient) ReleaseLock(lockName string) error {
-	return nil
-}
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/etcdclient.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/etcdclient.go
index aa5adbf..98f0559 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/etcdclient.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/etcdclient.go
@@ -24,6 +24,7 @@
 
 	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	v3Client "go.etcd.io/etcd/clientv3"
+
 	v3Concurrency "go.etcd.io/etcd/clientv3/concurrency"
 	v3rpcTypes "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
 )
@@ -39,15 +40,10 @@
 	lockToMutexLock     sync.Mutex
 }
 
-// NewEtcdClient returns a new client for the Etcd KV store
-func NewEtcdClient(ctx context.Context, addr string, timeout time.Duration, level log.LogLevel) (*EtcdClient, error) {
-	logconfig := log.ConstructZapConfig(log.JSON, level, log.Fields{})
-
-	c, err := v3Client.New(v3Client.Config{
-		Endpoints:   []string{addr},
-		DialTimeout: timeout,
-		LogConfig:   &logconfig,
-	})
+// NewEtcdCustomClient returns a new client for the Etcd KV store allowing
+// the called to specify etcd client configuration
+func NewEtcdCustomClient(ctx context.Context, config *v3Client.Config) (*EtcdClient, error) {
+	c, err := v3Client.New(*config)
 	if err != nil {
 		logger.Error(ctx, err)
 		return nil, err
@@ -61,6 +57,18 @@
 		lockToSessionMap: lockSessionMap}, nil
 }
 
+// NewEtcdClient returns a new client for the Etcd KV store
+func NewEtcdClient(ctx context.Context, addr string, timeout time.Duration, level log.LogLevel) (*EtcdClient, error) {
+	logconfig := log.ConstructZapConfig(log.JSON, level, log.Fields{})
+
+	return NewEtcdCustomClient(
+		ctx,
+		&v3Client.Config{
+			Endpoints:   []string{addr},
+			DialTimeout: timeout,
+			LogConfig:   &logconfig})
+}
+
 // IsConnectionUp returns whether the connection to the Etcd KV store is up.  If a timeout occurs then
 // it is assumed the connection is down or unreachable.
 func (c *EtcdClient) IsConnectionUp(ctx context.Context) bool {
@@ -157,6 +165,17 @@
 	return nil
 }
 
+func (c *EtcdClient) DeleteWithPrefix(ctx context.Context, prefixKey string) error {
+
+	//delete the prefix
+	if _, err := c.ectdAPI.Delete(ctx, prefixKey, v3Client.WithPrefix()); err != nil {
+		logger.Errorw(ctx, "failed-to-delete-prefix-key", log.Fields{"key": prefixKey, "error": err})
+		return err
+	}
+	logger.Debugw(ctx, "key(s)-deleted", log.Fields{"key": prefixKey})
+	return nil
+}
+
 // Reserve is invoked to acquire a key and set it to a given value. Value can only be a string or []byte since
 // the etcd API accepts only a string.  Timeout defines how long the function will wait for a response.  TTL
 // defines how long that reservation is valid.  When TTL expires the key is unreserved by the KV store itself.
diff --git a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go
index 64e7d30..70bd977 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore/kvutils.go
@@ -15,7 +15,10 @@
  */
 package kvstore
 
-import "fmt"
+import (
+	"bytes"
+	"fmt"
+)
 
 // ToString converts an interface value to a string.  The interface should either be of
 // a string type or []byte.  Otherwise, an error is returned.
@@ -42,3 +45,14 @@
 		return nil, fmt.Errorf("unexpected-type-%T", t)
 	}
 }
+
+// Helper function to verify mostly whether the content of two interface types are the same.  Focus is []byte and
+// string types
+func isEqual(val1 interface{}, val2 interface{}) bool {
+	b1, err := ToByte(val1)
+	b2, er := ToByte(val2)
+	if err == nil && er == nil {
+		return bytes.Equal(b1, b2)
+	}
+	return val1 == val2
+}
diff --git a/vendor/github.com/opencord/voltha-protos/v4/go/common/common.pb.go b/vendor/github.com/opencord/voltha-protos/v4/go/common/common.pb.go
index 0956330..a370497 100644
--- a/vendor/github.com/opencord/voltha-protos/v4/go/common/common.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v4/go/common/common.pb.go
@@ -99,6 +99,8 @@
 	OperStatus_ACTIVE OperStatus_Types = 4
 	// The device has failed and cannot fulfill its intended role
 	OperStatus_FAILED OperStatus_Types = 5
+	// The device is reconciling
+	OperStatus_RECONCILING OperStatus_Types = 6
 )
 
 var OperStatus_Types_name = map[int32]string{
@@ -108,15 +110,17 @@
 	3: "TESTING",
 	4: "ACTIVE",
 	5: "FAILED",
+	6: "RECONCILING",
 }
 
 var OperStatus_Types_value = map[string]int32{
-	"UNKNOWN":    0,
-	"DISCOVERED": 1,
-	"ACTIVATING": 2,
-	"TESTING":    3,
-	"ACTIVE":     4,
-	"FAILED":     5,
+	"UNKNOWN":     0,
+	"DISCOVERED":  1,
+	"ACTIVATING":  2,
+	"TESTING":     3,
+	"ACTIVE":      4,
+	"FAILED":      5,
+	"RECONCILING": 6,
 }
 
 func (x OperStatus_Types) String() string {
@@ -165,18 +169,21 @@
 	OperationResp_OPERATION_SUCCESS     OperationResp_OperationReturnCode = 0
 	OperationResp_OPERATION_FAILURE     OperationResp_OperationReturnCode = 1
 	OperationResp_OPERATION_UNSUPPORTED OperationResp_OperationReturnCode = 2
+	OperationResp_OPERATION_IN_PROGRESS OperationResp_OperationReturnCode = 3
 )
 
 var OperationResp_OperationReturnCode_name = map[int32]string{
 	0: "OPERATION_SUCCESS",
 	1: "OPERATION_FAILURE",
 	2: "OPERATION_UNSUPPORTED",
+	3: "OPERATION_IN_PROGRESS",
 }
 
 var OperationResp_OperationReturnCode_value = map[string]int32{
 	"OPERATION_SUCCESS":     0,
 	"OPERATION_FAILURE":     1,
 	"OPERATION_UNSUPPORTED": 2,
+	"OPERATION_IN_PROGRESS": 3,
 }
 
 func (x OperationResp_OperationReturnCode) String() string {
@@ -596,43 +603,44 @@
 func init() { proto.RegisterFile("voltha_protos/common.proto", fileDescriptor_c2e3fd231961e826) }
 
 var fileDescriptor_c2e3fd231961e826 = []byte{
-	// 598 bytes of a gzipped FileDescriptorProto
+	// 619 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x5f, 0x4f, 0xdb, 0x3e,
-	0x14, 0x6d, 0xd2, 0x96, 0x1f, 0xbd, 0xa5, 0x21, 0x3f, 0x03, 0x53, 0x87, 0x26, 0xad, 0xca, 0x0b,
-	0x6c, 0x62, 0xad, 0xc4, 0x78, 0xdd, 0x43, 0x48, 0x3c, 0x66, 0x01, 0x4e, 0xe5, 0x24, 0x45, 0xf0,
-	0xb0, 0x2a, 0x34, 0xa6, 0x44, 0xa2, 0x71, 0x94, 0xb8, 0x48, 0x7c, 0xd2, 0x7d, 0x9d, 0xc9, 0x4e,
-	0xf9, 0x37, 0xf5, 0x25, 0xf1, 0xb9, 0xe7, 0xe4, 0x1e, 0xdf, 0xe3, 0x18, 0xf6, 0x1f, 0xc5, 0x83,
-	0xbc, 0x4f, 0xa6, 0x45, 0x29, 0xa4, 0xa8, 0x46, 0x33, 0xb1, 0x58, 0x88, 0x7c, 0xa8, 0x11, 0xda,
-	0xa8, 0x91, 0xb3, 0x0b, 0x26, 0xf1, 0x91, 0x05, 0x66, 0x96, 0xf6, 0x8d, 0x81, 0x71, 0xd8, 0x61,
-	0x66, 0x96, 0x3a, 0x07, 0xd0, 0x24, 0x7e, 0x85, 0x06, 0xd0, 0xce, 0x24, 0x5f, 0x54, 0x7d, 0x63,
-	0xd0, 0x3c, 0xec, 0x1e, 0xc3, 0x70, 0xd5, 0x82, 0xf8, 0xac, 0x26, 0x9c, 0x7b, 0x00, 0x37, 0x5d,
-	0x64, 0x79, 0x28, 0x13, 0xc9, 0x9d, 0x1b, 0x68, 0x47, 0x4f, 0x05, 0xaf, 0x50, 0x17, 0xfe, 0x8b,
-	0xe9, 0x39, 0x0d, 0xae, 0xa8, 0xdd, 0x40, 0x08, 0xac, 0x31, 0xc3, 0x63, 0x16, 0x4c, 0x48, 0x48,
-	0x02, 0x8a, 0x7d, 0xdb, 0x50, 0x02, 0x4c, 0xdd, 0xd3, 0x0b, 0xec, 0xdb, 0x26, 0xda, 0x82, 0x4d,
-	0x9f, 0x84, 0x35, 0x6a, 0xa2, 0x3d, 0xf8, 0xdf, 0x0f, 0xae, 0xe8, 0x45, 0xe0, 0xfa, 0x84, 0x9e,
-	0x4d, 0xc9, 0xa5, 0x7b, 0x86, 0xed, 0x96, 0x33, 0x07, 0x08, 0x0a, 0x5e, 0x2a, 0xa3, 0x65, 0xe5,
-	0x5c, 0xaf, 0x75, 0xb2, 0x00, 0x7c, 0x12, 0x7a, 0xc1, 0x04, 0x33, 0xed, 0x62, 0x01, 0xb8, 0x5e,
-	0x44, 0x26, 0x6e, 0x44, 0xe8, 0x99, 0x6d, 0x2a, 0x71, 0x84, 0x43, 0x0d, 0x9a, 0x08, 0x60, 0x43,
-	0x93, 0xd8, 0x6e, 0xa9, 0xf5, 0x4f, 0x97, 0x28, 0xff, 0xb6, 0x83, 0xa1, 0xe7, 0x89, 0x3c, 0xe7,
-	0x33, 0xb9, 0xf2, 0x3a, 0x59, 0xeb, 0xb5, 0x0d, 0xdd, 0x98, 0x32, 0xec, 0x7a, 0xbf, 0xd4, 0xc6,
-	0x6d, 0x03, 0xf5, 0xa0, 0xf3, 0x0a, 0x4d, 0xe7, 0x8f, 0x01, 0x3d, 0xb5, 0xe1, 0x44, 0x66, 0x22,
-	0x67, 0xbc, 0x2a, 0xd0, 0x0f, 0x68, 0xcd, 0x44, 0xca, 0x75, 0xcc, 0xd6, 0xf1, 0x97, 0xe7, 0x30,
-	0xdf, 0x89, 0xde, 0x22, 0xb9, 0x2c, 0x73, 0x4f, 0xa4, 0x9c, 0xe9, 0xcf, 0xd0, 0x01, 0x6c, 0x27,
-	0x69, 0x9a, 0x29, 0x2e, 0x79, 0x98, 0x66, 0xf9, 0x9d, 0xe8, 0x9b, 0xfa, 0xc0, 0xac, 0xd7, 0x32,
-	0xc9, 0xef, 0x84, 0xf3, 0x1b, 0x76, 0xd6, 0x74, 0x51, 0xb9, 0x06, 0x63, 0xcc, 0xdc, 0x88, 0x04,
-	0x74, 0x1a, 0xc6, 0x9e, 0x87, 0xc3, 0xd0, 0x6e, 0xbc, 0x2f, 0xab, 0x10, 0x62, 0xa6, 0xa6, 0xf9,
-	0x08, 0x7b, 0xaf, 0xe5, 0x98, 0x86, 0xf1, 0x78, 0x1c, 0xb0, 0x48, 0x1d, 0x97, 0x73, 0x04, 0x9d,
-	0x49, 0xf2, 0xb0, 0xe4, 0x2a, 0x14, 0xe7, 0x33, 0xb4, 0xd4, 0x1b, 0x75, 0xa0, 0x8d, 0x2f, 0xc7,
-	0xd1, 0xb5, 0xdd, 0x58, 0x1d, 0x67, 0xe4, 0x52, 0x0f, 0xdb, 0x86, 0x43, 0xc1, 0xd2, 0xea, 0xb0,
-	0xe0, 0xb3, 0xec, 0x2e, 0xe3, 0xe5, 0xbf, 0x3f, 0x1b, 0x3a, 0x82, 0xf6, 0xa3, 0x52, 0xe8, 0x71,
-	0xac, 0xe3, 0x0f, 0xcf, 0xc1, 0xbc, 0x98, 0x0c, 0xd5, 0x83, 0xd5, 0x22, 0x47, 0xc2, 0x56, 0x3d,
-	0x94, 0xa6, 0x2b, 0x64, 0x43, 0x33, 0xe4, 0x52, 0xb7, 0xeb, 0x31, 0xb5, 0x44, 0x03, 0xe8, 0xc6,
-	0x79, 0xb5, 0x2c, 0x0a, 0x51, 0x4a, 0x9e, 0xea, 0xae, 0x3d, 0xf6, 0xb6, 0x84, 0x76, 0xa1, 0x8d,
-	0xcb, 0x52, 0x94, 0xfd, 0xa6, 0xe6, 0x6a, 0x80, 0xf6, 0x61, 0xd3, 0xcf, 0x2a, 0x99, 0xe4, 0x33,
-	0xde, 0x6f, 0x69, 0xe2, 0x05, 0x7f, 0xfd, 0x04, 0x5b, 0x11, 0xaf, 0xe4, 0xa5, 0x48, 0xf9, 0x39,
-	0x7f, 0xaa, 0xd4, 0x8c, 0x49, 0x91, 0x4d, 0x25, 0xaf, 0xa4, 0xdd, 0x38, 0xc5, 0xb0, 0x23, 0xca,
-	0xf9, 0x50, 0x14, 0x3c, 0x9f, 0x89, 0x32, 0x1d, 0xd6, 0xf7, 0xee, 0x66, 0x38, 0xcf, 0xe4, 0xfd,
-	0xf2, 0x56, 0xcd, 0x33, 0x7a, 0xe6, 0x46, 0x35, 0xf7, 0x6d, 0x75, 0x27, 0x1f, 0x4f, 0x46, 0x73,
-	0xb1, 0xba, 0x99, 0xb7, 0x1b, 0xba, 0xf8, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x32,
-	0x70, 0x38, 0xb8, 0x03, 0x00, 0x00,
+	0x14, 0x6d, 0x9b, 0xb6, 0x3f, 0x7a, 0x4b, 0x43, 0x7e, 0x06, 0xa6, 0x0e, 0x4d, 0x5a, 0x95, 0x17,
+	0xd8, 0xc4, 0x5a, 0x89, 0xf1, 0xba, 0x87, 0x90, 0x78, 0x9d, 0x05, 0x38, 0x91, 0x93, 0x14, 0x8d,
+	0x97, 0x2a, 0x34, 0x06, 0x32, 0xd1, 0x38, 0x4a, 0x5c, 0x34, 0xbe, 0xf6, 0x3e, 0xc1, 0x64, 0xa7,
+	0xfc, 0x9b, 0x78, 0x49, 0x7c, 0xee, 0x39, 0xb9, 0x47, 0xe7, 0x3a, 0x17, 0xf6, 0xee, 0xc5, 0x9d,
+	0xbc, 0x4d, 0xe6, 0x45, 0x29, 0xa4, 0xa8, 0x26, 0x0b, 0xb1, 0x5c, 0x8a, 0x7c, 0xac, 0x11, 0xea,
+	0xd6, 0xc8, 0xde, 0x81, 0x16, 0xf1, 0x90, 0x09, 0xad, 0x2c, 0x1d, 0x36, 0x47, 0xcd, 0x83, 0x1e,
+	0x6b, 0x65, 0xa9, 0xbd, 0x0f, 0x06, 0xf1, 0x2a, 0x34, 0x82, 0x4e, 0x26, 0xf9, 0xb2, 0x1a, 0x36,
+	0x47, 0xc6, 0x41, 0xff, 0x08, 0xc6, 0xeb, 0x16, 0xc4, 0x63, 0x35, 0x61, 0xdf, 0x02, 0x38, 0xe9,
+	0x32, 0xcb, 0x43, 0x99, 0x48, 0x6e, 0x5f, 0x42, 0x27, 0x7a, 0x28, 0x78, 0x85, 0xfa, 0xf0, 0x5f,
+	0x4c, 0x4f, 0xa9, 0x7f, 0x41, 0xad, 0x06, 0x42, 0x60, 0x06, 0x0c, 0x07, 0xcc, 0x9f, 0x91, 0x90,
+	0xf8, 0x14, 0x7b, 0x56, 0x53, 0x09, 0x30, 0x75, 0x4e, 0xce, 0xb0, 0x67, 0xb5, 0xd0, 0x26, 0x6c,
+	0x78, 0x24, 0xac, 0x91, 0x81, 0x76, 0xe1, 0x7f, 0xcf, 0xbf, 0xa0, 0x67, 0xbe, 0xe3, 0x11, 0x3a,
+	0x9d, 0x93, 0x73, 0x67, 0x8a, 0xad, 0xb6, 0xfd, 0x1b, 0xc0, 0x2f, 0x78, 0xa9, 0x8c, 0x56, 0x95,
+	0xfd, 0xeb, 0x4d, 0x27, 0x13, 0xc0, 0x23, 0xa1, 0xeb, 0xcf, 0x30, 0xd3, 0x2e, 0x26, 0x80, 0xe3,
+	0x46, 0x64, 0xe6, 0x44, 0x84, 0x4e, 0xad, 0x96, 0x12, 0x47, 0x38, 0xd4, 0xc0, 0x40, 0x00, 0x5d,
+	0x4d, 0x62, 0xab, 0xad, 0xce, 0xdf, 0x1d, 0xa2, 0xfc, 0x3b, 0x68, 0x0b, 0xfa, 0x0c, 0xbb, 0x3e,
+	0x75, 0xc9, 0x99, 0x12, 0x76, 0x6d, 0x0c, 0x03, 0x57, 0xe4, 0x39, 0x5f, 0xc8, 0xb5, 0xf9, 0xf1,
+	0x9b, 0xe6, 0x5b, 0xd0, 0x8f, 0x29, 0xc3, 0x8e, 0xfb, 0x43, 0x25, 0xb1, 0x9a, 0x68, 0x00, 0xbd,
+	0x67, 0xd8, 0xb2, 0xff, 0x34, 0x61, 0xa0, 0x12, 0x24, 0x32, 0x13, 0x39, 0xe3, 0x55, 0x81, 0xbe,
+	0x41, 0x7b, 0x21, 0x52, 0xae, 0xe7, 0x6e, 0x1e, 0x7d, 0x7a, 0x9c, 0xee, 0x2b, 0xd1, 0x4b, 0x24,
+	0x57, 0x65, 0xee, 0x8a, 0x94, 0x33, 0xfd, 0x19, 0xda, 0x87, 0xad, 0x24, 0x4d, 0x33, 0xc5, 0x25,
+	0x77, 0xf3, 0x2c, 0xbf, 0x16, 0xc3, 0x96, 0xbe, 0x41, 0xf3, 0xb9, 0x4c, 0xf2, 0x6b, 0x61, 0x3f,
+	0xc0, 0xf6, 0x1b, 0x5d, 0xd4, 0xa0, 0xfd, 0x00, 0x33, 0x27, 0x22, 0x3e, 0x9d, 0x87, 0xb1, 0xeb,
+	0xe2, 0x30, 0xb4, 0x1a, 0xaf, 0xcb, 0x6a, 0x2a, 0x31, 0x53, 0x69, 0xde, 0xc3, 0xee, 0x73, 0x39,
+	0xa6, 0x61, 0x1c, 0x04, 0x3e, 0x8b, 0xf4, 0xfd, 0xbd, 0xa2, 0x08, 0x9d, 0x07, 0xcc, 0x9f, 0x32,
+	0xd5, 0xcc, 0xb0, 0x0f, 0xa1, 0x37, 0x4b, 0xee, 0x56, 0x5c, 0xcd, 0xcb, 0xfe, 0x08, 0x6d, 0xf5,
+	0x46, 0x3d, 0xe8, 0xe0, 0xf3, 0x20, 0xfa, 0x69, 0x35, 0xd6, 0x57, 0x1f, 0x39, 0xd4, 0xc5, 0x56,
+	0xd3, 0xa6, 0x60, 0x6a, 0x75, 0x58, 0xf0, 0x45, 0x76, 0x9d, 0xf1, 0xf2, 0xdf, 0x1f, 0x13, 0x1d,
+	0x42, 0xe7, 0x5e, 0x29, 0x74, 0x52, 0xf3, 0xe8, 0xdd, 0xe3, 0xcc, 0x9e, 0x4c, 0xc6, 0xea, 0xc1,
+	0x6a, 0x91, 0x2d, 0x61, 0xb3, 0xce, 0xab, 0xe9, 0x0a, 0x59, 0x60, 0x84, 0x5c, 0xea, 0x76, 0x03,
+	0xa6, 0x8e, 0x68, 0x04, 0xfd, 0x38, 0xaf, 0x56, 0x45, 0x21, 0x4a, 0xc9, 0x53, 0xdd, 0x75, 0xc0,
+	0x5e, 0x96, 0xd0, 0x0e, 0x74, 0x70, 0x59, 0x8a, 0x72, 0x68, 0x68, 0xae, 0x06, 0x68, 0x0f, 0x36,
+	0xbc, 0xac, 0x92, 0x49, 0xbe, 0xe0, 0xc3, 0xb6, 0x26, 0x9e, 0xf0, 0xe7, 0x0f, 0xb0, 0x19, 0xf1,
+	0x4a, 0x9e, 0x8b, 0x94, 0x9f, 0xf2, 0x87, 0x4a, 0x65, 0x4c, 0x8a, 0x6c, 0x2e, 0x79, 0x25, 0xad,
+	0xc6, 0x09, 0x86, 0x6d, 0x51, 0xde, 0x8c, 0x45, 0xc1, 0xf3, 0x85, 0x28, 0xd3, 0x71, 0xbd, 0xa3,
+	0x97, 0xe3, 0x9b, 0x4c, 0xde, 0xae, 0xae, 0x54, 0x9e, 0xc9, 0x23, 0x37, 0xa9, 0xb9, 0x2f, 0xeb,
+	0xfd, 0xbd, 0x3f, 0x9e, 0xdc, 0x88, 0xf5, 0x16, 0x5f, 0x75, 0x75, 0xf1, 0xeb, 0xdf, 0x00, 0x00,
+	0x00, 0xff, 0xff, 0x4d, 0x6f, 0x2b, 0x79, 0xe4, 0x03, 0x00, 0x00,
 }
diff --git a/vendor/github.com/opencord/voltha-protos/v4/go/inter_container/inter_container.pb.go b/vendor/github.com/opencord/voltha-protos/v4/go/inter_container/inter_container.pb.go
index 752eecb..a0957f1 100644
--- a/vendor/github.com/opencord/voltha-protos/v4/go/inter_container/inter_container.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v4/go/inter_container/inter_container.pb.go
@@ -84,6 +84,7 @@
 const OperStatus_TESTING = OperStatus_Types(common.OperStatus_TESTING)
 const OperStatus_ACTIVE = OperStatus_Types(common.OperStatus_ACTIVE)
 const OperStatus_FAILED = OperStatus_Types(common.OperStatus_FAILED)
+const OperStatus_RECONCILING = OperStatus_Types(common.OperStatus_RECONCILING)
 
 // ConnectStatus_Types from public import voltha_protos/common.proto
 type ConnectStatus_Types = common.ConnectStatus_Types
@@ -104,6 +105,7 @@
 const OperationResp_OPERATION_SUCCESS = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_SUCCESS)
 const OperationResp_OPERATION_FAILURE = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_FAILURE)
 const OperationResp_OPERATION_UNSUPPORTED = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_UNSUPPORTED)
+const OperationResp_OPERATION_IN_PROGRESS = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_IN_PROGRESS)
 
 // ValueType_Type from public import voltha_protos/common.proto
 type ValueType_Type = common.ValueType_Type
diff --git a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go
index f51a7b7..2dc1826 100644
--- a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/events.pb.go
@@ -116,11 +116,12 @@
 type EventSubCategory_Types int32
 
 const (
-	EventSubCategory_PON EventSubCategory_Types = 0
-	EventSubCategory_OLT EventSubCategory_Types = 1
-	EventSubCategory_ONT EventSubCategory_Types = 2
-	EventSubCategory_ONU EventSubCategory_Types = 3
-	EventSubCategory_NNI EventSubCategory_Types = 4
+	EventSubCategory_PON  EventSubCategory_Types = 0
+	EventSubCategory_OLT  EventSubCategory_Types = 1
+	EventSubCategory_ONT  EventSubCategory_Types = 2
+	EventSubCategory_ONU  EventSubCategory_Types = 3
+	EventSubCategory_NNI  EventSubCategory_Types = 4
+	EventSubCategory_NONE EventSubCategory_Types = 5
 )
 
 var EventSubCategory_Types_name = map[int32]string{
@@ -129,14 +130,16 @@
 	2: "ONT",
 	3: "ONU",
 	4: "NNI",
+	5: "NONE",
 }
 
 var EventSubCategory_Types_value = map[string]int32{
-	"PON": 0,
-	"OLT": 1,
-	"ONT": 2,
-	"ONU": 3,
-	"NNI": 4,
+	"PON":  0,
+	"OLT":  1,
+	"ONT":  2,
+	"ONU":  3,
+	"NNI":  4,
+	"NONE": 5,
 }
 
 func (x EventSubCategory_Types) String() string {
@@ -1149,85 +1152,86 @@
 func init() { proto.RegisterFile("voltha_protos/events.proto", fileDescriptor_e63e6c07044fd2c4) }
 
 var fileDescriptor_e63e6c07044fd2c4 = []byte{
-	// 1274 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdf, 0x6e, 0xdb, 0xb6,
-	0x17, 0xb6, 0xe4, 0xff, 0x47, 0x4e, 0xa2, 0xb0, 0xbf, 0xdf, 0xe6, 0xba, 0x5b, 0x9b, 0x7a, 0xd8,
-	0x10, 0xb4, 0xa8, 0x8c, 0x69, 0x05, 0x1a, 0xa4, 0x18, 0xb6, 0xd6, 0xf5, 0x1a, 0xa1, 0x8b, 0xed,
-	0x29, 0x4e, 0x80, 0xee, 0xc6, 0x60, 0x24, 0xc6, 0x11, 0x62, 0x5b, 0x02, 0x49, 0x1b, 0xcd, 0x03,
-	0xec, 0x7a, 0x0f, 0xb2, 0xe7, 0xd8, 0xdd, 0xde, 0x60, 0x18, 0xf6, 0x12, 0x7b, 0x80, 0x81, 0x7f,
-	0x64, 0x4b, 0x6e, 0x8a, 0x5e, 0x04, 0xbb, 0x12, 0x79, 0x78, 0x3e, 0x9e, 0xef, 0x7c, 0xe2, 0x39,
-	0x24, 0xb4, 0x96, 0xf1, 0x94, 0x5f, 0xe2, 0x71, 0x42, 0x63, 0x1e, 0xb3, 0x0e, 0x59, 0x92, 0x39,
-	0x67, 0x8e, 0x9c, 0xa1, 0x8a, 0x5a, 0x6b, 0x35, 0xf3, 0x3e, 0x33, 0xc2, 0xb1, 0xf2, 0x68, 0x7d,
-	0x36, 0x89, 0xe3, 0xc9, 0x94, 0x74, 0x70, 0x12, 0x75, 0xf0, 0x7c, 0x1e, 0x73, 0xcc, 0xa3, 0x78,
-	0xae, 0xf1, 0xad, 0x07, 0x7a, 0x55, 0xce, 0xce, 0x17, 0x17, 0x1d, 0x1e, 0xcd, 0x08, 0xe3, 0x78,
-	0x96, 0x68, 0x87, 0x8d, 0xe0, 0x41, 0x3c, 0x9b, 0xc5, 0x73, 0xb5, 0xd6, 0x7e, 0x0e, 0x3b, 0xdd,
-	0x78, 0x7e, 0x11, 0x4d, 0x7a, 0x82, 0xd2, 0xe8, 0x3a, 0x21, 0xed, 0x7d, 0x28, 0x8b, 0x2f, 0x43,
-	0x55, 0x28, 0xe2, 0x30, 0xb4, 0x0b, 0x08, 0xa0, 0x42, 0xc9, 0x2c, 0x5e, 0x12, 0xdb, 0x10, 0xe3,
-	0x45, 0x12, 0x62, 0x4e, 0x6c, 0xb3, 0x7d, 0x09, 0x56, 0x06, 0x8c, 0xbe, 0x86, 0x12, 0xbf, 0x4e,
-	0x48, 0xd3, 0xd8, 0x33, 0xf6, 0xb7, 0xdd, 0xcf, 0x1d, 0x15, 0xd6, 0xd9, 0xd8, 0xdf, 0x91, 0x9b,
-	0xfb, 0xd2, 0x15, 0x21, 0x28, 0x5d, 0x62, 0x76, 0xd9, 0x34, 0xf7, 0x8c, 0xfd, 0xba, 0x2f, 0xc7,
-	0xc2, 0x16, 0x62, 0x8e, 0x9b, 0x45, 0x65, 0x13, 0xe3, 0xf6, 0x23, 0x68, 0xbc, 0x49, 0xa2, 0x35,
-	0xc7, 0x56, 0xca, 0xb1, 0x0e, 0x65, 0x36, 0x8d, 0x02, 0x62, 0x17, 0x50, 0x05, 0x4c, 0xce, 0x6c,
-	0xa3, 0xfd, 0x9b, 0x09, 0xdb, 0xc7, 0x84, 0xd3, 0x28, 0x38, 0x26, 0x1c, 0xbf, 0xc2, 0x1c, 0xa3,
-	0xff, 0x41, 0x99, 0x47, 0x7c, 0xaa, 0xa8, 0xd5, 0x7d, 0x35, 0x41, 0xdb, 0x02, 0x20, 0x43, 0x1b,
-	0xbe, 0xc9, 0x19, 0x7a, 0x04, 0xbb, 0xd3, 0x78, 0x12, 0x05, 0x78, 0x3a, 0x0e, 0xc9, 0x32, 0x0a,
-	0xc8, 0x38, 0x0a, 0x35, 0x8b, 0x1d, 0xbd, 0xf0, 0x4a, 0xda, 0xbd, 0x10, 0xdd, 0x83, 0x3a, 0x23,
-	0x34, 0xc2, 0xd3, 0xf1, 0x3c, 0x6e, 0x96, 0xa4, 0x4f, 0x4d, 0x19, 0xfa, 0xb1, 0x58, 0x5c, 0x6f,
-	0x50, 0x56, 0x8b, 0x61, 0x8a, 0xfc, 0x16, 0xaa, 0x41, 0x3c, 0xe7, 0xe4, 0x1d, 0x6f, 0x56, 0xf6,
-	0x8a, 0xfb, 0x96, 0xfb, 0x45, 0x2a, 0x54, 0x9e, 0xb4, 0xd0, 0x4d, 0x78, 0xf5, 0xe6, 0x9c, 0x5e,
-	0xfb, 0x29, 0x46, 0xa8, 0xb3, 0x58, 0x44, 0x61, 0xb3, 0xaa, 0xd4, 0x11, 0xe3, 0xd6, 0x21, 0x34,
-	0xb2, 0xce, 0xc8, 0x86, 0xe2, 0x15, 0xb9, 0xd6, 0xc9, 0x8a, 0xa1, 0x10, 0x60, 0x89, 0xa7, 0x0b,
-	0xa2, 0x85, 0x56, 0x93, 0x43, 0xf3, 0xc0, 0x68, 0xff, 0x6a, 0x80, 0xad, 0x02, 0x9f, 0x09, 0xdb,
-	0x10, 0x47, 0x94, 0xa1, 0xef, 0xa0, 0x3a, 0x93, 0x36, 0xd6, 0x34, 0x24, 0xc7, 0x2f, 0xf3, 0x1c,
-	0xd7, 0xae, 0xda, 0xc0, 0x34, 0x4b, 0x8d, 0x12, 0x8c, 0xb2, 0x0b, 0x1f, 0x63, 0x64, 0x66, 0x19,
-	0xfd, 0x6e, 0xc0, 0xae, 0x02, 0x7b, 0xf3, 0x8b, 0x98, 0xce, 0xe4, 0x61, 0x47, 0x2e, 0xd4, 0x44,
-	0x45, 0xc8, 0x93, 0x21, 0xb6, 0xb1, 0xdc, 0x4f, 0x6e, 0xd6, 0xcd, 0x5f, 0xf9, 0xa1, 0xef, 0xd7,
-	0x69, 0x98, 0x32, 0x8d, 0xaf, 0xf2, 0x90, 0xcc, 0xfe, 0xff, 0x41, 0x1e, 0x7f, 0x19, 0x50, 0x4b,
-	0x0f, 0x2d, 0x72, 0x72, 0xb5, 0xd1, 0x4a, 0x79, 0x64, 0x0f, 0x75, 0xae, 0x30, 0xd6, 0x67, 0xd3,
-	0x94, 0x67, 0xf3, 0x10, 0x6a, 0x09, 0x25, 0x17, 0xd1, 0x3b, 0xc2, 0x9a, 0x45, 0x99, 0xcb, 0xfd,
-	0xcd, 0x3d, 0x9c, 0xa1, 0x76, 0x50, 0x39, 0xac, 0xfc, 0x5b, 0xa7, 0xb0, 0x95, 0x5b, 0xba, 0x21,
-	0x0b, 0x27, 0x9b, 0x85, 0xe5, 0x36, 0x3f, 0xf4, 0xbb, 0xb3, 0xf9, 0xfd, 0x62, 0x40, 0x3d, 0x8d,
-	0xed, 0xde, 0x22, 0x41, 0x55, 0x7c, 0x07, 0x00, 0xb2, 0x90, 0xc7, 0xba, 0xf6, 0x45, 0x8a, 0x77,
-	0x3f, 0xf8, 0xbb, 0xfc, 0xba, 0x74, 0x16, 0xff, 0xbb, 0xfd, 0x8f, 0x01, 0x96, 0xaa, 0x4b, 0x25,
-	0xf5, 0x03, 0xb0, 0x28, 0x61, 0xf1, 0x82, 0xaa, 0xfa, 0x53, 0x59, 0x42, 0x6a, 0xf2, 0x42, 0x51,
-	0xe7, 0xba, 0x3c, 0x65, 0x1f, 0x1e, 0xcf, 0xf1, 0x2c, 0x2d, 0x8c, 0x9d, 0x70, 0xbd, 0x51, 0x1f,
-	0xcf, 0x08, 0xda, 0x03, 0x2b, 0x24, 0x2c, 0xa0, 0x51, 0x22, 0xc2, 0xea, 0x6e, 0x90, 0x35, 0xa1,
-	0xc3, 0x75, 0x3d, 0x97, 0x24, 0xeb, 0xbd, 0x94, 0x75, 0x86, 0xd4, 0xcd, 0xc5, 0x7c, 0xab, 0xc2,
-	0xfd, 0xd3, 0x84, 0x9a, 0x3f, 0xec, 0xaa, 0x9c, 0x6d, 0x28, 0xd2, 0x24, 0x48, 0x81, 0x34, 0x09,
-	0xd0, 0x43, 0x68, 0xc4, 0x09, 0xa1, 0x52, 0x2d, 0x21, 0x83, 0xc2, 0x5b, 0x2b, 0x9b, 0x17, 0xa2,
-	0x26, 0x54, 0x19, 0xa1, 0x82, 0xa3, 0xce, 0x2b, 0x9d, 0xa2, 0xbb, 0x50, 0x63, 0x1c, 0x07, 0x57,
-	0x02, 0x58, 0xd2, 0x4b, 0x62, 0xee, 0x85, 0x9b, 0xea, 0x96, 0xdf, 0x53, 0x77, 0x43, 0xb1, 0xca,
-	0xfb, 0x8a, 0x3d, 0x5b, 0x2b, 0x56, 0x95, 0x8a, 0xad, 0xae, 0x8a, 0x34, 0x9f, 0x0f, 0xf4, 0xbe,
-	0x27, 0x50, 0x61, 0x1c, 0xf3, 0x05, 0x6b, 0xd6, 0xe4, 0x31, 0xfd, 0xbf, 0xa3, 0xef, 0xb2, 0x41,
-	0x9a, 0x95, 0x4f, 0x58, 0xe2, 0x6b, 0xa7, 0x5b, 0xa9, 0xbb, 0x84, 0x2d, 0xc9, 0xa4, 0x8b, 0x39,
-	0x99, 0xc4, 0xf4, 0xba, 0x4d, 0xd2, 0x1b, 0x67, 0x17, 0xb6, 0xba, 0x83, 0xe3, 0xe3, 0xd3, 0xbe,
-	0xd7, 0x7d, 0x31, 0xf2, 0x06, 0x7d, 0xbb, 0x80, 0x76, 0xc0, 0xea, 0xf5, 0xcf, 0x3c, 0x7f, 0xd0,
-	0x3f, 0xee, 0xf5, 0x47, 0xb6, 0x81, 0xb6, 0xa0, 0xde, 0xfb, 0xe9, 0xd4, 0x1b, 0xca, 0xa9, 0x89,
-	0x2c, 0xa8, 0x9e, 0xf4, 0xfc, 0x33, 0xaf, 0xdb, 0xb3, 0x8b, 0x68, 0x1b, 0x60, 0xe8, 0x0f, 0xba,
-	0xbd, 0x93, 0x13, 0xaf, 0xff, 0xda, 0x2e, 0xa1, 0x06, 0xd4, 0x4e, 0x7a, 0xdd, 0x53, 0xdf, 0x1b,
-	0xbd, 0xb5, 0xcb, 0xed, 0x23, 0xb0, 0x65, 0xdc, 0x93, 0xc5, 0xf9, 0x2a, 0xf4, 0xd3, 0xcc, 0x85,
-	0x3c, 0x94, 0x01, 0xab, 0x50, 0x1c, 0xfc, 0x28, 0x02, 0x89, 0x81, 0x0c, 0x21, 0x07, 0xa7, 0x76,
-	0x51, 0x0c, 0xfa, 0x7d, 0xcf, 0x2e, 0xb5, 0x2f, 0xa0, 0xbe, 0xbe, 0x2f, 0xdf, 0xa6, 0x5b, 0xd8,
-	0xd0, 0xe8, 0x0e, 0xfa, 0x3f, 0x78, 0xaf, 0xc7, 0xbd, 0x33, 0x41, 0xae, 0x20, 0xb8, 0xbe, 0x19,
-	0x7a, 0x7a, 0x6a, 0x08, 0x7a, 0xab, 0xa9, 0x6b, 0x9b, 0x02, 0xf0, 0xaa, 0x27, 0xa8, 0x6b, 0x8f,
-	0xa2, 0x00, 0xf8, 0xc3, 0xae, 0x9e, 0x96, 0xda, 0x7f, 0x9b, 0x60, 0xc9, 0x40, 0x47, 0x04, 0x87,
-	0x84, 0x8a, 0xc2, 0x5e, 0x55, 0x9d, 0x19, 0x85, 0xe8, 0x19, 0xd4, 0x02, 0x9d, 0x89, 0x94, 0x79,
-	0xdb, 0xbd, 0x97, 0xfe, 0xee, 0x9c, 0xc2, 0xba, 0x3b, 0xac, 0x9c, 0xd1, 0x0b, 0x68, 0xb0, 0xc5,
-	0xf9, 0x78, 0x05, 0x2e, 0x4a, 0xf0, 0xfd, 0x1c, 0x38, 0x23, 0x93, 0xc6, 0x5b, 0x6c, 0x6d, 0x42,
-	0x8f, 0x75, 0x53, 0x2a, 0x49, 0xe8, 0xa7, 0x39, 0xe8, 0x7b, 0x1d, 0xe9, 0x21, 0x34, 0xc4, 0x77,
-	0xbc, 0x24, 0x94, 0x89, 0x93, 0xab, 0x8e, 0xb6, 0x25, 0x6c, 0x67, 0xca, 0x84, 0x9e, 0x41, 0x9d,
-	0xe2, 0x88, 0x91, 0x70, 0xcc, 0x99, 0x3c, 0xd9, 0x96, 0xdb, 0x72, 0xd4, 0xf3, 0xcb, 0x49, 0x9f,
-	0x5f, 0xce, 0x28, 0x7d, 0x7e, 0xf9, 0x35, 0xe5, 0x3c, 0x62, 0xe8, 0xb9, 0xa8, 0x9a, 0x24, 0xa6,
-	0x5c, 0x41, 0xab, 0x1f, 0x85, 0x42, 0xea, 0x3e, 0x62, 0xed, 0x3f, 0x4c, 0x28, 0xab, 0x32, 0x7f,
-	0x0c, 0x95, 0x4b, 0xa9, 0xb2, 0xbe, 0x02, 0xef, 0xe4, 0x32, 0x52, 0x3f, 0xc0, 0xd7, 0x2e, 0xe8,
-	0x00, 0x1a, 0x81, 0x7c, 0x7a, 0xa9, 0x36, 0xa7, 0x5b, 0xfb, 0x9d, 0x1b, 0x9e, 0x65, 0x47, 0x05,
-	0xdf, 0x0a, 0x32, 0x0f, 0xb9, 0x0e, 0xd4, 0xaf, 0x92, 0x48, 0xc3, 0x8a, 0x12, 0x66, 0x6f, 0x36,
-	0xf4, 0xa3, 0x82, 0x5f, 0xbb, 0x4a, 0x6f, 0x37, 0x17, 0x60, 0x05, 0x70, 0xa5, 0xda, 0x96, 0xbb,
-	0xbb, 0x89, 0x70, 0x8f, 0x0a, 0x7e, 0xfd, 0x6a, 0x75, 0x61, 0x1c, 0x40, 0x23, 0xdb, 0x85, 0xa5,
-	0xdc, 0x19, 0x7a, 0x99, 0xe6, 0x29, 0xe8, 0x65, 0xfa, 0xb2, 0xa0, 0x47, 0x93, 0x40, 0xc3, 0x2a,
-	0x79, 0x7a, 0x69, 0x07, 0x11, 0xf4, 0x68, 0x12, 0xc8, 0xf1, 0xcb, 0x06, 0x80, 0xea, 0xf4, 0xe2,
-	0x5f, 0xbe, 0xec, 0xc1, 0x9d, 0x98, 0x4e, 0x9c, 0x38, 0x21, 0xf3, 0x20, 0xa6, 0xa1, 0x46, 0xfe,
-	0xec, 0x4c, 0x22, 0x7e, 0xb9, 0x38, 0x17, 0x2d, 0xa5, 0x93, 0xae, 0x75, 0xd4, 0xda, 0x13, 0xfd,
-	0x72, 0x5e, 0x3e, 0xed, 0x4c, 0x62, 0x6d, 0x3b, 0xaf, 0x48, 0xe3, 0x37, 0xff, 0x06, 0x00, 0x00,
-	0xff, 0xff, 0x7b, 0x2c, 0xa9, 0x18, 0xdb, 0x0b, 0x00, 0x00,
+	// 1282 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdb, 0x6e, 0xdb, 0x46,
+	0x13, 0x16, 0xa9, 0xf3, 0x50, 0xb6, 0xe9, 0xcd, 0xff, 0xb7, 0x8a, 0xd2, 0x26, 0x8e, 0x8a, 0x16,
+	0x46, 0x82, 0x50, 0x28, 0x5b, 0x20, 0x86, 0x83, 0x1e, 0x12, 0x85, 0x8d, 0x89, 0xd4, 0x94, 0x4a,
+	0xcb, 0x06, 0xd2, 0x1b, 0x61, 0x4d, 0xae, 0x65, 0xc2, 0x92, 0x48, 0x70, 0x57, 0x42, 0xfc, 0x00,
+	0xbd, 0xee, 0x83, 0xf4, 0x39, 0x7a, 0xd7, 0x37, 0x28, 0x8a, 0xbe, 0x44, 0x1f, 0xa0, 0xd8, 0x03,
+	0x25, 0x52, 0x71, 0x90, 0x0b, 0xa3, 0x57, 0xdc, 0x9d, 0x9d, 0x6f, 0xe7, 0x9b, 0x8f, 0x3b, 0xb3,
+	0x0b, 0x9d, 0x65, 0x3c, 0x65, 0x97, 0x78, 0x9c, 0xa4, 0x31, 0x8b, 0x69, 0x8f, 0x2c, 0xc9, 0x9c,
+	0x51, 0x4b, 0xcc, 0x50, 0x4d, 0xae, 0x75, 0xda, 0x45, 0x9f, 0x19, 0x61, 0x58, 0x7a, 0x74, 0x3e,
+	0x99, 0xc4, 0xf1, 0x64, 0x4a, 0x7a, 0x38, 0x89, 0x7a, 0x78, 0x3e, 0x8f, 0x19, 0x66, 0x51, 0x3c,
+	0x57, 0xf8, 0xce, 0x03, 0xb5, 0x2a, 0x66, 0xe7, 0x8b, 0x8b, 0x1e, 0x8b, 0x66, 0x84, 0x32, 0x3c,
+	0x4b, 0x94, 0xc3, 0x46, 0xf0, 0x20, 0x9e, 0xcd, 0xe2, 0xb9, 0x5c, 0xeb, 0x3e, 0x83, 0x9d, 0x7e,
+	0x3c, 0xbf, 0x88, 0x26, 0x0e, 0xa7, 0x34, 0xba, 0x4e, 0x48, 0x77, 0x1f, 0xaa, 0xfc, 0x4b, 0x51,
+	0x1d, 0xca, 0x38, 0x0c, 0xcd, 0x12, 0x02, 0xa8, 0xa5, 0x64, 0x16, 0x2f, 0x89, 0xa9, 0xf1, 0xf1,
+	0x22, 0x09, 0x31, 0x23, 0xa6, 0xde, 0xbd, 0x04, 0x23, 0x07, 0x46, 0x5f, 0x42, 0x85, 0x5d, 0x27,
+	0xa4, 0xad, 0xed, 0x69, 0xfb, 0xdb, 0xf6, 0xa7, 0x96, 0x0c, 0x6b, 0x6d, 0xec, 0x6f, 0x89, 0xcd,
+	0x7d, 0xe1, 0x8a, 0x10, 0x54, 0x2e, 0x31, 0xbd, 0x6c, 0xeb, 0x7b, 0xda, 0x7e, 0xd3, 0x17, 0x63,
+	0x6e, 0x0b, 0x31, 0xc3, 0xed, 0xb2, 0xb4, 0xf1, 0x71, 0xf7, 0x11, 0xb4, 0x5e, 0x27, 0xd1, 0x9a,
+	0x63, 0x27, 0xe3, 0xd8, 0x84, 0x2a, 0x9d, 0x46, 0x01, 0x31, 0x4b, 0xa8, 0x06, 0x3a, 0xa3, 0xa6,
+	0xd6, 0xfd, 0x4d, 0x87, 0xed, 0x63, 0xc2, 0xd2, 0x28, 0x38, 0x26, 0x0c, 0xbf, 0xc4, 0x0c, 0xa3,
+	0xff, 0x41, 0x95, 0x45, 0x6c, 0x2a, 0xa9, 0x35, 0x7d, 0x39, 0x41, 0xdb, 0x1c, 0x20, 0x42, 0x6b,
+	0xbe, 0xce, 0x28, 0x7a, 0x04, 0xbb, 0xd3, 0x78, 0x12, 0x05, 0x78, 0x3a, 0x0e, 0xc9, 0x32, 0x0a,
+	0xc8, 0x38, 0x0a, 0x15, 0x8b, 0x1d, 0xb5, 0xf0, 0x52, 0xd8, 0xdd, 0x10, 0xdd, 0x83, 0x26, 0x25,
+	0x69, 0x84, 0xa7, 0xe3, 0x79, 0xdc, 0xae, 0x08, 0x9f, 0x86, 0x34, 0x78, 0x31, 0x5f, 0x5c, 0x6f,
+	0x50, 0x95, 0x8b, 0x61, 0x86, 0xfc, 0x06, 0xea, 0x41, 0x3c, 0x67, 0xe4, 0x2d, 0x6b, 0xd7, 0xf6,
+	0xca, 0xfb, 0x86, 0xfd, 0x59, 0x26, 0x54, 0x91, 0x34, 0xd7, 0x8d, 0x7b, 0x39, 0x73, 0x96, 0x5e,
+	0xfb, 0x19, 0x86, 0xab, 0xb3, 0x58, 0x44, 0x61, 0xbb, 0x2e, 0xd5, 0xe1, 0xe3, 0xce, 0x21, 0xb4,
+	0xf2, 0xce, 0xc8, 0x84, 0xf2, 0x15, 0xb9, 0x56, 0xc9, 0xf2, 0x21, 0x17, 0x60, 0x89, 0xa7, 0x0b,
+	0xa2, 0x84, 0x96, 0x93, 0x43, 0xfd, 0x40, 0xeb, 0xfe, 0xaa, 0x81, 0x29, 0x03, 0x9f, 0x71, 0xdb,
+	0x10, 0x47, 0x29, 0x45, 0xdf, 0x41, 0x7d, 0x26, 0x6c, 0xb4, 0xad, 0x09, 0x8e, 0x9f, 0x17, 0x39,
+	0xae, 0x5d, 0x95, 0x81, 0x2a, 0x96, 0x0a, 0xc5, 0x19, 0xe5, 0x17, 0x3e, 0xc4, 0x48, 0xcf, 0x33,
+	0xfa, 0x5d, 0x83, 0x5d, 0x09, 0x76, 0xe7, 0x17, 0x71, 0x3a, 0x13, 0x87, 0x1d, 0xd9, 0xd0, 0xe0,
+	0x15, 0x21, 0x4e, 0x06, 0xdf, 0xc6, 0xb0, 0x3f, 0xba, 0x59, 0x37, 0x7f, 0xe5, 0x87, 0xbe, 0x5f,
+	0xa7, 0xa1, 0x8b, 0x34, 0xbe, 0x28, 0x42, 0x72, 0xfb, 0xff, 0x07, 0x79, 0xfc, 0xa5, 0x41, 0x23,
+	0x3b, 0xb4, 0xc8, 0x2a, 0xd4, 0x46, 0x27, 0xe3, 0x91, 0x3f, 0xd4, 0x85, 0xc2, 0x58, 0x9f, 0x4d,
+	0x5d, 0x9c, 0xcd, 0x43, 0x68, 0x24, 0x29, 0xb9, 0x88, 0xde, 0x12, 0xda, 0x2e, 0x8b, 0x5c, 0xee,
+	0x6f, 0xee, 0x61, 0x0d, 0x95, 0x83, 0xcc, 0x61, 0xe5, 0xdf, 0x39, 0x85, 0xad, 0xc2, 0xd2, 0x0d,
+	0x59, 0x58, 0xf9, 0x2c, 0x0c, 0xbb, 0xfd, 0xbe, 0xdf, 0x9d, 0xcf, 0xef, 0x17, 0x0d, 0x9a, 0x59,
+	0x6c, 0xfb, 0x16, 0x09, 0xca, 0xe2, 0x3b, 0x00, 0x10, 0x85, 0x3c, 0x56, 0xb5, 0xcf, 0x53, 0xbc,
+	0xfb, 0xde, 0xdf, 0xe5, 0x37, 0x85, 0x33, 0xff, 0xdf, 0xdd, 0x7f, 0x34, 0x30, 0x64, 0x5d, 0x4a,
+	0xa9, 0x1f, 0x80, 0x91, 0x12, 0x1a, 0x2f, 0x52, 0x59, 0x7f, 0x32, 0x4b, 0xc8, 0x4c, 0x6e, 0xc8,
+	0xeb, 0x5c, 0x95, 0xa7, 0xe8, 0xc3, 0xe3, 0x39, 0x9e, 0x65, 0x85, 0xb1, 0x13, 0xae, 0x37, 0xf2,
+	0xf0, 0x8c, 0xa0, 0x3d, 0x30, 0x42, 0x42, 0x83, 0x34, 0x4a, 0x78, 0x58, 0xd5, 0x0d, 0xf2, 0x26,
+	0x74, 0xb8, 0xae, 0xe7, 0x8a, 0x60, 0xbd, 0x97, 0xb1, 0xce, 0x91, 0xba, 0xb9, 0x98, 0x6f, 0x55,
+	0xb8, 0x7f, 0xea, 0xd0, 0xf0, 0x87, 0x7d, 0x99, 0xb3, 0x09, 0xe5, 0x34, 0x09, 0x32, 0x60, 0x9a,
+	0x04, 0xe8, 0x21, 0xb4, 0xe2, 0x84, 0xa4, 0x42, 0x2d, 0x2e, 0x83, 0xc4, 0x1b, 0x2b, 0x9b, 0x1b,
+	0xa2, 0x36, 0xd4, 0x29, 0x49, 0x39, 0x47, 0x95, 0x57, 0x36, 0x45, 0x77, 0xa1, 0x41, 0x19, 0x0e,
+	0xae, 0x38, 0xb0, 0xa2, 0x96, 0xf8, 0xdc, 0x0d, 0x37, 0xd5, 0xad, 0xbe, 0xa3, 0xee, 0x86, 0x62,
+	0xb5, 0x77, 0x15, 0x7b, 0xba, 0x56, 0xac, 0x2e, 0x14, 0x5b, 0x5d, 0x15, 0x59, 0x3e, 0xef, 0xe9,
+	0x7d, 0x4f, 0xa0, 0x46, 0x19, 0x66, 0x0b, 0xda, 0x6e, 0x88, 0x63, 0xfa, 0x7f, 0x4b, 0xdd, 0x65,
+	0x83, 0x2c, 0x2b, 0x9f, 0xd0, 0xc4, 0x57, 0x4e, 0xb7, 0x52, 0x77, 0x09, 0x5b, 0x82, 0x49, 0x1f,
+	0x33, 0x32, 0x89, 0xd3, 0xeb, 0x2e, 0xc9, 0x6e, 0x9c, 0x5d, 0xd8, 0xea, 0x0f, 0x8e, 0x8f, 0x4f,
+	0x3d, 0xb7, 0xff, 0x7c, 0xe4, 0x0e, 0x3c, 0xb3, 0x84, 0x76, 0xc0, 0x70, 0xbc, 0x33, 0xd7, 0x1f,
+	0x78, 0xc7, 0x8e, 0x37, 0x32, 0x35, 0xb4, 0x05, 0x4d, 0xe7, 0xa7, 0x53, 0x77, 0x28, 0xa6, 0x3a,
+	0x32, 0xa0, 0x7e, 0xe2, 0xf8, 0x67, 0x6e, 0xdf, 0x31, 0xcb, 0x68, 0x1b, 0x60, 0xe8, 0x0f, 0xfa,
+	0xce, 0xc9, 0x89, 0xeb, 0xbd, 0x32, 0x2b, 0xa8, 0x05, 0x8d, 0x13, 0xa7, 0x7f, 0xea, 0xbb, 0xa3,
+	0x37, 0x66, 0xb5, 0xeb, 0x83, 0x29, 0xe2, 0x9e, 0x2c, 0xce, 0x57, 0xa1, 0xbf, 0xcd, 0x5d, 0xc8,
+	0x43, 0x11, 0xb0, 0x0e, 0xe5, 0xc1, 0x8f, 0x3c, 0x10, 0x1f, 0x88, 0x10, 0x62, 0x70, 0x6a, 0x96,
+	0xf9, 0xc0, 0xf3, 0x5c, 0xb3, 0x82, 0x1a, 0x50, 0xf1, 0x06, 0x9e, 0x63, 0x56, 0xbb, 0x17, 0xd0,
+	0x5c, 0xdf, 0x9c, 0x6f, 0xb2, 0xcd, 0x4c, 0x68, 0xf5, 0x07, 0xde, 0x0f, 0xee, 0xab, 0xb1, 0x73,
+	0xc6, 0x69, 0x96, 0x38, 0xeb, 0xd7, 0x43, 0x57, 0x4d, 0x35, 0x4e, 0x74, 0x35, 0xb5, 0x4d, 0x9d,
+	0x03, 0x5e, 0x3a, 0x3c, 0x09, 0xe5, 0x51, 0xe6, 0x00, 0x7f, 0xd8, 0x57, 0xd3, 0x4a, 0xf7, 0x6f,
+	0x1d, 0x0c, 0x11, 0xe8, 0x88, 0xe0, 0x90, 0xa4, 0xbc, 0xc4, 0x57, 0xf5, 0xa7, 0x47, 0x21, 0x7a,
+	0x0a, 0x8d, 0x40, 0xe5, 0x24, 0x04, 0xdf, 0xb6, 0xef, 0x65, 0x3f, 0xbe, 0xa0, 0xb5, 0xea, 0x13,
+	0x2b, 0x67, 0xf4, 0x1c, 0x5a, 0x74, 0x71, 0x3e, 0x5e, 0x81, 0xcb, 0x02, 0x7c, 0xbf, 0x00, 0xce,
+	0x09, 0xa6, 0xf0, 0x06, 0x5d, 0x9b, 0xd0, 0x63, 0xd5, 0x9e, 0x2a, 0x02, 0xfa, 0x71, 0x01, 0xfa,
+	0x4e, 0x6f, 0x7a, 0x08, 0x2d, 0xfe, 0x1d, 0x2f, 0x49, 0x4a, 0xf9, 0x19, 0x96, 0x87, 0xdc, 0xe0,
+	0xb6, 0x33, 0x69, 0x42, 0x4f, 0xa1, 0x99, 0xe2, 0x88, 0x92, 0x70, 0xcc, 0xa8, 0x38, 0xe3, 0x86,
+	0xdd, 0xb1, 0xe4, 0x43, 0xcc, 0xca, 0x1e, 0x62, 0xd6, 0x28, 0x7b, 0x88, 0xf9, 0x0d, 0xe9, 0x3c,
+	0xa2, 0xe8, 0x19, 0xaf, 0x9f, 0x24, 0x4e, 0x99, 0x84, 0xd6, 0x3f, 0x08, 0x85, 0xcc, 0x7d, 0x44,
+	0xbb, 0x7f, 0xe8, 0x50, 0x95, 0x05, 0xff, 0x18, 0x6a, 0x97, 0x42, 0x65, 0x75, 0x19, 0xde, 0x29,
+	0x64, 0x24, 0x7f, 0x80, 0xaf, 0x5c, 0xd0, 0x01, 0xb4, 0x02, 0xf1, 0x08, 0x93, 0x0d, 0x4f, 0x35,
+	0xf9, 0x3b, 0x37, 0x3c, 0xd0, 0x8e, 0x4a, 0xbe, 0x11, 0xe4, 0x9e, 0x74, 0x3d, 0x68, 0x5e, 0x25,
+	0x91, 0x82, 0x95, 0x05, 0xcc, 0xdc, 0x6c, 0xed, 0x47, 0x25, 0xbf, 0x71, 0x95, 0xdd, 0x73, 0x36,
+	0xc0, 0x0a, 0x60, 0x0b, 0xb5, 0x0d, 0x7b, 0x77, 0x13, 0x61, 0x1f, 0x95, 0xfc, 0xe6, 0xd5, 0xea,
+	0xea, 0x38, 0x80, 0x56, 0xbe, 0x1f, 0x0b, 0xb9, 0x73, 0xf4, 0x72, 0x6d, 0x94, 0xd3, 0xcb, 0x75,
+	0x68, 0x4e, 0x2f, 0x4d, 0x02, 0x05, 0xab, 0x15, 0xe9, 0x65, 0xbd, 0x84, 0xd3, 0x4b, 0x93, 0x40,
+	0x8c, 0x5f, 0xb4, 0x00, 0x64, 0xcf, 0xe7, 0xff, 0xf2, 0x85, 0x03, 0x77, 0xe2, 0x74, 0x62, 0xc5,
+	0x09, 0x99, 0x07, 0x71, 0x1a, 0x2a, 0xe4, 0xcf, 0xd6, 0x24, 0x62, 0x97, 0x8b, 0x73, 0xde, 0x5c,
+	0x7a, 0xd9, 0x5a, 0x4f, 0xae, 0x3d, 0x51, 0x6f, 0xe8, 0xe5, 0xd7, 0xbd, 0x49, 0xac, 0x6c, 0xe7,
+	0x35, 0x61, 0xfc, 0xea, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xd5, 0xe2, 0x3b, 0xe5, 0x0b,
+	0x00, 0x00,
 }
diff --git a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/voltha.pb.go b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/voltha.pb.go
index 2ec3452..49b2a5e 100644
--- a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/voltha.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/voltha.pb.go
@@ -104,6 +104,7 @@
 const OperStatus_TESTING = OperStatus_Types(common.OperStatus_TESTING)
 const OperStatus_ACTIVE = OperStatus_Types(common.OperStatus_ACTIVE)
 const OperStatus_FAILED = OperStatus_Types(common.OperStatus_FAILED)
+const OperStatus_RECONCILING = OperStatus_Types(common.OperStatus_RECONCILING)
 
 // ConnectStatus_Types from public import voltha_protos/common.proto
 type ConnectStatus_Types = common.ConnectStatus_Types
@@ -124,6 +125,7 @@
 const OperationResp_OPERATION_SUCCESS = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_SUCCESS)
 const OperationResp_OPERATION_FAILURE = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_FAILURE)
 const OperationResp_OPERATION_UNSUPPORTED = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_UNSUPPORTED)
+const OperationResp_OPERATION_IN_PROGRESS = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_IN_PROGRESS)
 
 // ValueType_Type from public import voltha_protos/common.proto
 type ValueType_Type = common.ValueType_Type
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 92a3a0a..8f439c4 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,7 +1,5 @@
 # github.com/Shopify/sarama v1.25.0
 github.com/Shopify/sarama
-# github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878
-github.com/armon/go-metrics
 # github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a
 github.com/coreos/go-systemd/journal
 # github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea
@@ -40,20 +38,8 @@
 github.com/googleapis/gnostic/OpenAPIv2
 github.com/googleapis/gnostic/compiler
 github.com/googleapis/gnostic/extensions
-# github.com/hashicorp/consul/api v1.2.0
-github.com/hashicorp/consul/api
-# github.com/hashicorp/go-cleanhttp v0.5.1
-github.com/hashicorp/go-cleanhttp
-# github.com/hashicorp/go-immutable-radix v1.1.0
-github.com/hashicorp/go-immutable-radix
-# github.com/hashicorp/go-rootcerts v1.0.1
-github.com/hashicorp/go-rootcerts
 # github.com/hashicorp/go-uuid v1.0.1
 github.com/hashicorp/go-uuid
-# github.com/hashicorp/golang-lru v0.5.3
-github.com/hashicorp/golang-lru/simplelru
-# github.com/hashicorp/serf v0.8.4
-github.com/hashicorp/serf/coordinate
 # github.com/imdario/mergo v0.3.7
 github.com/imdario/mergo
 # github.com/jcmturner/gofork v1.0.0
@@ -75,20 +61,16 @@
 github.com/klauspost/compress/snappy
 github.com/klauspost/compress/zstd
 github.com/klauspost/compress/zstd/internal/xxhash
-# github.com/mitchellh/go-homedir v1.1.0
-github.com/mitchellh/go-homedir
-# github.com/mitchellh/mapstructure v1.1.2
-github.com/mitchellh/mapstructure
 # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
 github.com/modern-go/concurrent
 # github.com/modern-go/reflect2 v1.0.1
 github.com/modern-go/reflect2
-# github.com/opencord/voltha-lib-go/v4 v4.0.6
+# github.com/opencord/voltha-lib-go/v4 v4.2.1
 github.com/opencord/voltha-lib-go/v4/pkg/config
 github.com/opencord/voltha-lib-go/v4/pkg/db
 github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore
 github.com/opencord/voltha-lib-go/v4/pkg/log
-# github.com/opencord/voltha-protos/v4 v4.0.11
+# github.com/opencord/voltha-protos/v4 v4.0.16
 github.com/opencord/voltha-protos/v4/go/common
 github.com/opencord/voltha-protos/v4/go/ext/config
 github.com/opencord/voltha-protos/v4/go/extension
diff --git a/voltctl.v1.config b/voltctl.v1.config
new file mode 100644
index 0000000..94307b8
--- /dev/null
+++ b/voltctl.v1.config
@@ -0,0 +1,31 @@
+
+# Copyright 2019-present Ciena Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+server: localhost:55555
+kafka: localhost:9092
+kvstore: localhost:2379
+tls:
+  useTls: false
+  caCert: ""
+  cert: ""
+  key: ""
+  verify: "" 
+grpc:
+  timeout: 5m0s
+  maxCallRecvMsgSize: 4M
+kvstoreconfig:
+  timeout: 5s
+
diff --git a/voltctl.v2.config b/voltctl.v2.config
new file mode 100644
index 0000000..0cd740b
--- /dev/null
+++ b/voltctl.v2.config
@@ -0,0 +1,30 @@
+# Copyright 2021-present Ciena Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: v2
+server: localhost:55555
+kafka: localhost:9092
+kvstore: localhost:2379
+tls:
+  useTls: false
+  caCert: ""
+  cert: ""
+  key: ""
+  verify: false
+grpc:
+  connectTimeout: 5s
+  timeout: 5m0s
+  maxCallRecvMsgSize: 4M
+kvstoreconfig:
+  timeout: 5s
+
