From aeeffa15084726b47118c926dd13b2387b88c4b4 Mon Sep 17 00:00:00 2001 From: Will Glynn Date: Wed, 11 Jul 2018 23:03:03 -0500 Subject: [PATCH 1/3] Migrate from `godep` to `dep` --- Godeps/Godeps.json | 362 ------------------ Godeps/Readme | 5 - Gopkg.lock | 144 +++++++ Gopkg.toml | 38 ++ Makefile | 7 +- README.md | 3 +- .../github.com/gorilla/context/LICENSE | 27 ++ .../external/github.com/gorilla/mux/LICENSE | 27 ++ .../golang.org/x/net/context/context.go | 2 +- .../external/golang.org/x/sys/unix/mkall.sh | 0 .../golang.org/x/sys/unix/mkerrors.sh | 0 .../golang.org/x/sys/unix/mksyscall.pl | 0 .../x/sys/unix/mksyscall_solaris.pl | 0 .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 0 .../golang.org/x/sys/unix/mksysnum_darwin.pl | 0 .../x/sys/unix/mksysnum_dragonfly.pl | 0 .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 0 .../golang.org/x/sys/unix/mksysnum_linux.pl | 0 .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 0 .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 0 .../external/golang.org/x/sys/unix/syscall.go | 2 +- .../klauspost/compress/snappy/AUTHORS | 14 + .../klauspost/compress/snappy/CONTRIBUTORS | 36 ++ .../klauspost/compress/snappy/LICENSE | 28 ++ .../valyala/fasthttp/reuseport/LICENSE | 21 + 25 files changed, 340 insertions(+), 376 deletions(-) delete mode 100644 Godeps/Godeps.json delete mode 100644 Godeps/Readme create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml create mode 100644 vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkall.sh mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkerrors.sh mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall_solaris.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysctl_openbsd.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_darwin.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_dragonfly.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_freebsd.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_linux.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_netbsd.pl mode change 100644 => 100755 vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_openbsd.pl create mode 100644 vendor/github.com/klauspost/compress/snappy/AUTHORS create mode 100644 vendor/github.com/klauspost/compress/snappy/CONTRIBUTORS create mode 100644 vendor/github.com/klauspost/compress/snappy/LICENSE create mode 100644 vendor/github.com/valyala/fasthttp/reuseport/LICENSE diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 index 52d45bc..0000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,362 +0,0 @@ -{ - "ImportPath": "github.com/swipely/iam-docker", - "GoVersion": "go1.6", - "GodepVersion": "v62", - "Packages": [ - "./src/..." - ], - "Deps": [ - { - "ImportPath": "github.com/Sirupsen/logrus", - "Comment": "v0.7.3", - "Rev": "55eb11d21d2a31a3cc93838241d04800f52e823d" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/awserr", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/client", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/defaults", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/request", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/aws/session", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/protocol", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/service/sts", - "Comment": "v1.1.10", - "Rev": "4151ef572710e04d25d9385114b33847ba6a923a" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/archive", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/homedir", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/idtools", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/ioutils", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/promise", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/stdcopy", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/docker/go-units", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/hashicorp/go-cleanhttp", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/github.com/opencontainers/runc/libcontainer/user", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/golang.org/x/net/context", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix", - "Rev": "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" - }, - { - "ImportPath": "github.com/go-ini/ini", - "Comment": "v1.8.6", - "Rev": "afbd495e5aaea13597b5e14fe514ddeaa4d76fc3" - }, - { - "ImportPath": "github.com/jmespath/go-jmespath", - "Comment": "0.2.2-12-g0b12d6b", - "Rev": "0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74" - }, - { - "ImportPath": "github.com/klauspost/compress/flate", - "Comment": "v1.0-12-g14eb9c4", - "Rev": "14eb9c4951195779ecfbec34431a976de7335b0a" - }, - { - "ImportPath": "github.com/klauspost/compress/gzip", - "Comment": "v1.0-12-g14eb9c4", - "Rev": "14eb9c4951195779ecfbec34431a976de7335b0a" - }, - { - "ImportPath": "github.com/klauspost/compress/zlib", - "Comment": "v1.0-12-g14eb9c4", - "Rev": "14eb9c4951195779ecfbec34431a976de7335b0a" - }, - { - "ImportPath": "github.com/klauspost/cpuid", - "Comment": "v1.0", - "Rev": "09cded8978dc9e80714c4d85b0322337b0a1e5e0" - }, - { - "ImportPath": "github.com/klauspost/crc32", - "Comment": "v1.0", - "Rev": "19b0b332c9e4516a6370a0456e6182c3b5036720" - }, - { - "ImportPath": "github.com/onsi/ginkgo", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/config", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/codelocation", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/containernode", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/failer", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/leafnodes", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/remote", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/spec", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/specrunner", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/suite", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/testingtproxy", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/internal/writer", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/reporters", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/reporters/stenographer", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/ginkgo/types", - "Comment": "v1.2.0-11-gd94e2f4", - "Rev": "d94e2f4000332f62b356ecb2840c98f4218f5358" - }, - { - "ImportPath": "github.com/onsi/gomega", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/format", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/internal/assertion", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/internal/asyncassertion", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/internal/testingtsupport", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/matchers", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/edge", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/node", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/util", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/onsi/gomega/types", - "Comment": "v1.0-52-ga2ab864", - "Rev": "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" - }, - { - "ImportPath": "github.com/valyala/fasthttp", - "Comment": "v20160419-2-g2a12271", - "Rev": "2a122714064d56e2f7935e226eef5d1bcb77a612" - }, - { - "ImportPath": "github.com/valyala/fasthttp/fasthttpadaptor", - "Comment": "v20160419-2-g2a12271", - "Rev": "2a122714064d56e2f7935e226eef5d1bcb77a612" - } - ] -} diff --git a/Godeps/Readme b/Godeps/Readme deleted file mode 100644 index 4cdaa53..0000000 --- a/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..2d845b3 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,144 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/Sirupsen/logrus" + packages = ["."] + revision = "55eb11d21d2a31a3cc93838241d04800f52e823d" + version = "v0.7.3" + +[[projects]] + name = "github.com/aws/aws-sdk-go" + packages = [ + "aws", + "aws/awserr", + "aws/awsutil", + "aws/client", + "aws/client/metadata", + "aws/corehandlers", + "aws/credentials", + "aws/credentials/ec2rolecreds", + "aws/defaults", + "aws/ec2metadata", + "aws/request", + "aws/session", + "private/endpoints", + "private/protocol", + "private/protocol/query", + "private/protocol/query/queryutil", + "private/protocol/rest", + "private/protocol/xml/xmlutil", + "private/signer/v4", + "service/sts" + ] + revision = "4151ef572710e04d25d9385114b33847ba6a923a" + version = "v1.1.10" + +[[projects]] + name = "github.com/fsouza/go-dockerclient" + packages = [ + ".", + "external/github.com/Sirupsen/logrus", + "external/github.com/docker/docker/opts", + "external/github.com/docker/docker/pkg/archive", + "external/github.com/docker/docker/pkg/fileutils", + "external/github.com/docker/docker/pkg/homedir", + "external/github.com/docker/docker/pkg/idtools", + "external/github.com/docker/docker/pkg/ioutils", + "external/github.com/docker/docker/pkg/longpath", + "external/github.com/docker/docker/pkg/pools", + "external/github.com/docker/docker/pkg/promise", + "external/github.com/docker/docker/pkg/stdcopy", + "external/github.com/docker/docker/pkg/system", + "external/github.com/docker/go-units", + "external/github.com/hashicorp/go-cleanhttp", + "external/github.com/opencontainers/runc/libcontainer/user", + "external/golang.org/x/net/context", + "external/golang.org/x/sys/unix" + ] + revision = "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" + +[[projects]] + name = "github.com/go-ini/ini" + packages = ["."] + revision = "afbd495e5aaea13597b5e14fe514ddeaa4d76fc3" + version = "v1.8.6" + +[[projects]] + name = "github.com/jmespath/go-jmespath" + packages = ["."] + revision = "0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74" + +[[projects]] + name = "github.com/klauspost/compress" + packages = [ + "flate", + "gzip", + "zlib" + ] + revision = "14eb9c4951195779ecfbec34431a976de7335b0a" + +[[projects]] + name = "github.com/klauspost/cpuid" + packages = ["."] + revision = "09cded8978dc9e80714c4d85b0322337b0a1e5e0" + version = "v1.0" + +[[projects]] + name = "github.com/klauspost/crc32" + packages = ["."] + revision = "19b0b332c9e4516a6370a0456e6182c3b5036720" + version = "v1.0" + +[[projects]] + name = "github.com/onsi/ginkgo" + packages = [ + ".", + "config", + "internal/codelocation", + "internal/containernode", + "internal/failer", + "internal/leafnodes", + "internal/remote", + "internal/spec", + "internal/specrunner", + "internal/suite", + "internal/testingtproxy", + "internal/writer", + "reporters", + "reporters/stenographer", + "types" + ] + revision = "d94e2f4000332f62b356ecb2840c98f4218f5358" + +[[projects]] + name = "github.com/onsi/gomega" + packages = [ + ".", + "format", + "internal/assertion", + "internal/asyncassertion", + "internal/testingtsupport", + "matchers", + "matchers/support/goraph/bipartitegraph", + "matchers/support/goraph/edge", + "matchers/support/goraph/node", + "matchers/support/goraph/util", + "types" + ] + revision = "a2ab8644e0b6a33df2cbe44673bd0f6ebba9abc3" + +[[projects]] + name = "github.com/valyala/fasthttp" + packages = [ + ".", + "fasthttpadaptor" + ] + revision = "2a122714064d56e2f7935e226eef5d1bcb77a612" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "fd42596d1f9cceafe8c6fd5ba2c8b04c3f061e13d4cab25f6f6e3ef4a7779f5a" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..3bef403 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,38 @@ +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + name = "github.com/Sirupsen/logrus" + version = "0.7.3" + +[[constraint]] + name = "github.com/aws/aws-sdk-go" + version = "1.1.10" + +[prune] + go-tests = true + unused-packages = true diff --git a/Makefile b/Makefile index 0099e73..085c2c2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -GO=CGO_ENABLED=0 godep go +GO=CGO_ENABLED=0 go GO_BUILD_OPTS=-a --tags netgo --ldflags '-extldflags "-static"' SRCDIR=./src SRC=$(SRCDIR)/... @@ -22,9 +22,6 @@ build: test: $(GO) test $(TEST_OPTS) $(SRC) -get-deps: - go get -u github.com/tools/godep - release: docker git tag $(VERSION) git push origin --tags @@ -34,4 +31,4 @@ release: docker docker: $(SRCS) Dockerfile $(DOCKER) build -t $(DOCKER_IMAGE) . -.PHONY: build default docker get-deps release test +.PHONY: build default docker release test diff --git a/README.md b/README.md index 08e82e4..bd2de9f 100644 --- a/README.md +++ b/README.md @@ -87,12 +87,11 @@ All credentials are kept fresh, so there should be minimal latency when making A ## Development -To build and test, you need to install [Go 1.6](https://golang.org/doc/go1.6) and [`godep`](https://github.com/tools/godep): `go get -u github.com/tools/godep`. +To build and test, you need to install [>= Go 1.6](https://golang.org/doc/go1.6). Dependencies are managed by [`dep`](https://github.com/tools/dep), so you'll need `dep` in order to change or update dependencies, but everything you need to build is checked in at `vendor/`. All development commands can be found in the `Makefile`. Commonly used commands: -* `make get-deps` - install the system dependencies * `make test` - run the application tests * `make docker` - build a release Docker image diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go index 11bd8d3..0da42b1 100644 --- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go +++ b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go @@ -34,7 +34,7 @@ // // See http://blog.golang.org/context for example code for a server that uses // Contexts. -package context +package context // import "github.com/fsouza/go-dockerclient/external/golang.org/x/net/context" import ( "errors" diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkall.sh b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkall.sh old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkerrors.sh b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mkerrors.sh old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall_solaris.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksyscall_solaris.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysctl_openbsd.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysctl_openbsd.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_darwin.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_darwin.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_dragonfly.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_freebsd.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_freebsd.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_linux.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_linux.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_netbsd.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_netbsd.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_openbsd.pl b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/mksysnum_openbsd.pl old mode 100644 new mode 100755 diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go index a48d47c..012f2d6 100644 --- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go +++ b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/syscall.go @@ -19,7 +19,7 @@ // These calls return err == nil to indicate success; otherwise // err represents an operating system error describing the failure and // holds a value of type syscall.Errno. -package unix +package unix // import "github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix" import "unsafe" diff --git a/vendor/github.com/klauspost/compress/snappy/AUTHORS b/vendor/github.com/klauspost/compress/snappy/AUTHORS new file mode 100644 index 0000000..dc5563f --- /dev/null +++ b/vendor/github.com/klauspost/compress/snappy/AUTHORS @@ -0,0 +1,14 @@ +# This is the official list of Snappy-Go authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Damian Gryski +Google Inc. +Jan Mercl <0xjnml@gmail.com> +Sebastien Binet diff --git a/vendor/github.com/klauspost/compress/snappy/CONTRIBUTORS b/vendor/github.com/klauspost/compress/snappy/CONTRIBUTORS new file mode 100644 index 0000000..1c7cb7f --- /dev/null +++ b/vendor/github.com/klauspost/compress/snappy/CONTRIBUTORS @@ -0,0 +1,36 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the Snappy-Go repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name + +# Please keep the list sorted. + +Damian Gryski +Jan Mercl <0xjnml@gmail.com> +Kai Backman +Marc-Antoine Ruel +Nigel Tao +Rob Pike +Russ Cox +Sebastien Binet diff --git a/vendor/github.com/klauspost/compress/snappy/LICENSE b/vendor/github.com/klauspost/compress/snappy/LICENSE new file mode 100644 index 0000000..2903409 --- /dev/null +++ b/vendor/github.com/klauspost/compress/snappy/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. +Copyright (c) 2016 Klaus Post. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/valyala/fasthttp/reuseport/LICENSE b/vendor/github.com/valyala/fasthttp/reuseport/LICENSE new file mode 100644 index 0000000..5f25159 --- /dev/null +++ b/vendor/github.com/valyala/fasthttp/reuseport/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Max Riveiro + +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. \ No newline at end of file From f8f536a3cbd7d5c696f67ada6470d6e718fb7acf Mon Sep 17 00:00:00 2001 From: Will Glynn Date: Wed, 11 Jul 2018 23:05:32 -0500 Subject: [PATCH 2/3] Update github.com/fsouza/go-dockerclient (#27) --- Gopkg.lock | 3 +- .../fsouza/go-dockerclient/.travis.yml | 28 ++- .../github.com/fsouza/go-dockerclient/AUTHORS | 7 + .../github.com/fsouza/go-dockerclient/LICENSE | 2 +- .../fsouza/go-dockerclient/Makefile | 33 ++- .../fsouza/go-dockerclient/README.markdown | 3 +- .../github.com/fsouza/go-dockerclient/auth.go | 40 +++- .../fsouza/go-dockerclient/cancelable.go | 17 ++ .../fsouza/go-dockerclient/cancelable_go14.go | 19 ++ .../fsouza/go-dockerclient/client.go | 121 ++++++++--- .../fsouza/go-dockerclient/container.go | 199 +++++++++++++----- .../fsouza/go-dockerclient/event.go | 59 ++++-- .../docker/docker/pkg/system/chtimes_unix.go | 14 ++ .../docker/pkg/system/chtimes_windows.go | 27 +++ .../docker/docker/pkg/system/stat_openbsd.go | 15 ++ .../docker/pkg/system/stat_unsupported.go | 2 +- .../golang.org/x/net/context/context.go | 12 +- .../fsouza/go-dockerclient/image.go | 102 +++++---- .../fsouza/go-dockerclient/network.go | 21 +- .../github.com/fsouza/go-dockerclient/tls.go | 28 ++- .../fsouza/go-dockerclient/volume.go | 7 +- 21 files changed, 550 insertions(+), 209 deletions(-) create mode 100644 vendor/github.com/fsouza/go-dockerclient/cancelable.go create mode 100644 vendor/github.com/fsouza/go-dockerclient/cancelable_go14.go create mode 100644 vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go create mode 100644 vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go create mode 100644 vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go diff --git a/Gopkg.lock b/Gopkg.lock index 2d845b3..949cae1 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -56,7 +56,8 @@ "external/golang.org/x/net/context", "external/golang.org/x/sys/unix" ] - revision = "73f08fbacc09c6fd1b7bc179193e58b14d7619cc" + revision = "1d4f4ae73768d3ca16a6fb964694f58dc5eba601" + version = "docker-1.9/go-1.4" [[projects]] name = "github.com/go-ini/ini" diff --git a/vendor/github.com/fsouza/go-dockerclient/.travis.yml b/vendor/github.com/fsouza/go-dockerclient/.travis.yml index 4ad14b0..1490f99 100644 --- a/vendor/github.com/fsouza/go-dockerclient/.travis.yml +++ b/vendor/github.com/fsouza/go-dockerclient/.travis.yml @@ -1,27 +1,25 @@ language: go sudo: required go: - - 1.3.3 - - 1.4.2 - - 1.5.3 - - 1.6 + - 1.4.3 + - 1.5.4 + - 1.6.2 - tip +os: + - linux + - osx env: - - GOARCH=amd64 DOCKER_VERSION=1.7.1 - - GOARCH=386 DOCKER_VERSION=1.7.1 - - GOARCH=amd64 DOCKER_VERSION=1.8.3 - - GOARCH=386 DOCKER_VERSION=1.8.3 - GOARCH=amd64 DOCKER_VERSION=1.9.1 - GOARCH=386 DOCKER_VERSION=1.9.1 - - GOARCH=amd64 DOCKER_VERSION=1.10.2 - - GOARCH=386 DOCKER_VERSION=1.10.2 + - GOARCH=amd64 DOCKER_VERSION=1.10.3 + - GOARCH=386 DOCKER_VERSION=1.10.3 + - GOARCH=amd64 DOCKER_VERSION=1.11.1 + - GOARCH=386 DOCKER_VERSION=1.11.1 install: - - travis_retry make prepare_docker + - travis_retry travis-scripts/install.bash script: - - make test - - DOCKER_HOST=tcp://127.0.0.1:2375 make integration + - travis-scripts/run-tests.bash services: - docker matrix: - allow_failures: - - go: tip + fast_finish: true diff --git a/vendor/github.com/fsouza/go-dockerclient/AUTHORS b/vendor/github.com/fsouza/go-dockerclient/AUTHORS index c0913a5..d27226e 100644 --- a/vendor/github.com/fsouza/go-dockerclient/AUTHORS +++ b/vendor/github.com/fsouza/go-dockerclient/AUTHORS @@ -49,6 +49,7 @@ Fabio Rehm Fatih Arslan Flavia Missi Francisco Souza +Frank Groeneveld George Moura Grégoire Delattre Guillermo Álvarez Fernández @@ -100,12 +101,17 @@ Peter Jihoon Kim Phil Lu Philippe Lafoucrière Rafe Colton +Raphaël Pinson Rob Miller +Robbert Klarenbeek Robert Williamson +Roman Khlystik Salvador Gironès Sam Rijs Sami Wagiaalla +Samuel Archambault Samuel Karp +Seth Jennings Silas Sewell Simon Eskildsen Simon Menke @@ -123,6 +129,7 @@ Tonic ttyh061 Victor Marmol Vincenzo Prignano +Vlad Alexandru Ionescu Wiliam Souza Ye Yin Yu, Zou diff --git a/vendor/github.com/fsouza/go-dockerclient/LICENSE b/vendor/github.com/fsouza/go-dockerclient/LICENSE index 4e11de1..b1cdd4c 100644 --- a/vendor/github.com/fsouza/go-dockerclient/LICENSE +++ b/vendor/github.com/fsouza/go-dockerclient/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015, go-dockerclient authors +Copyright (c) 2016, go-dockerclient authors All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/github.com/fsouza/go-dockerclient/Makefile b/vendor/github.com/fsouza/go-dockerclient/Makefile index f25dfe8..2d6a5cf 100644 --- a/vendor/github.com/fsouza/go-dockerclient/Makefile +++ b/vendor/github.com/fsouza/go-dockerclient/Makefile @@ -11,8 +11,7 @@ cov \ clean -SRCS = $(shell git ls-files '*.go' | grep -v '^external/') -PKGS = ./. ./testing +PKGS = . ./testing all: test @@ -22,33 +21,29 @@ vendor: lint: @ go get -v github.com/golang/lint/golint - $(foreach file,$(SRCS),golint $(file) || exit;) + @for file in $$(git ls-files '*.go' | grep -v 'external/'); do \ + export output="$$(golint $${file} | grep -v 'type name will be used as docker.DockerInfo')"; \ + [ -n "$${output}" ] && echo "$${output}" && export status=1; \ + done; \ + exit $${status:-0} vet: - @-go get -v golang.org/x/tools/cmd/vet - $(foreach pkg,$(PKGS),go vet $(pkg);) + go vet $(PKGS) fmt: - gofmt -s -w $(SRCS) + gofmt -s -w $(PKGS) fmtcheck: - @ export output=$$(gofmt -s -d $(SRCS)); \ + @ export output=$$(gofmt -s -d $(PKGS)); \ [ -n "$${output}" ] && echo "$${output}" && export status=1; \ exit $${status:-0} -prepare_docker: - sudo stop docker || true - sudo rm -rf /var/lib/docker - sudo rm -f `which docker` - sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D - echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list - sudo apt-get update - sudo apt-get install docker-engine=$(DOCKER_VERSION)-0~$(shell lsb_release -cs) -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" - pretest: lint vet fmtcheck -test: pretest - $(foreach pkg,$(PKGS),go test $(pkg) || exit;) +gotest: + go test $(GO_TEST_FLAGS) $(PKGS) + +test: pretest gotest integration: go test -tags docker_integration -run TestIntegration -v @@ -59,4 +54,4 @@ cov: gocov test | gocov report clean: - $(foreach pkg,$(PKGS),go clean $(pkg) || exit;) + go clean $(PKGS) diff --git a/vendor/github.com/fsouza/go-dockerclient/README.markdown b/vendor/github.com/fsouza/go-dockerclient/README.markdown index b915039..234b9e4 100644 --- a/vendor/github.com/fsouza/go-dockerclient/README.markdown +++ b/vendor/github.com/fsouza/go-dockerclient/README.markdown @@ -1,10 +1,11 @@ # go-dockerclient -[![Travis](https://img.shields.io/travis/fsouza/go-dockerclient.svg?style=flat-square)](https://travis-ci.org/fsouza/go-dockerclient) +[![Travis](https://img.shields.io/travis/fsouza/go-dockerclient/master.svg?style=flat-square)](https://travis-ci.org/fsouza/go-dockerclient) [![GoDoc](https://img.shields.io/badge/api-Godoc-blue.svg?style=flat-square)](https://godoc.org/github.com/fsouza/go-dockerclient) This package presents a client for the Docker remote API. It also provides support for the extensions in the [Swarm API](https://docs.docker.com/swarm/swarm-api/). +It currently supports the Docker API up to version 1.23. This package also provides support for docker's network API, which is a simple passthrough to the libnetwork remote API. Note that docker's network API is diff --git a/vendor/github.com/fsouza/go-dockerclient/auth.go b/vendor/github.com/fsouza/go-dockerclient/auth.go index 775c70c..95596d7 100644 --- a/vendor/github.com/fsouza/go-dockerclient/auth.go +++ b/vendor/github.com/fsouza/go-dockerclient/auth.go @@ -11,6 +11,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "os" "path" "strings" @@ -82,10 +83,12 @@ func parseDockerConfig(r io.Reader) (map[string]dockerConfig, error) { buf.ReadFrom(r) byteData := buf.Bytes() - var confsWrapper map[string]map[string]dockerConfig + confsWrapper := struct { + Auths map[string]dockerConfig `json:"auths"` + }{} if err := json.Unmarshal(byteData, &confsWrapper); err == nil { - if confs, ok := confsWrapper["auths"]; ok { - return confs, nil + if len(confsWrapper.Auths) > 0 { + return confsWrapper.Auths, nil } } @@ -120,17 +123,36 @@ func authConfigs(confs map[string]dockerConfig) (*AuthConfigurations, error) { return c, nil } +// AuthStatus returns the authentication status for Docker API versions >= 1.23. +type AuthStatus struct { + Status string `json:"Status,omitempty" yaml:"Status,omitempty"` + IdentityToken string `json:"IdentityToken,omitempty" yaml:"IdentityToken,omitempty"` +} + // AuthCheck validates the given credentials. It returns nil if successful. // -// See https://goo.gl/m2SleN for more details. -func (c *Client) AuthCheck(conf *AuthConfiguration) error { +// For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty.` +// +// See https://goo.gl/6nsZkH for more details. +func (c *Client) AuthCheck(conf *AuthConfiguration) (AuthStatus, error) { + var authStatus AuthStatus if conf == nil { - return fmt.Errorf("conf is nil") + return authStatus, fmt.Errorf("conf is nil") } resp, err := c.do("POST", "/auth", doOptions{data: conf}) if err != nil { - return err + return authStatus, err + } + defer resp.Body.Close() + data, err := ioutil.ReadAll(resp.Body) + if err != nil { + return authStatus, err + } + if len(data) == 0 { + return authStatus, nil + } + if err := json.Unmarshal(data, &authStatus); err != nil { + return authStatus, err } - resp.Body.Close() - return nil + return authStatus, nil } diff --git a/vendor/github.com/fsouza/go-dockerclient/cancelable.go b/vendor/github.com/fsouza/go-dockerclient/cancelable.go new file mode 100644 index 0000000..375fbd1 --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/cancelable.go @@ -0,0 +1,17 @@ +// Copyright 2016 go-dockerclient authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.5 + +package docker + +import "net/http" + +func cancelable(client *http.Client, req *http.Request) func() { + ch := make(chan struct{}) + req.Cancel = ch + return func() { + close(ch) + } +} diff --git a/vendor/github.com/fsouza/go-dockerclient/cancelable_go14.go b/vendor/github.com/fsouza/go-dockerclient/cancelable_go14.go new file mode 100644 index 0000000..3c20398 --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/cancelable_go14.go @@ -0,0 +1,19 @@ +// Copyright 2016 go-dockerclient authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.5 + +package docker + +import "net/http" + +func cancelable(client *http.Client, req *http.Request) func() { + return func() { + if rc, ok := client.Transport.(interface { + CancelRequest(*http.Request) + }); ok { + rc.CancelRequest(req) + } + } +} diff --git a/vendor/github.com/fsouza/go-dockerclient/client.go b/vendor/github.com/fsouza/go-dockerclient/client.go index 114fb87..a3f09cd 100644 --- a/vendor/github.com/fsouza/go-dockerclient/client.go +++ b/vendor/github.com/fsouza/go-dockerclient/client.go @@ -27,6 +27,7 @@ import ( "runtime" "strconv" "strings" + "sync/atomic" "time" "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts" @@ -44,6 +45,9 @@ var ( // ErrConnectionRefused is returned when the client cannot connect to the given endpoint. ErrConnectionRefused = errors.New("cannot connect to Docker endpoint") + // ErrInactivityTimeout is returned when a streamable call has been inactive for some time. + ErrInactivityTimeout = errors.New("inactivity time exceeded timeout") + apiVersion112, _ = NewAPIVersion("1.12") apiVersion119, _ = NewAPIVersion("1.19") @@ -436,8 +440,11 @@ type streamOptions struct { in io.Reader stdout io.Writer stderr io.Writer - // timeout is the inital connection timeout + // timeout is the initial connection timeout timeout time.Duration + // Timeout with no data is received, it's reset every time new data + // arrives + inactivityTimeout time.Duration } func (c *Client) stream(method, path string, streamOptions streamOptions) error { @@ -470,11 +477,13 @@ func (c *Client) stream(method, path string, streamOptions streamOptions) error if streamOptions.stderr == nil { streamOptions.stderr = ioutil.Discard } + cancelRequest := cancelable(c.HTTPClient, req) if protocol == "unix" { dial, err := c.Dialer.Dial(protocol, address) if err != nil { return err } + cancelRequest = func() { dial.Close() } defer dial.Close() breader := bufio.NewReader(dial) err = req.Write(dial) @@ -509,33 +518,24 @@ func (c *Client) stream(method, path string, streamOptions streamOptions) error if resp.StatusCode < 200 || resp.StatusCode >= 400 { return newError(resp) } - if streamOptions.useJSONDecoder || resp.Header.Get("Content-Type") == "application/json" { - // if we want to get raw json stream, just copy it back to output - // without decoding it - if streamOptions.rawJSONStream { - _, err = io.Copy(streamOptions.stdout, resp.Body) - return err - } - dec := json.NewDecoder(resp.Body) - for { - var m jsonMessage - if err := dec.Decode(&m); err == io.EOF { - break - } else if err != nil { - return err - } - if m.Stream != "" { - fmt.Fprint(streamOptions.stdout, m.Stream) - } else if m.Progress != "" { - fmt.Fprintf(streamOptions.stdout, "%s %s\r", m.Status, m.Progress) - } else if m.Error != "" { - return errors.New(m.Error) - } - if m.Status != "" { - fmt.Fprintln(streamOptions.stdout, m.Status) - } + var canceled uint32 + if streamOptions.inactivityTimeout > 0 { + ch := handleInactivityTimeout(&streamOptions, cancelRequest, &canceled) + defer close(ch) + } + err = handleStreamResponse(resp, &streamOptions) + if err != nil { + if atomic.LoadUint32(&canceled) != 0 { + return ErrInactivityTimeout } - } else { + return err + } + return nil +} + +func handleStreamResponse(resp *http.Response, streamOptions *streamOptions) error { + var err error + if !streamOptions.useJSONDecoder && resp.Header.Get("Content-Type") != "application/json" { if streamOptions.setRawTerminal { _, err = io.Copy(streamOptions.stdout, resp.Body) } else { @@ -543,9 +543,74 @@ func (c *Client) stream(method, path string, streamOptions streamOptions) error } return err } + // if we want to get raw json stream, just copy it back to output + // without decoding it + if streamOptions.rawJSONStream { + _, err = io.Copy(streamOptions.stdout, resp.Body) + return err + } + dec := json.NewDecoder(resp.Body) + for { + var m jsonMessage + if err := dec.Decode(&m); err == io.EOF { + break + } else if err != nil { + return err + } + if m.Stream != "" { + fmt.Fprint(streamOptions.stdout, m.Stream) + } else if m.Progress != "" { + fmt.Fprintf(streamOptions.stdout, "%s %s\r", m.Status, m.Progress) + } else if m.Error != "" { + return errors.New(m.Error) + } + if m.Status != "" { + fmt.Fprintln(streamOptions.stdout, m.Status) + } + } return nil } +type proxyWriter struct { + io.Writer + calls uint64 +} + +func (p *proxyWriter) callCount() uint64 { + return atomic.LoadUint64(&p.calls) +} + +func (p *proxyWriter) Write(data []byte) (int, error) { + atomic.AddUint64(&p.calls, 1) + return p.Writer.Write(data) +} + +func handleInactivityTimeout(options *streamOptions, cancelRequest func(), canceled *uint32) chan<- struct{} { + done := make(chan struct{}) + proxyStdout := &proxyWriter{Writer: options.stdout} + proxyStderr := &proxyWriter{Writer: options.stderr} + options.stdout = proxyStdout + options.stderr = proxyStderr + go func() { + var lastCallCount uint64 + for { + select { + case <-time.After(options.inactivityTimeout): + case <-done: + return + } + curCallCount := proxyStdout.callCount() + proxyStderr.callCount() + if curCallCount == lastCallCount { + atomic.AddUint32(canceled, 1) + cancelRequest() + return + } + lastCallCount = curCallCount + } + }() + return done +} + type hijackOptions struct { success chan struct{} setRawTerminal bool @@ -555,6 +620,8 @@ type hijackOptions struct { data interface{} } +// CloseWaiter is an interface with methods for closing the underlying resource +// and then waiting for it to finish processing. type CloseWaiter interface { io.Closer Wait() error diff --git a/vendor/github.com/fsouza/go-dockerclient/container.go b/vendor/github.com/fsouza/go-dockerclient/container.go index 1e2fb6f..f7ed5f5 100644 --- a/vendor/github.com/fsouza/go-dockerclient/container.go +++ b/vendor/github.com/fsouza/go-dockerclient/container.go @@ -14,6 +14,8 @@ import ( "strconv" "strings" "time" + + "github.com/fsouza/go-dockerclient/external/github.com/docker/go-units" ) // ErrContainerAlreadyExists is the error returned by CreateContainer when the @@ -40,6 +42,17 @@ type APIPort struct { IP string `json:"IP,omitempty" yaml:"IP,omitempty"` } +// APIMount represents a mount point for a container. +type APIMount struct { + Name string `json:"Name,omitempty" yaml:"Name,omitempty"` + Source string `json:"Source,omitempty" yaml:"Source,omitempty"` + Destination string `json:"Destination,omitempty" yaml:"Destination,omitempty"` + Driver string `json:"Driver,omitempty" yaml:"Driver,omitempty"` + Mode string `json:"Mode,omitempty" yaml:"Mode,omitempty"` + RW bool `json:"RW,omitempty" yaml:"RW,omitempty"` + Propogation string `json:"Propogation,omitempty" yaml:"Propogation,omitempty"` +} + // APIContainers represents each container in the list returned by // ListContainers. type APIContainers struct { @@ -47,6 +60,7 @@ type APIContainers struct { Image string `json:"Image,omitempty" yaml:"Image,omitempty"` Command string `json:"Command,omitempty" yaml:"Command,omitempty"` Created int64 `json:"Created,omitempty" yaml:"Created,omitempty"` + State string `json:"State,omitempty" yaml:"State,omitempty"` Status string `json:"Status,omitempty" yaml:"Status,omitempty"` Ports []APIPort `json:"Ports,omitempty" yaml:"Ports,omitempty"` SizeRw int64 `json:"SizeRw,omitempty" yaml:"SizeRw,omitempty"` @@ -54,8 +68,11 @@ type APIContainers struct { Names []string `json:"Names,omitempty" yaml:"Names,omitempty"` Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"` Networks NetworkList `json:"NetworkSettings,omitempty" yaml:"NetworkSettings,omitempty"` + Mounts []APIMount `json:"Mounts,omitempty" yaml:"Mounts,omitempty"` } +// NetworkList encapsulates a map of networks, as returned by the Docker API in +// ListContainers. type NetworkList struct { Networks map[string]ContainerNetwork `json:"Networks" yaml:"Networks,omitempty"` } @@ -97,26 +114,73 @@ func (p Port) Proto() string { // State represents the state of a container. type State struct { - Running bool `json:"Running,omitempty" yaml:"Running,omitempty"` - Paused bool `json:"Paused,omitempty" yaml:"Paused,omitempty"` - Restarting bool `json:"Restarting,omitempty" yaml:"Restarting,omitempty"` - OOMKilled bool `json:"OOMKilled,omitempty" yaml:"OOMKilled,omitempty"` - Pid int `json:"Pid,omitempty" yaml:"Pid,omitempty"` - ExitCode int `json:"ExitCode,omitempty" yaml:"ExitCode,omitempty"` - Error string `json:"Error,omitempty" yaml:"Error,omitempty"` - StartedAt time.Time `json:"StartedAt,omitempty" yaml:"StartedAt,omitempty"` - FinishedAt time.Time `json:"FinishedAt,omitempty" yaml:"FinishedAt,omitempty"` -} - -// String returns the string representation of a state. + Status string `json:"Status,omitempty" yaml:"Status,omitempty"` + Running bool `json:"Running,omitempty" yaml:"Running,omitempty"` + Paused bool `json:"Paused,omitempty" yaml:"Paused,omitempty"` + Restarting bool `json:"Restarting,omitempty" yaml:"Restarting,omitempty"` + OOMKilled bool `json:"OOMKilled,omitempty" yaml:"OOMKilled,omitempty"` + RemovalInProgress bool `json:"RemovalInProgress,omitempty" yaml:"RemovalInProgress,omitempty"` + Dead bool `json:"Dead,omitempty" yaml:"Dead,omitempty"` + Pid int `json:"Pid,omitempty" yaml:"Pid,omitempty"` + ExitCode int `json:"ExitCode,omitempty" yaml:"ExitCode,omitempty"` + Error string `json:"Error,omitempty" yaml:"Error,omitempty"` + StartedAt time.Time `json:"StartedAt,omitempty" yaml:"StartedAt,omitempty"` + FinishedAt time.Time `json:"FinishedAt,omitempty" yaml:"FinishedAt,omitempty"` +} + +// String returns a human-readable description of the state func (s *State) String() string { + if s.Running { + if s.Paused { + return fmt.Sprintf("Up %s (Paused)", units.HumanDuration(time.Now().UTC().Sub(s.StartedAt))) + } + if s.Restarting { + return fmt.Sprintf("Restarting (%d) %s ago", s.ExitCode, units.HumanDuration(time.Now().UTC().Sub(s.FinishedAt))) + } + + return fmt.Sprintf("Up %s", units.HumanDuration(time.Now().UTC().Sub(s.StartedAt))) + } + + if s.RemovalInProgress { + return "Removal In Progress" + } + + if s.Dead { + return "Dead" + } + + if s.StartedAt.IsZero() { + return "Created" + } + + if s.FinishedAt.IsZero() { + return "" + } + + return fmt.Sprintf("Exited (%d) %s ago", s.ExitCode, units.HumanDuration(time.Now().UTC().Sub(s.FinishedAt))) +} + +// StateString returns a single string to describe state +func (s *State) StateString() string { if s.Running { if s.Paused { return "paused" } - return fmt.Sprintf("Up %s", time.Now().UTC().Sub(s.StartedAt)) + if s.Restarting { + return "restarting" + } + return "running" + } + + if s.Dead { + return "dead" + } + + if s.StartedAt.IsZero() { + return "created" } - return fmt.Sprintf("Exit %d", s.ExitCode) + + return "exited" } // PortBinding represents the host/container port mapping as returned in the @@ -211,6 +275,7 @@ type Config struct { MemorySwap int64 `json:"MemorySwap,omitempty" yaml:"MemorySwap,omitempty"` MemoryReservation int64 `json:"MemoryReservation,omitempty" yaml:"MemoryReservation,omitempty"` KernelMemory int64 `json:"KernelMemory,omitempty" yaml:"KernelMemory,omitempty"` + PidsLimit int64 `json:"PidsLimit,omitempty" yaml:"PidsLimit,omitempty"` CPUShares int64 `json:"CpuShares,omitempty" yaml:"CpuShares,omitempty"` CPUSet string `json:"Cpuset,omitempty" yaml:"Cpuset,omitempty"` AttachStdin bool `json:"AttachStdin,omitempty" yaml:"AttachStdin,omitempty"` @@ -258,11 +323,6 @@ type LogConfig struct { Config map[string]string `json:"Config,omitempty" yaml:"Config,omitempty"` } -type BuildArg struct { - Name string `json:"Name,omitempty" yaml:"Name,omitempty"` - Value string `json:"Value,omitempty" yaml:"Value,omitempty"` -} - // ULimit defines system-wide resource limitations // This can help a lot in system administration, e.g. when a user starts too many processes and therefore makes the system unresponsive for other users. type ULimit struct { @@ -282,6 +342,12 @@ type SwarmNode struct { Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"` } +// GraphDriver contains information about the GraphDriver used by the container +type GraphDriver struct { + Name string `json:"Name,omitempty" yaml:"Name,omitempty"` + Data map[string]string `json:"Data,omitempty" yaml:"Data,omitempty"` +} + // Container is the type encompasing everything about a container - its config, // hostconfig, etc. type Container struct { @@ -309,10 +375,11 @@ type Container struct { Driver string `json:"Driver,omitempty" yaml:"Driver,omitempty"` Mounts []Mount `json:"Mounts,omitempty" yaml:"Mounts,omitempty"` - Volumes map[string]string `json:"Volumes,omitempty" yaml:"Volumes,omitempty"` - VolumesRW map[string]bool `json:"VolumesRW,omitempty" yaml:"VolumesRW,omitempty"` - HostConfig *HostConfig `json:"HostConfig,omitempty" yaml:"HostConfig,omitempty"` - ExecIDs []string `json:"ExecIDs,omitempty" yaml:"ExecIDs,omitempty"` + Volumes map[string]string `json:"Volumes,omitempty" yaml:"Volumes,omitempty"` + VolumesRW map[string]bool `json:"VolumesRW,omitempty" yaml:"VolumesRW,omitempty"` + HostConfig *HostConfig `json:"HostConfig,omitempty" yaml:"HostConfig,omitempty"` + ExecIDs []string `json:"ExecIDs,omitempty" yaml:"ExecIDs,omitempty"` + GraphDriver *GraphDriver `json:"GraphDriver,omitempty" yaml:"GraphDriver,omitempty"` RestartCount int `json:"RestartCount,omitempty" yaml:"RestartCount,omitempty"` @@ -323,16 +390,17 @@ type Container struct { // // See https://goo.gl/Y6fXUy for more details. type UpdateContainerOptions struct { - BlkioWeight int `json:"BlkioWeight"` - CPUShares int `json:"CpuShares"` - CPUPeriod int `json:"CpuPeriod"` - CPUQuota int `json:"CpuQuota"` - CpusetCpus string `json:"CpusetCpus"` - CpusetMems string `json:"CpusetMems"` - Memory int `json:"Memory"` - MemorySwap int `json:"MemorySwap"` - MemoryReservation int `json:"MemoryReservation"` - KernelMemory int `json:"KernelMemory"` + BlkioWeight int `json:"BlkioWeight"` + CPUShares int `json:"CpuShares"` + CPUPeriod int `json:"CpuPeriod"` + CPUQuota int `json:"CpuQuota"` + CpusetCpus string `json:"CpusetCpus"` + CpusetMems string `json:"CpusetMems"` + Memory int `json:"Memory"` + MemorySwap int `json:"MemorySwap"` + MemoryReservation int `json:"MemoryReservation"` + KernelMemory int `json:"KernelMemory"` + RestartPolicy RestartPolicy `json:"RestartPolicy,omitempty"` } // UpdateContainer updates the container at ID with the options @@ -544,6 +612,7 @@ type HostConfig struct { DNSSearch []string `json:"DnsSearch,omitempty" yaml:"DnsSearch,omitempty"` ExtraHosts []string `json:"ExtraHosts,omitempty" yaml:"ExtraHosts,omitempty"` VolumesFrom []string `json:"VolumesFrom,omitempty" yaml:"VolumesFrom,omitempty"` + UsernsMode string `json:"UsernsMode,omitempty" yaml:"UsernsMode,omitempty"` NetworkMode string `json:"NetworkMode,omitempty" yaml:"NetworkMode,omitempty"` IpcMode string `json:"IpcMode,omitempty" yaml:"IpcMode,omitempty"` PidMode string `json:"PidMode,omitempty" yaml:"PidMode,omitempty"` @@ -573,6 +642,7 @@ type HostConfig struct { Ulimits []ULimit `json:"Ulimits,omitempty" yaml:"Ulimits,omitempty"` VolumeDriver string `json:"VolumeDriver,omitempty" yaml:"VolumeDriver,omitempty"` OomScoreAdj int `json:"OomScoreAdj,omitempty" yaml:"OomScoreAdj,omitempty"` + ShmSize int64 `json:"ShmSize,omitempty" yaml:"ShmSize,omitempty"` } // StartContainer starts a container, returning an error in case of failure. @@ -700,7 +770,10 @@ func (c *Client) TopContainer(id string, psArgs string) (TopResult, error) { // // See https://goo.gl/GNmLHb for more details. type Stats struct { - Read time.Time `json:"read,omitempty" yaml:"read,omitempty"` + Read time.Time `json:"read,omitempty" yaml:"read,omitempty"` + PidsStats struct { + Current uint64 `json:"current,omitempty" yaml:"current,omitempty"` + } `json:"pids_stats,omitempty" yaml:"pids_stats,omitempty"` Network NetworkStats `json:"network,omitempty" yaml:"network,omitempty"` Networks map[string]NetworkStats `json:"networks,omitempty" yaml:"networks,omitempty"` MemoryStats struct { @@ -803,6 +876,9 @@ type StatsOptions struct { Done <-chan bool // Initial connection timeout Timeout time.Duration + // Timeout with no data is received, it's reset every time new data + // arrives + InactivityTimeout time.Duration `qs:"-"` } // Stats sends container statistics for the given container to the given channel. @@ -837,10 +913,11 @@ func (c *Client) Stats(opts StatsOptions) (retErr error) { go func() { err := c.stream("GET", fmt.Sprintf("/containers/%s/stats?stream=%v", opts.ID, opts.Stream), streamOptions{ - rawJSONStream: true, - useJSONDecoder: true, - stdout: writeCloser, - timeout: opts.Timeout, + rawJSONStream: true, + useJSONDecoder: true, + stdout: writeCloser, + timeout: opts.Timeout, + inactivityTimeout: opts.InactivityTimeout, }) if err != nil { dockerError, ok := err.(*Error) @@ -970,8 +1047,9 @@ func (c *Client) UploadToContainer(id string, opts UploadToContainerOptions) err // // See https://goo.gl/KnZJDX for more details. type DownloadFromContainerOptions struct { - OutputStream io.Writer `json:"-" qs:"-"` - Path string `qs:"path"` + OutputStream io.Writer `json:"-" qs:"-"` + Path string `qs:"path"` + InactivityTimeout time.Duration `qs:"-"` } // DownloadFromContainer downloads a tar archive of files or folders in a container. @@ -981,8 +1059,9 @@ func (c *Client) DownloadFromContainer(id string, opts DownloadFromContainerOpti url := fmt.Sprintf("/containers/%s/archive?", id) + queryString(opts) return c.stream("GET", url, streamOptions{ - setRawTerminal: true, - stdout: opts.OutputStream, + setRawTerminal: true, + stdout: opts.OutputStream, + inactivityTimeout: opts.InactivityTimeout, }) } @@ -1137,15 +1216,16 @@ func (c *Client) AttachToContainerNonBlocking(opts AttachToContainerOptions) (Cl // // See https://goo.gl/yl8PGm for more details. type LogsOptions struct { - Container string `qs:"-"` - OutputStream io.Writer `qs:"-"` - ErrorStream io.Writer `qs:"-"` - Follow bool - Stdout bool - Stderr bool - Since int64 - Timestamps bool - Tail string + Container string `qs:"-"` + OutputStream io.Writer `qs:"-"` + ErrorStream io.Writer `qs:"-"` + InactivityTimeout time.Duration `qs:"-"` + Follow bool + Stdout bool + Stderr bool + Since int64 + Timestamps bool + Tail string // Use raw terminal? Usually true when the container contains a TTY. RawTerminal bool `qs:"-"` @@ -1163,9 +1243,10 @@ func (c *Client) Logs(opts LogsOptions) error { } path := "/containers/" + opts.Container + "/logs?" + queryString(opts) return c.stream("GET", path, streamOptions{ - setRawTerminal: opts.RawTerminal, - stdout: opts.OutputStream, - stderr: opts.ErrorStream, + setRawTerminal: opts.RawTerminal, + stdout: opts.OutputStream, + stderr: opts.ErrorStream, + inactivityTimeout: opts.InactivityTimeout, }) } @@ -1189,8 +1270,9 @@ func (c *Client) ResizeContainerTTY(id string, height, width int) error { // // See https://goo.gl/dOkTyk for more details. type ExportContainerOptions struct { - ID string - OutputStream io.Writer + ID string + OutputStream io.Writer + InactivityTimeout time.Duration `qs:"-"` } // ExportContainer export the contents of container id as tar archive @@ -1203,8 +1285,9 @@ func (c *Client) ExportContainer(opts ExportContainerOptions) error { } url := fmt.Sprintf("/containers/%s/export", opts.ID) return c.stream("GET", url, streamOptions{ - setRawTerminal: true, - stdout: opts.OutputStream, + setRawTerminal: true, + stdout: opts.OutputStream, + inactivityTimeout: opts.InactivityTimeout, }) } diff --git a/vendor/github.com/fsouza/go-dockerclient/event.go b/vendor/github.com/fsouza/go-dockerclient/event.go index 6634e92..120cdc9 100644 --- a/vendor/github.com/fsouza/go-dockerclient/event.go +++ b/vendor/github.com/fsouza/go-dockerclient/event.go @@ -56,7 +56,7 @@ type eventMonitoringState struct { sync.RWMutex sync.WaitGroup enabled bool - lastSeen *int64 + lastSeen int64 C chan *APIEvents errC chan error listeners []chan<- *APIEvents @@ -162,8 +162,7 @@ func (eventState *eventMonitoringState) enableEventMonitoring(c *Client) error { defer eventState.Unlock() if !eventState.enabled { eventState.enabled = true - var lastSeenDefault = int64(0) - eventState.lastSeen = &lastSeenDefault + atomic.StoreInt64(&eventState.lastSeen, 0) eventState.C = make(chan *APIEvents, 100) eventState.errC = make(chan error, 1) go eventState.monitorEvents(c) @@ -226,11 +225,19 @@ func (eventState *eventMonitoringState) monitorEvents(c *Client) { func (eventState *eventMonitoringState) connectWithRetry(c *Client) error { var retries int - var err error - for err = c.eventHijack(atomic.LoadInt64(eventState.lastSeen), eventState.C, eventState.errC); err != nil && retries < maxMonitorConnRetries; retries++ { + eventState.RLock() + eventChan := eventState.C + errChan := eventState.errC + eventState.RUnlock() + err := c.eventHijack(atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan) + for ; err != nil && retries < maxMonitorConnRetries; retries++ { waitTime := int64(retryInitialWaitTime * math.Pow(2, float64(retries))) time.Sleep(time.Duration(waitTime) * time.Millisecond) - err = c.eventHijack(atomic.LoadInt64(eventState.lastSeen), eventState.C, eventState.errC) + eventState.RLock() + eventChan = eventState.C + errChan = eventState.errC + eventState.RUnlock() + err = c.eventHijack(atomic.LoadInt64(&eventState.lastSeen), eventChan, errChan) } return err } @@ -267,8 +274,8 @@ func (eventState *eventMonitoringState) sendEvent(event *APIEvents) { func (eventState *eventMonitoringState) updateLastSeen(e *APIEvents) { eventState.Lock() defer eventState.Unlock() - if atomic.LoadInt64(eventState.lastSeen) < e.Time { - atomic.StoreInt64(eventState.lastSeen, e.Time) + if atomic.LoadInt64(&eventState.lastSeen) < e.Time { + atomic.StoreInt64(&eventState.lastSeen, e.Time) } } @@ -310,10 +317,12 @@ func (c *Client) eventHijack(startTime int64, eventChan chan *APIEvents, errChan var event APIEvents if err = decoder.Decode(&event); err != nil { if err == io.EOF || err == io.ErrUnexpectedEOF { - if c.eventMonitor.isEnabled() { + c.eventMonitor.RLock() + if c.eventMonitor.enabled && c.eventMonitor.C == eventChan { // Signal that we're exiting. eventChan <- EOFEvent } + c.eventMonitor.RUnlock() break } errChan <- err @@ -321,7 +330,7 @@ func (c *Client) eventHijack(startTime int64, eventChan chan *APIEvents, errChan if event.Time == 0 { continue } - if !c.eventMonitor.isEnabled() { + if !c.eventMonitor.isEnabled() || c.eventMonitor.C != eventChan { return } transformEvent(&event) @@ -334,8 +343,8 @@ func (c *Client) eventHijack(startTime int64, eventChan chan *APIEvents, errChan // transformEvent takes an event and determines what version it is from // then populates both versions of the event func transformEvent(event *APIEvents) { - // if <= 1.21, `status` and `ID` will be populated - if event.Status != "" && event.ID != "" { + // if event version is <= 1.21 there will be no Action and no Type + if event.Action == "" && event.Type == "" { event.Action = event.Status event.Actor.ID = event.ID event.Actor.Attributes = map[string]string{} @@ -349,16 +358,22 @@ func transformEvent(event *APIEvents) { } } } else { - if event.Type == "image" || event.Type == "container" { - event.Status = event.Action - } else { - // Because just the Status has been overloaded with different Types - // if an event is not for an image or a container, we prepend the type - // to avoid problems for people relying on actions being only for - // images and containers - event.Status = event.Type + ":" + event.Action + if event.Status == "" { + if event.Type == "image" || event.Type == "container" { + event.Status = event.Action + } else { + // Because just the Status has been overloaded with different Types + // if an event is not for an image or a container, we prepend the type + // to avoid problems for people relying on actions being only for + // images and containers + event.Status = event.Type + ":" + event.Action + } + } + if event.ID == "" { + event.ID = event.Actor.ID + } + if event.From == "" { + event.From = event.Actor.Attributes["image"] } - event.ID = event.Actor.ID - event.From = event.Actor.Attributes["image"] } } diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go new file mode 100644 index 0000000..09d58bc --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_unix.go @@ -0,0 +1,14 @@ +// +build !windows + +package system + +import ( + "time" +) + +//setCTime will set the create time on a file. On Unix, the create +//time is updated as a side effect of setting the modified time, so +//no action is required. +func setCTime(path string, ctime time.Time) error { + return nil +} diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go new file mode 100644 index 0000000..2945868 --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go @@ -0,0 +1,27 @@ +// +build windows + +package system + +import ( + "syscall" + "time" +) + +//setCTime will set the create time on a file. On Windows, this requires +//calling SetFileTime and explicitly including the create time. +func setCTime(path string, ctime time.Time) error { + ctimespec := syscall.NsecToTimespec(ctime.UnixNano()) + pathp, e := syscall.UTF16PtrFromString(path) + if e != nil { + return e + } + h, e := syscall.CreateFile(pathp, + syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil, + syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0) + if e != nil { + return e + } + defer syscall.Close(h) + c := syscall.NsecToFiletime(syscall.TimespecToNsec(ctimespec)) + return syscall.SetFileTime(h, &c, nil, nil) +} diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go new file mode 100644 index 0000000..3c3b71f --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_openbsd.go @@ -0,0 +1,15 @@ +package system + +import ( + "syscall" +) + +// fromStatT creates a system.StatT type from a syscall.Stat_t type +func fromStatT(s *syscall.Stat_t) (*StatT, error) { + return &StatT{size: s.Size, + mode: uint32(s.Mode), + uid: s.Uid, + gid: s.Gid, + rdev: uint64(s.Rdev), + mtim: s.Mtim}, nil +} diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go index c6075d4..f53e9de 100644 --- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go +++ b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows,!freebsd,!solaris +// +build !linux,!windows,!freebsd,!solaris,!openbsd package system diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go index 0da42b1..dd13857 100644 --- a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go +++ b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context/context.go @@ -210,13 +210,13 @@ type CancelFunc func() // call cancel as soon as the operations running in this Context complete. func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { c := newCancelCtx(parent) - propagateCancel(parent, &c) - return &c, func() { c.cancel(true, Canceled) } + propagateCancel(parent, c) + return c, func() { c.cancel(true, Canceled) } } // newCancelCtx returns an initialized cancelCtx. -func newCancelCtx(parent Context) cancelCtx { - return cancelCtx{ +func newCancelCtx(parent Context) *cancelCtx { + return &cancelCtx{ Context: parent, done: make(chan struct{}), } @@ -259,7 +259,7 @@ func parentCancelCtx(parent Context) (*cancelCtx, bool) { case *cancelCtx: return c, true case *timerCtx: - return &c.cancelCtx, true + return c.cancelCtx, true case *valueCtx: parent = c.Context default: @@ -377,7 +377,7 @@ func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { // implement Done and Err. It implements cancel by stopping its timer then // delegating to cancelCtx.cancel. type timerCtx struct { - cancelCtx + *cancelCtx timer *time.Timer // Under cancelCtx.mu. deadline time.Time diff --git a/vendor/github.com/fsouza/go-dockerclient/image.go b/vendor/github.com/fsouza/go-dockerclient/image.go index 285b955..fd51c3f 100644 --- a/vendor/github.com/fsouza/go-dockerclient/image.go +++ b/vendor/github.com/fsouza/go-dockerclient/image.go @@ -29,9 +29,16 @@ type APIImages struct { Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"` } +// RootFS represents the underlying layers used by an image +type RootFS struct { + Type string `json:"Type,omitempty" yaml:"Type,omitempty"` + Layers []string `json:"Layers,omitempty" yaml:"Layers,omitempty"` +} + // Image is the type representing a docker image and its various properties type Image struct { ID string `json:"Id" yaml:"Id"` + RepoTags []string `json:"RepoTags,omitempty" yaml:"RepoTags,omitempty"` Parent string `json:"Parent,omitempty" yaml:"Parent,omitempty"` Comment string `json:"Comment,omitempty" yaml:"Comment,omitempty"` Created time.Time `json:"Created,omitempty" yaml:"Created,omitempty"` @@ -44,6 +51,7 @@ type Image struct { Size int64 `json:"Size,omitempty" yaml:"Size,omitempty"` VirtualSize int64 `json:"VirtualSize,omitempty" yaml:"VirtualSize,omitempty"` RepoDigests []string `json:"RepoDigests,omitempty" yaml:"RepoDigests,omitempty"` + RootFS *RootFS `json:"RootFS,omitempty" yaml:"RootFS,omitempty"` } // ImagePre012 serves the same purpose as the Image type except that it is for @@ -235,8 +243,9 @@ type PushImageOptions struct { // Registry server to push the image Registry string - OutputStream io.Writer `qs:"-"` - RawJSONStream bool `qs:"-"` + OutputStream io.Writer `qs:"-"` + RawJSONStream bool `qs:"-"` + InactivityTimeout time.Duration `qs:"-"` } // PushImage pushes an image to a remote registry, logging progress to w. @@ -257,10 +266,11 @@ func (c *Client) PushImage(opts PushImageOptions, auth AuthConfiguration) error opts.Name = "" path := "/images/" + name + "/push?" + queryString(&opts) return c.stream("POST", path, streamOptions{ - setRawTerminal: true, - rawJSONStream: opts.RawJSONStream, - headers: headers, - stdout: opts.OutputStream, + setRawTerminal: true, + rawJSONStream: opts.RawJSONStream, + headers: headers, + stdout: opts.OutputStream, + inactivityTimeout: opts.InactivityTimeout, }) } @@ -269,11 +279,13 @@ func (c *Client) PushImage(opts PushImageOptions, auth AuthConfiguration) error // // See https://goo.gl/iJkZjD for more details. type PullImageOptions struct { - Repository string `qs:"fromImage"` - Registry string - Tag string - OutputStream io.Writer `qs:"-"` - RawJSONStream bool `qs:"-"` + Repository string `qs:"fromImage"` + Registry string + Tag string + + OutputStream io.Writer `qs:"-"` + RawJSONStream bool `qs:"-"` + InactivityTimeout time.Duration `qs:"-"` } // PullImage pulls an image from a remote registry, logging progress to @@ -289,17 +301,18 @@ func (c *Client) PullImage(opts PullImageOptions, auth AuthConfiguration) error if err != nil { return err } - return c.createImage(queryString(&opts), headers, nil, opts.OutputStream, opts.RawJSONStream) + return c.createImage(queryString(&opts), headers, nil, opts.OutputStream, opts.RawJSONStream, opts.InactivityTimeout) } -func (c *Client) createImage(qs string, headers map[string]string, in io.Reader, w io.Writer, rawJSONStream bool) error { +func (c *Client) createImage(qs string, headers map[string]string, in io.Reader, w io.Writer, rawJSONStream bool, timeout time.Duration) error { path := "/images/create?" + qs return c.stream("POST", path, streamOptions{ - setRawTerminal: true, - rawJSONStream: rawJSONStream, - headers: headers, - in: in, - stdout: w, + setRawTerminal: true, + headers: headers, + in: in, + stdout: w, + rawJSONStream: rawJSONStream, + inactivityTimeout: timeout, }) } @@ -324,8 +337,9 @@ func (c *Client) LoadImage(opts LoadImageOptions) error { // // See https://goo.gl/le7vK8 for more details. type ExportImageOptions struct { - Name string - OutputStream io.Writer + Name string + OutputStream io.Writer + InactivityTimeout time.Duration `qs:"-"` } // ExportImage exports an image (as a tar file) into the stream. @@ -333,8 +347,9 @@ type ExportImageOptions struct { // See https://goo.gl/le7vK8 for more details. func (c *Client) ExportImage(opts ExportImageOptions) error { return c.stream("GET", fmt.Sprintf("/images/%s/get", opts.Name), streamOptions{ - setRawTerminal: true, - stdout: opts.OutputStream, + setRawTerminal: true, + stdout: opts.OutputStream, + inactivityTimeout: opts.InactivityTimeout, }) } @@ -342,8 +357,9 @@ func (c *Client) ExportImage(opts ExportImageOptions) error { // // See https://goo.gl/huC7HA for more details. type ExportImagesOptions struct { - Names []string - OutputStream io.Writer `qs:"-"` + Names []string + OutputStream io.Writer `qs:"-"` + InactivityTimeout time.Duration `qs:"-"` } // ExportImages exports one or more images (as a tar file) into the stream @@ -354,8 +370,9 @@ func (c *Client) ExportImages(opts ExportImagesOptions) error { return ErrMustSpecifyNames } return c.stream("GET", "/images/get?"+queryString(&opts), streamOptions{ - setRawTerminal: true, - stdout: opts.OutputStream, + setRawTerminal: true, + stdout: opts.OutputStream, + inactivityTimeout: opts.InactivityTimeout, }) } @@ -368,9 +385,10 @@ type ImportImageOptions struct { Source string `qs:"fromSrc"` Tag string `qs:"tag"` - InputStream io.Reader `qs:"-"` - OutputStream io.Writer `qs:"-"` - RawJSONStream bool `qs:"-"` + InputStream io.Reader `qs:"-"` + OutputStream io.Writer `qs:"-"` + RawJSONStream bool `qs:"-"` + InactivityTimeout time.Duration `qs:"-"` } // ImportImage imports an image from a url, a file or stdin @@ -391,7 +409,7 @@ func (c *Client) ImportImage(opts ImportImageOptions) error { opts.InputStream = f opts.Source = "-" } - return c.createImage(queryString(&opts), nil, opts.InputStream, opts.OutputStream, opts.RawJSONStream) + return c.createImage(queryString(&opts), nil, opts.InputStream, opts.OutputStream, opts.RawJSONStream, opts.InactivityTimeout) } // BuildImageOptions present the set of informations available for building an @@ -422,6 +440,17 @@ type BuildImageOptions struct { ContextDir string `qs:"-"` Ulimits []ULimit `qs:"-"` BuildArgs []BuildArg `qs:"-"` + InactivityTimeout time.Duration `qs:"-"` +} + +// BuildArg represents arguments that can be passed to the image when building +// it from a Dockerfile. +// +// For more details about the Docker building process, see +// http://goo.gl/tlPXPu. +type BuildArg struct { + Name string `json:"Name,omitempty" yaml:"Name,omitempty"` + Value string `json:"Value,omitempty" yaml:"Value,omitempty"` } // BuildImage builds an image from a tarball's url or a Dockerfile in the input @@ -477,11 +506,12 @@ func (c *Client) BuildImage(opts BuildImageOptions) error { } return c.stream("POST", fmt.Sprintf("/build?%s", qs), streamOptions{ - setRawTerminal: true, - rawJSONStream: opts.RawJSONStream, - headers: headers, - in: opts.InputStream, - stdout: opts.OutputStream, + setRawTerminal: true, + rawJSONStream: opts.RawJSONStream, + headers: headers, + in: opts.InputStream, + stdout: opts.OutputStream, + inactivityTimeout: opts.InactivityTimeout, }) } @@ -574,10 +604,10 @@ type APIImageSearch struct { // See https://goo.gl/AYjyrF for more details. func (c *Client) SearchImages(term string) ([]APIImageSearch, error) { resp, err := c.do("GET", "/images/search?term="+term, doOptions{}) - defer resp.Body.Close() if err != nil { return nil, err } + defer resp.Body.Close() var searchResult []APIImageSearch if err := json.NewDecoder(resp.Body).Decode(&searchResult); err != nil { return nil, err diff --git a/vendor/github.com/fsouza/go-dockerclient/network.go b/vendor/github.com/fsouza/go-dockerclient/network.go index 167f342..a681249 100644 --- a/vendor/github.com/fsouza/go-dockerclient/network.go +++ b/vendor/github.com/fsouza/go-dockerclient/network.go @@ -28,6 +28,7 @@ type Network struct { Containers map[string]Endpoint Options map[string]string Internal bool + EnableIPv6 bool `json:"EnableIPv6"` } // Endpoint contains network resources allocated and used for a container in a network @@ -111,7 +112,9 @@ type CreateNetworkOptions struct { CheckDuplicate bool `json:"CheckDuplicate"` Driver string `json:"Driver"` IPAM IPAMOptions `json:"IPAM"` - Options map[string]interface{} `json:"options"` + Options map[string]interface{} `json:"Options"` + Internal bool `json:"Internal"` + EnableIPv6 bool `json:"EnableIPv6"` } // IPAMOptions controls IP Address Management when creating a network @@ -119,7 +122,7 @@ type CreateNetworkOptions struct { // See https://goo.gl/T8kRVH for more details. type IPAMOptions struct { Driver string `json:"Driver"` - Config []IPAMConfig `json:"IPAMConfig"` + Config []IPAMConfig `json:"Config"` } // IPAMConfig represents IPAM configurations @@ -185,7 +188,8 @@ func (c *Client) RemoveNetwork(id string) error { return nil } -// NetworkConnectionOptions specify parameters to the ConnectNetwork and DisconnectNetwork function. +// NetworkConnectionOptions specify parameters to the ConnectNetwork and +// DisconnectNetwork function. // // See https://goo.gl/RV7BJU for more details. type NetworkConnectionOptions struct { @@ -207,7 +211,7 @@ type EndpointConfig struct { Aliases []string } -// EndpointIPAMCOnfig represents IPAM configurations for an +// EndpointIPAMConfig represents IPAM configurations for an // endpoint // // See https://goo.gl/RV7BJU for more details. @@ -216,7 +220,8 @@ type EndpointIPAMConfig struct { IPv6Address string `json:",omitempty"` } -// ConnectNetwork adds a container to a network or returns an error in case of failure. +// ConnectNetwork adds a container to a network or returns an error in case of +// failure. // // See https://goo.gl/6GugX3 for more details. func (c *Client) ConnectNetwork(id string, opts NetworkConnectionOptions) error { @@ -231,7 +236,8 @@ func (c *Client) ConnectNetwork(id string, opts NetworkConnectionOptions) error return nil } -// DisconnectNetwork removes a container from a network or returns an error in case of failure. +// DisconnectNetwork removes a container from a network or returns an error in +// case of failure. // // See https://goo.gl/6GugX3 for more details. func (c *Client) DisconnectNetwork(id string, opts NetworkConnectionOptions) error { @@ -255,7 +261,8 @@ func (err *NoSuchNetwork) Error() string { return fmt.Sprintf("No such network: %s", err.ID) } -// NoSuchNetwork is the error returned when a given network or container does not exist. +// NoSuchNetworkOrContainer is the error returned when a given network or +// container does not exist. type NoSuchNetworkOrContainer struct { NetworkID string ContainerID string diff --git a/vendor/github.com/fsouza/go-dockerclient/tls.go b/vendor/github.com/fsouza/go-dockerclient/tls.go index 55f4317..bb5790b 100644 --- a/vendor/github.com/fsouza/go-dockerclient/tls.go +++ b/vendor/github.com/fsouza/go-dockerclient/tls.go @@ -68,9 +68,8 @@ func tlsDialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Con // from the hostname we're connecting to. if config.ServerName == "" { // Make a copy to avoid polluting argument or default. - c := *config - c.ServerName = hostname - config = &c + config = copyTLSConfig(config) + config.ServerName = hostname } conn := tls.Client(rawConn, config) @@ -94,3 +93,26 @@ func tlsDialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Con // wrapper which holds both the TLS and raw connections. return &tlsClientCon{conn, rawConn}, nil } + +// this exists to silent an error message in go vet +func copyTLSConfig(cfg *tls.Config) *tls.Config { + return &tls.Config{ + Certificates: cfg.Certificates, + CipherSuites: cfg.CipherSuites, + ClientAuth: cfg.ClientAuth, + ClientCAs: cfg.ClientCAs, + ClientSessionCache: cfg.ClientSessionCache, + CurvePreferences: cfg.CurvePreferences, + InsecureSkipVerify: cfg.InsecureSkipVerify, + MaxVersion: cfg.MaxVersion, + MinVersion: cfg.MinVersion, + NameToCertificate: cfg.NameToCertificate, + NextProtos: cfg.NextProtos, + PreferServerCipherSuites: cfg.PreferServerCipherSuites, + Rand: cfg.Rand, + RootCAs: cfg.RootCAs, + ServerName: cfg.ServerName, + SessionTicketKey: cfg.SessionTicketKey, + SessionTicketsDisabled: cfg.SessionTicketsDisabled, + } +} diff --git a/vendor/github.com/fsouza/go-dockerclient/volume.go b/vendor/github.com/fsouza/go-dockerclient/volume.go index 0e57cb1..5fe8ee3 100644 --- a/vendor/github.com/fsouza/go-dockerclient/volume.go +++ b/vendor/github.com/fsouza/go-dockerclient/volume.go @@ -22,9 +22,10 @@ var ( // // See https://goo.gl/FZA4BK for more details. type Volume struct { - Name string `json:"Name" yaml:"Name"` - Driver string `json:"Driver,omitempty" yaml:"Driver,omitempty"` - Mountpoint string `json:"Mountpoint,omitempty" yaml:"Mountpoint,omitempty"` + Name string `json:"Name" yaml:"Name"` + Driver string `json:"Driver,omitempty" yaml:"Driver,omitempty"` + Mountpoint string `json:"Mountpoint,omitempty" yaml:"Mountpoint,omitempty"` + Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"` } // ListVolumesOptions specify parameters to the ListVolumes function. From 240ee4e95e292a43ab24c1837504af609f11a0eb Mon Sep 17 00:00:00 2001 From: Will Glynn Date: Wed, 11 Jul 2018 23:19:03 -0500 Subject: [PATCH 3/3] Update Travis config We should probably test against the latest 1.x version of Go, but we can also continue testing against 1.6 if we want. In either case we don't need `make get-deps`, since dependencies are (and have been) vendored. Future editors of this file: this is precariously close to a loaded footgun. https://twitter.com/davecheney/status/964669282855485440 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f55439e..48b45c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ language: go go: - 1.6 -install: make get-deps + - "1.x"