diff --git a/Gopkg.lock b/Gopkg.lock index 85d311b..f445740 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1,9 +1,21 @@ # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. +[[projects]] + name = "github.com/coreos/etcd" + packages = ["client","pkg/pathutil","pkg/srv","pkg/types","version"] + revision = "f1d7dd87da3e8feab4aaf675b8e29c6a5ed5f58b" + version = "v3.2.9" + +[[projects]] + name = "github.com/coreos/go-semver" + packages = ["semver"] + revision = "8ab6407b697782a06568d4b7f1db25550ec2e4c6" + version = "v0.2.0" + [[projects]] name = "github.com/docker/libkv" - packages = [".","store","store/consul"] + packages = [".","store","store/consul","store/etcd"] revision = "aabc039ad04deb721e234f99cd1b4aa28ac71a40" version = "v0.2.1" @@ -37,9 +49,21 @@ packages = ["."] revision = "b8bc1bf767474819792c23f32d8286a45736f1c6" +[[projects]] + branch = "master" + name = "github.com/ugorji/go" + packages = ["codec"] + revision = "d03304bb1d83c196fd3017dca37e89a4504b3676" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["context"] + revision = "c73622c77280266305273cb545f54516ced95b93" + [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "1f5a0efea8472b9731d0554bcdb2c6b71e2d96febbac63079f6c6755529a60d1" + inputs-digest = "d7fdac548e37fb11a8ff383760bd7ecdfa6141ea57eee38cec177d3796f2a1e2" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 8c536bb..323002c 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -19,8 +19,3 @@ # [[override]] # name = "github.com/x/y" # version = "2.4.0" - - -[[constraint]] - name = "github.com/docker/libkv" - version = "0.2.1" diff --git a/kvstore.go b/kvstore.go index a732ec7..0281683 100644 --- a/kvstore.go +++ b/kvstore.go @@ -7,13 +7,13 @@ import ( "strings" "time" - // "github.com/abronan/libkv" - // "github.com/abronan/libkv/store" - // "github.com/abronan/libkv/store/consul" - // "github.com/abronan/libkv/store/etcd/v3" "github.com/docker/libkv" "github.com/docker/libkv/store" "github.com/docker/libkv/store/consul" + "github.com/docker/libkv/store/etcd" + // "github.com/abronan/libkv" + // "github.com/abronan/libkv/store" + // "github.com/abronan/libkv/store/consul" // "github.com/docker/libkv/store/etcd" ) @@ -69,8 +69,8 @@ func (gc *GetConf) EnableKVStore(opts *KVOptions) (*GetConf, error) { return gc, errors.New("cannot create store consul") } gc.KVStore = kv - // case "etcd": - // etcd.Register() + case "etcd": + etcd.Register() default: return gc, errors.New("unknown backend") diff --git a/vendor/github.com/coreos/etcd/.dockerignore b/vendor/github.com/coreos/etcd/.dockerignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/vendor/github.com/coreos/etcd/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/vendor/github.com/coreos/etcd/.github/ISSUE_TEMPLATE.md b/vendor/github.com/coreos/etcd/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..c8c894c --- /dev/null +++ b/vendor/github.com/coreos/etcd/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,7 @@ +# Bug reporting + +A good bug report has some very specific qualities, so please read over our short document on [reporting bugs][report_bugs] before submitting a bug report. + +To ask a question, go ahead and ignore this. + +[report_bugs]: https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md diff --git a/vendor/github.com/coreos/etcd/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/coreos/etcd/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..4fa34e9 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +# Contributing guidelines + +Please read our [contribution workflow][contributing] before submitting a pull request. + +[contributing]: https://github.com/coreos/etcd/blob/master/CONTRIBUTING.md#contribution-flow diff --git a/vendor/github.com/coreos/etcd/.gitignore b/vendor/github.com/coreos/etcd/.gitignore new file mode 100644 index 0000000..210be6f --- /dev/null +++ b/vendor/github.com/coreos/etcd/.gitignore @@ -0,0 +1,15 @@ +/coverage +/gopath +/gopath.proto +/go-bindata +/machine* +/bin +.vagrant +*.etcd +/etcd +*.swp +/hack/insta-discovery/.env +*.test +tools/functional-tester/docker/bin +hack/tls-setup/certs +.idea diff --git a/vendor/github.com/coreos/etcd/.godir b/vendor/github.com/coreos/etcd/.godir new file mode 100644 index 0000000..00ff6aa --- /dev/null +++ b/vendor/github.com/coreos/etcd/.godir @@ -0,0 +1 @@ +github.com/coreos/etcd diff --git a/vendor/github.com/coreos/etcd/.header b/vendor/github.com/coreos/etcd/.header new file mode 100644 index 0000000..0446af6 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.header @@ -0,0 +1,13 @@ +// Copyright 2016 The etcd Authors +// +// 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. diff --git a/vendor/github.com/coreos/etcd/.travis.yml b/vendor/github.com/coreos/etcd/.travis.yml new file mode 100644 index 0000000..cdb30e6 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.travis.yml @@ -0,0 +1,83 @@ +dist: trusty +language: go +go_import_path: github.com/coreos/etcd +sudo: false + +go: + - 1.8.4 + - tip + +notifications: + on_success: never + on_failure: never + +env: + matrix: + - TARGET=amd64 + - TARGET=darwin-amd64 + - TARGET=windows-amd64 + - TARGET=arm64 + - TARGET=arm + - TARGET=386 + - TARGET=ppc64le + +matrix: + fast_finish: true + allow_failures: + - go: tip + exclude: + - go: tip + env: TARGET=darwin-amd64 + - go: tip + env: TARGET=windows-amd64 + - go: tip + env: TARGET=arm + - go: tip + env: TARGET=arm64 + - go: tip + env: TARGET=386 + - go: tip + env: TARGET=ppc64le + +addons: + apt: + sources: + - debian-sid + packages: + - libpcap-dev + - libaspell-dev + - libhunspell-dev + - shellcheck + +before_install: + - go get -v -u github.com/chzchzchz/goword + - go get -v -u github.com/coreos/license-bill-of-materials + - go get -v -u honnef.co/go/tools/cmd/gosimple + - go get -v -u honnef.co/go/tools/cmd/unused + - go get -v -u honnef.co/go/tools/cmd/staticcheck + - ./scripts/install-marker.sh amd64 + +# disable godep restore override +install: + - pushd cmd/etcd && go get -t -v ./... && popd + +script: + - > + case "${TARGET}" in + amd64) + GOARCH=amd64 ./test + ;; + darwin-amd64) + GO_BUILD_FLAGS="-a -v" GOPATH="" GOOS=darwin GOARCH=amd64 ./build + ;; + windows-amd64) + GO_BUILD_FLAGS="-a -v" GOPATH="" GOOS=windows GOARCH=amd64 ./build + ;; + 386) + GOARCH=386 PASSES="build unit" ./test + ;; + *) + # test building out of gopath + GO_BUILD_FLAGS="-a -v" GOPATH="" GOARCH="${TARGET}" ./build + ;; + esac diff --git a/vendor/github.com/coreos/etcd/CONTRIBUTING.md b/vendor/github.com/coreos/etcd/CONTRIBUTING.md new file mode 100644 index 0000000..635f73a --- /dev/null +++ b/vendor/github.com/coreos/etcd/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# How to contribute + +etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into etcd. + +# Email and chat + +- Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) +- IRC: #[coreos](irc://irc.freenode.org:6667/#coreos) IRC channel on freenode.org + +## Getting started + +- Fork the repository on GitHub +- Read the README.md for build instructions + +## Reporting bugs and creating issues + +Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug. + +## Contribution flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where to base the contribution. This is usually master. +- Make commits of logical units. +- Make sure commit messages are in the proper format (see below). +- Push changes in a topic branch to a personal fork of the repository. +- Submit a pull request to coreos/etcd. +- The PR must receive a LGTM from two maintainers found in the MAINTAINERS file. + +Thanks for contributing! + +### Code style + +The coding style suggested by the Golang community is used in etcd. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. + +Please follow this style to make etcd easy to review, maintain and develop. + +### Format of the commit message + +We follow a rough convention for commit messages that is designed to answer two +questions: what changed and why. The subject line should feature the what and +the body of the commit should describe the why. + +``` +scripts: add the test-cluster command + +this uses tmux to setup a test cluster that can easily be killed and started for debugging. + +Fixes #38 +``` + +The format can be described more formally as follows: + +``` +: + + + +