diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..e2ec72d488 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +vendor.mod linguist-language=Go-Module +vendor.sum linguist-language=Go-Checksums diff --git a/.gitignore b/.gitignore index 1605fa8930..c2c287498a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,8 @@ vendor/pkg/ go-test-report.json profile.out junit-report.xml + +# top-level go.mod is not meant to be checked in +/go.mod +# workaround go.mod for autogen/winresources/dockerd +/hack/make/.resources-windows/go.mod diff --git a/Dockerfile b/Dockerfile index 98b8fba5e6..2934a6446c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -155,26 +155,13 @@ FROM base AS tomll # in CI in the hack/validate/toml script. # # When updating this version, consider updating the github.com/pelletier/go-toml -# dependency in vendor.conf accordingly. +# dependency in vendor.mod accordingly. ARG GOTOML_VERSION=v1.8.1 RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ GOBIN=/build/ GO111MODULE=on go install "github.com/pelletier/go-toml/cmd/tomll@${GOTOML_VERSION}" \ && /build/tomll --help -FROM base AS vndr -# VNDR_VERSION specifies the version of the vndr tool to build and install -# from the https://github.com/LK4D4/vndr repository. -# -# The vndr tool is used to manage vendored go packages in the vendor directory, -# and is pinned to a fixed version because different versions of this tool -# can result in differences in the (go) files that are considered for vendoring. -ARG VNDR_VERSION=v0.1.2 -RUN --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=/go/pkg/mod \ - GOBIN=/build/ GO111MODULE=on go install "github.com/LK4D4/vndr@${VNDR_VERSION}" \ - && /build/vndr --help - FROM dev-base AS containerd ARG DEBIAN_FRONTEND RUN --mount=type=cache,sharing=locked,id=moby-containerd-aptlib,target=/var/lib/apt \ @@ -318,7 +305,6 @@ COPY --from=tomll /build/ /usr/local/bin/ COPY --from=tini /build/ /usr/local/bin/ COPY --from=registry /build/ /usr/local/bin/ COPY --from=criu /build/ /usr/local/bin/ -COPY --from=vndr /build/ /usr/local/bin/ COPY --from=gotestsum /build/ /usr/local/bin/ COPY --from=golangci_lint /build/ /usr/local/bin/ COPY --from=shfmt /build/ /usr/local/bin/ diff --git a/Makefile b/Makefile index c7cd97f79a..4d3170f8ae 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ DOCKER_MOUNT := $(if $(DOCKER_BINDDIR_MOUNT_OPTS),$(DOCKER_MOUNT):$(DOCKER_BINDD # Note that `BIND_DIR` will already be set to `bundles` if `DOCKER_HOST` is not set (see above BIND_DIR line), in such case this will do nothing since `DOCKER_MOUNT` will already be set. DOCKER_MOUNT := $(if $(DOCKER_MOUNT),$(DOCKER_MOUNT),-v /go/src/github.com/docker/docker/bundles) -v "$(CURDIR)/.git:/go/src/github.com/docker/docker/.git" -DOCKER_MOUNT_CACHE := -v docker-dev-cache:/root/.cache +DOCKER_MOUNT_CACHE := -v docker-dev-cache:/root/.cache -v docker-mod-cache:/go/pkg/mod/ DOCKER_MOUNT_CLI := $(if $(DOCKER_CLI_PATH),-v $(shell dirname $(DOCKER_CLI_PATH)):/usr/local/cli,) DOCKER_MOUNT_BASH_COMPLETION := $(if $(DOCKER_BASH_COMPLETION_PATH),-v $(shell dirname $(DOCKER_BASH_COMPLETION_PATH)):/usr/local/completion/bash,) DOCKER_MOUNT := $(DOCKER_MOUNT) $(DOCKER_MOUNT_CACHE) $(DOCKER_MOUNT_CLI) $(DOCKER_MOUNT_BASH_COMPLETION) @@ -189,8 +189,8 @@ bundles: clean: clean-cache .PHONY: clean-cache -clean-cache: - docker volume rm -f docker-dev-cache +clean-cache: ## remove the docker volumes that are used for caching in the dev-container + docker volume rm -f docker-dev-cache docker-mod-cache help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) diff --git a/hack/README.md b/hack/README.md index a9a948ee2b..8310b45831 100644 --- a/hack/README.md +++ b/hack/README.md @@ -51,5 +51,4 @@ refer to ## Vendor (vendor.sh) -A shell script that is a wrapper around Vndr. For information on how to use -this, please refer to [vndr's README](https://github.com/LK4D4/vndr/blob/master/README.md) +A shell script that is a wrapper around `go mod vendor`. diff --git a/hack/dockerfile/install/containerd.installer b/hack/dockerfile/install/containerd.installer index 59247fbf8c..be42db4925 100755 --- a/hack/dockerfile/install/containerd.installer +++ b/hack/dockerfile/install/containerd.installer @@ -11,7 +11,7 @@ set -e # # Generally, the commit specified here should match a tagged release. # -# The containerd golang package is also pinned in vendor.conf. When updating +# The containerd golang package is also pinned in vendor.mod. When updating # the binary version you may also need to update the vendor version to pick up # bug fixes or new APIs, however, usually the Go packages are built from a # commit from the master branch. diff --git a/hack/dockerfile/install/runc.installer b/hack/dockerfile/install/runc.installer index bd07d74e82..47157979bb 100755 --- a/hack/dockerfile/install/runc.installer +++ b/hack/dockerfile/install/runc.installer @@ -8,7 +8,7 @@ set -e # version that is used. If you need to update runc, open a pull request in # the containerd project first, and update both after that is merged. # -# When updating RUNC_VERSION, consider updating runc in vendor.conf accordingly +# When updating RUNC_VERSION, consider updating runc in vendor.mod accordingly : "${RUNC_VERSION:=v1.0.3}" install_runc() { diff --git a/hack/go-mod-prepare.sh b/hack/go-mod-prepare.sh new file mode 100755 index 0000000000..2ced8917a4 --- /dev/null +++ b/hack/go-mod-prepare.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +ROOTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +cat > "${ROOTDIR}/go.mod" << EOF +module github.com/docker/docker + +go 1.17 +EOF + +cat > "${ROOTDIR}/hack/make/.resources-windows/go.mod" << EOF +module github.com/docker/docker/autogen/winresources/dockerd + +go 1.17 +EOF diff --git a/hack/validate/vendor b/hack/validate/vendor index 5d3121b4c9..9b704c8ac9 100755 --- a/hack/validate/vendor +++ b/hack/validate/vendor @@ -3,21 +3,27 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "${SCRIPTDIR}/.validate" +go_mod_tidy(){ + ${SCRIPTDIR}/../go-mod-prepare.sh + GO111MODULE=auto go mod tidy -modfile 'vendor.mod' -compat 1.17 +} + validate_vendor_diff(){ IFS=$'\n' + check_files=( 'vendor.sum' 'vendor.mod' 'vendor/' ) # shellcheck disable=SC2207 - files=( $(validate_diff --diff-filter=ACMR --name-only -- 'vendor.conf' 'vendor/' || true) ) + changed_files=( $(validate_diff --diff-filter=ACMR --name-only -- "${check_files[@]}" || true) ) unset IFS - if [ -n "${TEST_FORCE_VALIDATE:-}" ] || [ ${#files[@]} -gt 0 ]; then + if [ -n "${TEST_FORCE_VALIDATE:-}" ] || [ "${#changed_files[@]}" -gt 0 ]; then # recreate vendor/ ./hack/vendor.sh # check if any files have changed - diffs="$(git status --porcelain -- vendor 2>/dev/null)" + diffs="$(git status --porcelain -- "${check_files[@]}" 2>/dev/null)" mfiles="$(echo "$diffs" | awk '/^ M / {print $2}')" if [ "$diffs" ]; then { - echo 'The result of vndr differs' + echo 'The result of go mod vendor differs' echo echo "$diffs" echo @@ -39,16 +45,15 @@ validate_vendor_diff(){ # 1. make sure all the vendored packages are used # 2. make sure all the packages contain license information (just warning, because it can cause false-positive) validate_vendor_used() { - for f in $(mawk '/^[a-zA-Z0-9]/ { print $1 }' vendor.conf); do + for f in $(mawk '$1 = "#" { print $2 }' 'vendor/modules.txt'); do if [ -d "vendor/$f" ]; then if ! echo "vendor/$f"/* | grep -qiEc '/(LICENSE|COPYING)'; then echo "WARNING: could not find copyright information for $f" fi - else - echo "WARNING: $f is vendored but unused" fi done } +go_mod_tidy validate_vendor_diff validate_vendor_used diff --git a/hack/vendor.sh b/hack/vendor.sh index 893b5b7cd0..ad104f9504 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -1,28 +1,27 @@ #!/usr/bin/env bash -# This file is just wrapper around vndr (github.com/LK4D4/vndr) tool. -# For updating dependencies you should change `vendor.conf` file in root of the -# project. Please refer to https://github.com/LK4D4/vndr/blob/master/README.md for -# vndr usage. +# This file is just wrapper around 'go mod vendor' tool. +# For updating dependencies you should change `vendor.mod` file in root of the +# project. set -e +set -x -if ! hash vndr; then - echo "Please install vndr with \"go get github.com/LK4D4/vndr\" and put it in your \$GOPATH" - exit 1 +SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +${SCRIPTDIR}/go-mod-prepare.sh + +if [ $# -eq 0 ] || [ "$1" != "archive/tar" ]; then + GO111MODULE=auto go mod vendor -modfile vendor.mod fi if [ $# -eq 0 ] || [ "$1" = "archive/tar" ]; then echo "update vendored copy of archive/tar" : "${GO_VERSION:=$(awk -F '[ =]' '$1 == "ARG" && $2 == "GO_VERSION" { print $3; exit }' ./Dockerfile)}" - rm -rf vendor/archive - mkdir -p ./vendor/archive/tar + rm -rf vendor/archive/tar + mkdir -p vendor/archive/tar echo "downloading: https://golang.org/dl/go${GO_VERSION%.0}.src.tar.gz" curl -fsSL "https://golang.org/dl/go${GO_VERSION%.0}.src.tar.gz" \ | tar --extract --gzip --directory=vendor/archive/tar --strip-components=4 go/src/archive/tar patch --strip=4 --directory=vendor/archive/tar --input="$PWD/patches/0001-archive-tar-do-not-populate-user-group-names.patch" fi -if [ $# -eq 0 ] || [ "$1" != "archive/tar" ]; then - vndr -whitelist='^archive[/\\]tar' "$@" -fi diff --git a/project/PACKAGERS.md b/project/PACKAGERS.md index 23c963c725..502a3808b1 100644 --- a/project/PACKAGERS.md +++ b/project/PACKAGERS.md @@ -32,7 +32,7 @@ build, so the source of truth for the current version of each dependency is whatever is in "./vendor". If you would rather (or must, due to distro policy) package these dependencies -yourself, take a look at "vendor.conf" for an easy-to-parse list of the +yourself, take a look at "vendor.mod" for an easy-to-parse list of the exact version for each. ## Stripping Binaries diff --git a/vendor.conf b/vendor.conf deleted file mode 100644 index 106df32a6d..0000000000 --- a/vendor.conf +++ /dev/null @@ -1,184 +0,0 @@ -github.com/Azure/go-ansiterm d185dfc1b5a126116ea5a19e148e29d16b4574c9 -github.com/Microsoft/hcsshim 133feb626666d38630976b19f742431f31cee604 # v0.8.23 -github.com/Microsoft/go-winio 6c24dfa01eb5906508a5ad06f4f6534a9be47456 # v0.5.1 -github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a -github.com/golang/gddo 72a348e765d293ed6d1ded7b699591f14d6cd921 -github.com/google/uuid 0cd6bf5da1e1c83f8b45653022c74f71af0538a4 # v1.1.1 -github.com/gorilla/mux 98cb6bf42e086f6af920b965c38cacc07402d51b # v1.8.0 -github.com/moby/locker 281af2d563954745bea9d1487c965f24d30742fe # v1.0.1 -github.com/moby/term 3f7ff695adc6a35abc925370dd0a4dafb48ec64d - -# Note that this dependency uses submodules, providing the github.com/moby/sys/mount, -# github.com/moby/sys/mountinfo, github.com/moby/sys/signal, and github.com/moby/sys/symlink -# modules. Our vendoring tool (vndr) currently does not support submodules / vendoring sub-paths, -# so we vendor the top-level moby/sys repository (which contains both) and pick the most recent tag, -# which could be either `mountinfo/vX.Y.Z`, `mount/vX.Y.Z`, `signal/vX.Y.Z`, or `symlink/vX.Y.Z`. -github.com/moby/sys 03b9f8d59a07f5206a2264105f4903a222aea964 # signal/v0.6.0 - -github.com/creack/pty 2a38352e8b4d7ab6c336eef107e42a55e72e7fbc # v1.1.11 -github.com/sirupsen/logrus bdc0db8ead3853c56b7cd1ac2ba4e11b47d7da6b # v1.8.1 -github.com/tchap/go-patricia a7f0089c6f496e8e70402f61733606daa326cac5 # v2.3.0 -golang.org/x/net e18ecbb051101a46fc263334b127c89bc7bff7ea -golang.org/x/sys 69cdffdb9359ff97d91e4f4fbb6b2714c3898eae -github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca29a810482bfb1 # v0.4.0 -github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0 -golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3 -gotest.tools/v3 568bc57cc5c19a2ef85e5749870b49a4cc2ab54d # v3.0.3 -github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029 # v0.2.0 - -github.com/RackSec/srslog a4725f04ec91af1a91b380da679d6e0c2f061e59 -github.com/imdario/mergo 29fb3d3bdc5512887f1dc9aedde6a0fed407fa8f # v0.3.12 -golang.org/x/sync 036812b2e83c0ddf193dd5a34e034151da389d09 - -# buildkit -github.com/moby/buildkit 9f254e18360a24c2ae47b26f772c3c89533bcbb7 # master / v0.9.0-dev -github.com/tonistiigi/fsutil d72af97c0eaf93c1d20360e3cb9c63c223675b83 -github.com/tonistiigi/units 6950e57a87eaf136bbe44ef2ec8e75b9e3569de2 -github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 -github.com/opentracing/opentracing-go d34af3eaa63c4d08ab54863a4bdd0daa45212e12 # v1.2.0 -github.com/google/shlex e7afc7fbc51079733e9468cdfd1efcd7d196cd1d -github.com/opentracing-contrib/go-stdlib 8a6ff1ad1691a29e4f7b5d46604f97634997c8c4 # v1.0.0 -github.com/mitchellh/hashstructure a38c50148365edc8df43c1580c48fb2b3a1e9cd7 # v1.0.0 -github.com/gofrs/flock 6caa7350c26b838538005fae7dbee4e69d9398db # v0.7.3 -github.com/grpc-ecosystem/go-grpc-middleware 3c51f7f332123e8be5a157c0802a228ac85bf9db # v1.2.0 - -# libnetwork - -github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f -github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 -github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec -github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b -github.com/hashicorp/memberlist 619135cdd9e5dda8c12f8ceef39bdade4f5899b6 # v0.2.4 -github.com/sean-/seed e2103e2c35297fb7e17febb81e49b312087a2372 -github.com/hashicorp/errwrap 8a6fb523712970c966eefc6b39ed2c5e74880354 # v1.0.0 -github.com/hashicorp/go-sockaddr c7188e74f6acae5a989bdc959aa779f8b9f42faf # v1.0.2 -github.com/hashicorp/go-multierror 886a7fbe3eb1c874d46f623bfa70af45f425b3d1 # v1.0.0 -github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870 -github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b -github.com/vishvananda/netns db3c7e526aae966c4ccfa6c8189b693d6ac5d202 -github.com/vishvananda/netlink f049be6f391489d3f374498fe0c8df8449258372 # v1.1.0 -github.com/moby/ipvs 4566ccea0e08d68e9614c3e7a64a23b850c4bb35 # v1.0.1 -github.com/google/btree 479b5e81b0a93ec038d201b0b33d17db599531d3 # v1.0.1 - -github.com/deckarep/golang-set ef32fa3046d9f249d399f98ebaf9be944430fd1d -github.com/miekg/dns 6c0c4e6581f8e173cc562c8b3363ab984e4ae071 # v1.1.27 -github.com/ishidawataru/sctp f2269e66cdee387bd321445d5d300893449805be -go.etcd.io/bbolt 232d8fc87f50244f9c808f4745759e08a304c029 # v1.3.5 - -# get graph and distribution packages -github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 -github.com/vbatts/tar-split 80a436fd6164c557b131f7c59ed69bd81af69761 # v0.11.2 -github.com/opencontainers/go-digest ea51bea511f75cfa3ef6098cc253c5c3609b037a # v1.0.0 - -# get go-zfs packages -github.com/mistifyio/go-zfs f784269be439d704d3dfa1906f45dd848fed2beb - -google.golang.org/grpc f495f5b15ae7ccda3b38c53a1bfcde4c1a58a2bc # v1.27.1 - -# The version of runc should match the version that is used by the containerd -# version that is used. If you need to update runc, open a pull request in -# the containerd project first, and update both after that is merged. -# This commit does not need to match RUNC_COMMIT as it is used for helper -# packages but should be newer or equal. -github.com/opencontainers/runc f46b6ba2c9314cfc8caae24a32ec5fe9ef1059fe # v1.0.3 -github.com/opencontainers/runtime-spec 1c3f411f041711bbeecf35ff7e93461ea6789220 # v1.0.3-0.20210326190908-1c3f411f0417 -github.com/opencontainers/image-spec 67d2d5658fe0476ab9bf414cec164077ebff3920 # v1.0.2 -github.com/cyphar/filepath-securejoin a261ee33d7a517f054effbf451841abaafe3e0fd # v0.2.2 - -# go-systemd v17 is required by github.com/coreos/pkg/capnslog/journald_formatter.go -github.com/coreos/go-systemd 39ca1b05acc7ad1220e09f133283b8859a8b71ab # v17 - -# systemd integration (journald, daemon/listeners, containerd/cgroups) -github.com/coreos/go-systemd/v22 777e73a89cef78631ccaa97f53a9bae67e166186 # v22.3.2 -github.com/godbus/dbus/v5 c88335c0b1d28a30e7fc76d526a06154b85e5d97 # v5.0.4 - -# gelf logging driver deps -github.com/Graylog2/go-gelf 1550ee647df0510058c9d67a45c56f18911d80b8 # v2 branch - -# fluent-logger-golang deps -github.com/fluent/fluent-logger-golang 5538e904aeb515c10a624da620581bdf420d4b8a # v1.9.0 -github.com/philhofer/fwd bb6d471dc95d4fe11e432687f8b70ff496cf3136 # v1.0.0 -github.com/tinylib/msgp af6442a0fcf6e2a1b824f70dd0c734f01e817751 # v1.1.0 - -# fsnotify -github.com/fsnotify/fsnotify 45d7d09e39ef4ac08d493309fa031790c15bfe8a # v1.4.9 - -# awslogs deps -github.com/aws/aws-sdk-go 2590bc875c54c9fda225d8e4e56a9d28d90c6a47 # v1.28.11 -github.com/jmespath/go-jmespath 2d053f87d1d7f9f48196ae04cf3daea4273d207d # v0.3.0 - -# logentries -github.com/bsphere/le_go 7a984a84b5492ae539b79b62fb4a10afc63c7bcf - -# gcplogs deps -golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303 -google.golang.org/api dec2ee309f5b09fc59bc40676447c15736284d78 # v0.8.0 -github.com/golang/groupcache 869f871628b6baa9cfbc11732cdf6546b17c1298 -go.opencensus.io d835ff86be02193d324330acdb7d65546b05f814 # v0.22.3 -cloud.google.com/go ceeb313ad77b789a7fa5287b36a1d127b69b7093 # v0.44.3 -github.com/googleapis/gax-go bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2 # v2.0.5 -google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6c7065a3160e8 - -# containerd -github.com/containerd/containerd 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71 # v1.5.8 -github.com/containerd/fifo 650e8a8a179d040123db61f016cb133143e7a581 # v1.0.0 -github.com/containerd/continuity bce1c3f9669b6f3e7f6656ee715b0b4d75fa64a6 # v0.1.0 -github.com/containerd/cgroups b9de8a2212026c07cec67baf3323f1fc0121e048 # v1.0.1 -github.com/containerd/console 2f1e3d2b6afd18e8b2077816c711205a0b4d8769 # v1.0.2 -github.com/containerd/go-runc 16b287bc67d069a60fa48db15f330b790b74365b # v1.0.0 -github.com/containerd/typeurl 5e43fb8b75ed2f2305fc04e6918c8d10636771bc # v1.0.2 -github.com/containerd/ttrpc 0247db16a1f98bb76731a12ad72b8d49705b38b3 # v1.1.0 -github.com/gogo/googleapis 01e0f9cca9b92166042241267ee2a5cdf5cff46c # v1.3.2 -github.com/cilium/ebpf ca492085341e0e917f48ec30704d5054c5d42ca8 # v0.6.2 -github.com/klauspost/compress a3b7545c88eea469c2246bee0e6c130525d56190 # v1.11.13 -github.com/pelletier/go-toml 65ca8064882c8c308e5c804c5d5443d409e0738c # v1.8.1 - -# cluster -github.com/docker/swarmkit 3629f50980f6c0dd5ccd7dbfa0956b57ea0cd78d # master -github.com/gogo/protobuf b03c65ea87cdc3521ede29f62fe3ce239267c1bc # v1.3.2 -github.com/golang/protobuf 84668698ea25b64748563aa20726db66a6b8d299 # v1.3.5 -github.com/cloudflare/cfssl 5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2 -github.com/fernet/fernet-go 9eac43b88a5efb8651d24de9b68e87567e029736 -github.com/google/certificate-transparency-go 37a384cd035e722ea46e55029093e26687138edf # v1.0.20 -golang.org/x/crypto 5770296d904e90f15f38f77dfc2e43fdf5efc083 -golang.org/x/time 3af7569d3a1e776fc2a3c1cec133b43105ea9c2e -github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad -github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git -github.com/hashicorp/golang-lru 7f827b33c0f158ec5dfbba01bb0b14a4541fd81d # v0.5.3 -github.com/coreos/etcd 973882f697a8db3d59815bf132c6c506434334bd # v3.3.27 -github.com/coreos/pkg 97fdf19511ea361ae1c100dd393cc47f8dcfa1e1 # v4 -code.cloudfoundry.org/clock 02e53af36e6c978af692887ed449b74026d76fec # v1.0.0 - -# prometheus -github.com/prometheus/client_golang 6edbbd9e560190e318cdc5b4d3e630b442858380 # v1.6.0 -github.com/beorn7/perks 37c8de3658fcb183f997c4e13e8337516ab753e6 # v1.0.1 -github.com/prometheus/client_model 7bc5445566f0fe75b15de23e6b93886e982d7bf9 # v0.2.0 -github.com/prometheus/common d978bcb1309602d68bb4ba69cf3f8ed900e07308 # v0.9.1 -github.com/prometheus/procfs 46159f73e74d1cb8dc223deef9b2d049286f46b1 # v0.0.11 -github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1 -github.com/pkg/errors 614d223910a179a466c1767a985424175c39b465 # v0.9.1 -github.com/grpc-ecosystem/go-grpc-prometheus c225b8c3b01faf2899099b768856a9e916e5087b # v1.2.0 -github.com/cespare/xxhash/v2 d7df74196a9e781ede915320c11c378c1b2f3a1f # v2.1.1 - -# cli -github.com/spf13/cobra 8380ddd3132bdf8fd77731725b550c181dda0aa8 # v1.1.3 -github.com/spf13/pflag 2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab # v1.0.5 -github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0 -github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b # v1.0.0 - -# metrics -github.com/docker/go-metrics b619b3592b65de4f087d9f16863a7e6ff905973c # v0.0.1 - -github.com/opencontainers/selinux 95d3852f356b31cbb2d84040ffca303911d08273 # v1.9.1 - - -# archive/tar -# rm -rf vendor/archive -# mkdir -p ./vendor/archive -# git clone -b go$GOLANG_VERSION --depth=1 git://github.com/golang/go.git ./go -# git --git-dir ./go/.git --work-tree ./go am ../patches/0001-archive-tar-do-not-populate-user-group-names.patch -# cp -a go/src/archive/tar ./vendor/archive/tar -# rm -rf ./go -# vndr -whitelist=^archive/tar - -# DO NOT EDIT BELOW THIS LINE -------- reserved for downstream projects -------- diff --git a/vendor.mod b/vendor.mod new file mode 100644 index 0000000000..87e1687aab --- /dev/null +++ b/vendor.mod @@ -0,0 +1,193 @@ +// 'vendor.mod' enables use of 'go mod vendor' to managed 'vendor/' directory. +// There is no 'go.mod' file, as that would imply opting in for all the rules +// around SemVer, which this repo cannot abide by as it uses CalVer. + +module github.com/docker/docker + +go 1.17 + +require ( + cloud.google.com/go v0.81.0 + cloud.google.com/go/logging v1.4.2 + github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0 + github.com/Microsoft/go-winio v0.5.1 + github.com/Microsoft/hcsshim v0.8.23 + github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91 + github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 + github.com/aws/aws-sdk-go v1.28.11 + github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549 + github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5 + github.com/containerd/cgroups v1.0.1 + github.com/containerd/containerd v1.5.8 + github.com/containerd/continuity v0.1.0 + github.com/containerd/fifo v1.0.0 + github.com/containerd/typeurl v1.0.2 + github.com/coreos/go-systemd/v22 v22.3.2 + github.com/creack/pty v1.1.11 + github.com/deckarep/golang-set v0.0.0-20141123011944-ef32fa3046d9 + github.com/docker/distribution v2.7.1+incompatible + github.com/docker/docker/autogen/winresources/dockerd v0.0.0-00010101000000-000000000000 + github.com/docker/go-connections v0.4.0 + github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c + github.com/docker/go-metrics v0.0.1 + github.com/docker/go-units v0.4.0 + github.com/docker/libkv v0.2.2-0.20211217103745-e480589147e3 + github.com/docker/libtrust v0.0.0-20150526203908-9cbd2a1374f4 + github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6 + github.com/fluent/fluent-logger-golang v1.9.0 + github.com/fsnotify/fsnotify v1.4.9 + github.com/godbus/dbus/v5 v5.0.4 + github.com/gogo/protobuf v1.3.2 + github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2 + github.com/google/go-cmp v0.5.5 + github.com/google/uuid v1.3.0 + github.com/gorilla/mux v1.8.0 + github.com/hashicorp/go-immutable-radix v1.0.0 + github.com/hashicorp/go-memdb v0.0.0-20161216180745-cb9a474f84cc + github.com/hashicorp/memberlist v0.2.4 + github.com/hashicorp/serf v0.8.2 + github.com/imdario/mergo v0.3.12 + github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee + github.com/klauspost/compress v1.12.3 + github.com/miekg/dns v1.1.27 + github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible + github.com/moby/buildkit v0.8.2-0.20210615162540-9f254e18360a + github.com/moby/ipvs v1.0.1 + github.com/moby/locker v1.0.1 + github.com/moby/sys/mount v0.3.0 + github.com/moby/sys/mountinfo v0.5.0 + github.com/moby/sys/signal v0.6.0 + github.com/moby/sys/symlink v0.2.0 + github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 + github.com/morikuni/aec v1.0.0 + github.com/opencontainers/go-digest v1.0.0 + github.com/opencontainers/image-spec v1.0.2 + github.com/opencontainers/runc v1.0.3 + github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 + github.com/opencontainers/selinux v1.9.1 + github.com/pelletier/go-toml v1.9.1 + github.com/pkg/errors v0.9.1 + github.com/prometheus/client_golang v1.11.0 + github.com/sirupsen/logrus v1.8.1 + github.com/spf13/cobra v1.1.3 + github.com/spf13/pflag v1.0.5 + github.com/tchap/go-patricia v2.3.0+incompatible + github.com/tonistiigi/fsutil v0.0.0-20210609172227-d72af97c0eaf + github.com/vbatts/tar-split v0.11.2 + github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 + github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae + go.etcd.io/bbolt v1.3.6 + golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c + golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 + golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 + google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa + google.golang.org/grpc v1.40.0 + gotest.tools/v3 v3.0.3 +) + +require ( + code.cloudfoundry.org/clock v1.0.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cilium/ebpf v0.6.2 // indirect + github.com/containerd/console v1.0.2 // indirect + github.com/containerd/go-runc v1.0.0 // indirect + github.com/containerd/ttrpc v1.1.0 // indirect + github.com/coreos/etcd v3.3.27+incompatible // indirect + github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect + github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect + github.com/cyphar/filepath-securejoin v0.2.2 // indirect + github.com/fernet/fernet-go v0.0.0-20180830025343-9eac43b88a5e // indirect + github.com/gofrs/flock v0.7.3 // indirect + github.com/gogo/googleapis v1.4.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/btree v1.0.1 // indirect + github.com/google/certificate-transparency-go v1.0.20 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-msgpack v0.5.3 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-sockaddr v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.3 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.3.0 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mitchellh/hashstructure v1.0.0 // indirect + github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee // indirect + github.com/philhofer/fwd v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.10.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/tinylib/msgp v1.1.0 // indirect + github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect + github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + golang.org/x/mod v0.4.1 // indirect + golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/tools v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/api v0.46.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + labix.org/v2/mgo v0.0.0-20140701140051-000000000287 // indirect +) + +replace ( + cloud.google.com/go => cloud.google.com/go v0.59.0 + cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.0.0 + cloud.google.com/go/logging => cloud.google.com/go/logging v1.0.1-0.20190813144457-ceeb313ad77b + github.com/armon/go-metrics => github.com/armon/go-metrics v0.0.0-20150106224455-eb0af217e5e9 + github.com/armon/go-radix => github.com/armon/go-radix v0.0.0-20150105235045-e39d623f12e8 + github.com/containerd/containerd => github.com/containerd/containerd v1.5.8 + github.com/coreos/go-systemd => github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 + github.com/coreos/pkg => github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea + github.com/docker/distribution => github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible + github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2 + github.com/golang/protobuf => github.com/golang/protobuf v1.3.5 + github.com/google/go-cmp => github.com/google/go-cmp v0.2.0 + github.com/google/uuid => github.com/google/uuid v1.1.1 + github.com/grpc-ecosystem/go-grpc-middleware => github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 + github.com/hashicorp/go-immutable-radix => github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe + github.com/hashicorp/go-msgpack => github.com/hashicorp/go-msgpack v0.0.0-20140221154404-71c2886f5a67 + github.com/hashicorp/go-multierror => github.com/hashicorp/go-multierror v1.0.0 + github.com/hashicorp/serf => github.com/hashicorp/serf v0.7.1-0.20160317193612-598c54895cc5 + github.com/hpcloud/tail => github.com/hpcloud/tail v1.0.0 + github.com/klauspost/compress => github.com/klauspost/compress v1.11.13 + github.com/matttproud/golang_protobuf_extensions => github.com/matttproud/golang_protobuf_extensions v1.0.1 + github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.8.0 + github.com/onsi/gomega => github.com/onsi/gomega v1.5.0 + github.com/pelletier/go-toml => github.com/pelletier/go-toml v1.8.1 + github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.6.0 + github.com/prometheus/common => github.com/prometheus/common v0.9.1 + github.com/prometheus/procfs => github.com/prometheus/procfs v0.0.11 + github.com/stretchr/testify => github.com/stretchr/testify v1.3.0 + github.com/vishvananda/netlink => github.com/vishvananda/netlink v1.1.0 + go.etcd.io/bbolt => go.etcd.io/bbolt v1.3.5 + go.opencensus.io => go.opencensus.io v0.22.3 + golang.org/x/net => golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 + golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d + golang.org/x/text => golang.org/x/text v0.3.3 + golang.org/x/time => golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e + google.golang.org/api => google.golang.org/api v0.8.0 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200227132054-3f1135a288c9 + google.golang.org/grpc => google.golang.org/grpc v1.27.1 + gopkg.in/fsnotify.v1 => gopkg.in/fsnotify.v1 v1.4.7 +) + +// autogen/winresources/dockerd is generated a build time, this replacement is only for the purpose of `go mod vendor` +replace github.com/docker/docker/autogen/winresources/dockerd => ./hack/make/.resources-windows diff --git a/vendor.sum b/vendor.sum new file mode 100644 index 0000000000..dc1fbfde44 --- /dev/null +++ b/vendor.sum @@ -0,0 +1,739 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +cloud.google.com/go v0.59.0 h1:BM3svUDU3itpc2m5cu5wCyThIYNDlFlts9GASw31GW8= +cloud.google.com/go v0.59.0/go.mod h1:qJxNOVCRTxHfwLhvDxxSI9vQc1zI59b9pEglp1Iv60E= +cloud.google.com/go/bigquery v1.0.0 h1:uzb+IRbJNYyU4lgbpqz7KKVjKO8XcF04rVFk6qbNTbM= +cloud.google.com/go/bigquery v1.0.0/go.mod h1:W6nZUO55RX1ze8f54muIveLNA7ouiqcTlNELudKtFaM= +cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/logging v1.0.1-0.20190813144457-ceeb313ad77b h1:qJHA070EiswSCrfU+IRfsFgK6laSpbaVMknaQmvMLUA= +cloud.google.com/go/logging v1.0.1-0.20190813144457-ceeb313ad77b/go.mod h1:V1cc3ogwobYzQq5f2R7DS/GvRIrI4FKj01Gs5glwAls= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +code.cloudfoundry.org/clock v1.0.0 h1:kFXWQM4bxYvdBw2X8BbBeXwQNgfoWv1vqAk2ZZyBN2o= +code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0 h1:cOjLyhBhe91glgZZNbQUg9BJC57l6BiSKov0Ivv7k0U= +github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0/go.mod h1:fBaQWrftOD5CrVCUfoYGHs4X4VViTuGOXA8WloCjTY0= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M= +github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91 h1:vX+gnvBc56EbWYrmlhYbFYRaeikAke1GL84N4BEYOFE= +github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91/go.mod h1:cDLGBht23g0XQdLjzn6xOGXDkLK182YfINAaZEQLCHQ= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20150106224455-eb0af217e5e9 h1:j0r1R47jEcPk5M3GY3tFbv7q5J6j0Ppler3q4Guh6C0= +github.com/armon/go-metrics v0.0.0-20150106224455-eb0af217e5e9/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20150105235045-e39d623f12e8 h1:XGHqlQXxwVly7mpcroyCGuEaGv/yvtS6r4PSHryDgxU= +github.com/armon/go-radix v0.0.0-20150105235045-e39d623f12e8/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.28.11 h1:L2G5qI91s51cUP3hJli4mXRIZZ3alZHcwHWOJdMclKk= +github.com/aws/aws-sdk-go v1.28.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549 h1:QJJnIXZ34OUK5JfWlq1l3n0SfO9g1amiLFIcTECgpq0= +github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549/go.mod h1:313oBJKClgRD/+t59eUnrfG7/xHXZJd7v+SjCacDm4Q= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.6.2 h1:iHsfF/t4aW4heW2YKfeHrVPGdtYTL4C4KocpM8KTSnI= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5 h1:PqZ3bA4yzwywivzk7PBQWngJp2/PAS0bWRZerKteicY= +github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= +github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= +github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn9dE= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.5.8 h1:NmkCC1/QxyZFBny8JogwLpOy2f+VEbO/f6bV2Mqtwuw= +github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= +github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0 h1:UFRRY5JemiAhPZrr/uE0n8fMTLcZsUvySPr1+D7pgr8= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= +github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fuse-overlayfs-snapshotter v1.0.2/go.mod h1:nRZceC8a7dRm3Ao6cJAwuJWPFiBPaibHiFntRUnzhwU= +github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= +github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= +github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/stargz-snapshotter v0.6.4/go.mod h1:1t0SF1gAHJhCSftWKDLVitvfF3c2qhL5hymG7C50wto= +github.com/containerd/stargz-snapshotter/estargz v0.6.4/go.mod h1:83VWDqHnurTKliEB0YvWMiCfLDwv4Cjj1X9Vk98GJZw= +github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= +github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.27+incompatible h1:QIudLb9KeBsE5zyYxd1mjzRSkzLg9Wf9QlRwFgd6oTA= +github.com/coreos/etcd v3.3.27+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20141123011944-ef32fa3046d9 h1:YpTz1+8tEHbybtxtMJNkV3U3GBAA05EakMRTR3dXkis= +github.com/deckarep/golang-set v0.0.0-20141123011944-ef32fa3046d9/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/cli v20.10.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible h1:dvc1KSkIYTVjZgHf/CTC2diTYC8PzhaA5sFISRfNVrE= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.3-0.20210609071616-4c2ec79bf2a8+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libkv v0.2.2-0.20211217103745-e480589147e3 h1:q6MhOaE4xsrl6cAiFYrazobNFSQN6ckhD6Et9zYbcrU= +github.com/docker/libkv v0.2.2-0.20211217103745-e480589147e3/go.mod h1:r5hEwHwW8dr0TFBYGCarMNbrQOiwL1xoqDYZ/JqoTK0= +github.com/docker/libtrust v0.0.0-20150526203908-9cbd2a1374f4 h1:k8TfKGeAcDQFFQOGCQMRN04N4a9YrPlRMMKnzAuvM9Q= +github.com/docker/libtrust v0.0.0-20150526203908-9cbd2a1374f4/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6 h1:mFQcXSzzNXVKAnl0KltjSQ7rbgipTYcXJns4sucurKA= +github.com/docker/swarmkit v1.12.1-0.20210726173615-3629f50980f6/go.mod h1:n3Z4lIEl7g261ptkGDBcYi/3qBMDl9csaAhwi2MPejs= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fernet/fernet-go v0.0.0-20180830025343-9eac43b88a5e h1:P10tZmVD2XclAaT9l7OduMH1OLFzTa1wUuUqHZnEdI0= +github.com/fernet/fernet-go v0.0.0-20180830025343-9eac43b88a5e/go.mod h1:2H9hjfbpSMHwY503FclkV/lZTBh2YlOmLLSda12uL8c= +github.com/fluent/fluent-logger-golang v1.9.0 h1:zUdY44CHX2oIUc7VTNZc+4m+ORuO/mldQDA7czhWXEg= +github.com/fluent/fluent-logger-golang v1.9.0/go.mod h1:2/HCT/jTy78yGyeNGQLGQsjF3zzzAuy6Xlk6FCMV5eU= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.7.3 h1:I0EKY9l8HZCXTMYC4F80vwT6KNypV9uYKP3Alm/hjmQ= +github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= +github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2 h1:xisWqjiKEff2B0KfFYGpCqc3M3zdTz+OHQHRc09FeYk= +github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/certificate-transparency-go v1.0.20 h1:azETE79toaBOyp+StoEBy8atzQujL0PyBPEmsEeDCXI= +github.com/google/certificate-transparency-go v1.0.20/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= +github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-memdb v0.0.0-20161216180745-cb9a474f84cc h1:+a6OGop8lqksGF5BgpRVghkeR3vy2HDa7lDKx6UvSRE= +github.com/hashicorp/go-memdb v0.0.0-20161216180745-cb9a474f84cc/go.mod h1:kbfItVoBJwCfKXDXN4YoAXjxcFVZ7MRrJzyTX6H4giE= +github.com/hashicorp/go-msgpack v0.0.0-20140221154404-71c2886f5a67 h1:uUGuA3Cnfp7qbFpIMOCDVz3TaWIF4lLYM8PE3YHpoA4= +github.com/hashicorp/go-msgpack v0.0.0-20140221154404-71c2886f5a67/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/memberlist v0.2.4 h1:OOhYzSvFnkFQXm1ysE8RjXTHsqSRDyP4emusC9K7DYg= +github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.7.1-0.20160317193612-598c54895cc5 h1:c0ibg28HTeX1LYjzYBkMzdnXuPn+iGx3huEB//PkB08= +github.com/hashicorp/serf v0.7.1-0.20160317193612-598c54895cc5/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= +github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c h1:nQcv325vxv2fFHJsOt53eSRf1eINt6vOdYUFfXs4rgk= +github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee h1:PAXLXk1heNZ5yokbMBpVLZQxo43wCZxRwl00mX+dd44= +github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea/go.mod h1:QMdK4dGB3YhEW2BmA1wgGpPYI3HZy/5gD705PXKUVSg= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.11.13 h1:eSvu8Tmq6j2psUJqJrLcWH6K3w5Dwc+qipbaA6eVEN4= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= +github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= +github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/buildkit v0.8.2-0.20210615162540-9f254e18360a h1:1KdH8CRFygJ8oj8l8wD2TUy3hGaGUzXO2h6gyQKg780= +github.com/moby/buildkit v0.8.2-0.20210615162540-9f254e18360a/go.mod h1:OieevFziOisPBM43fLKG+lPcVp9XW+BlUiws8VIpG6k= +github.com/moby/ipvs v1.0.1 h1:aoZ7fhLTXgDbzVrAnvV+XbKOU8kOET7B3+xULDF/1o0= +github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ= +github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= +github.com/moby/sys/mount v0.3.0 h1:bXZYMmq7DBQPwHRxH/MG+u9+XF90ZOwoXpHTOznMGp0= +github.com/moby/sys/mount v0.3.0/go.mod h1:U2Z3ur2rXPFrFmy4q6WMwWrBOAQGYtYTRVM8BIvzbwk= +github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY= +github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= +github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= +github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= +github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opencontainers/selinux v1.9.1 h1:b4VPEF3O5JLZgdTDBmGepaaIbAo0GqoF6EBRq5f/g3Y= +github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= +github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee h1:P6U24L02WMfj9ymZTxl7CxS73JC99x3ukk+DBkgQGQs= +github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee/go.mod h1:3uODdxMgOaPYeWU7RzZLxVtJHZ/x1f/iHkBZuKJDzuY= +github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= +github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmDkqO9/zg7R0lSQRs= +github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= +github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tonistiigi/fsutil v0.0.0-20210609172227-d72af97c0eaf h1:L0ixhsTk9j+dVnIvF6aiVCxPiaFvwTOyJxqimPq44p8= +github.com/tonistiigi/fsutil v0.0.0-20210609172227-d72af97c0eaf/go.mod h1:lJAxK//iyZ3yGbQswdrPTxugZIDM7sd4bEsD0x3XMHk= +github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe h1:pd7hrFSqUPxYS9IB+UMG1AB/8EXGXo17ssx0bSQ5L6Y= +github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe/go.mod h1:/+MCh11CJf2oz0BXmlmqyopK/ad1rKkcOXPoYuPCJYU= +github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= +github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= +github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= +github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= +github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= +github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.8.0 h1:VGGbLNyPF7dvYHhcUGYBBGCRDDK0RRJAI6KCvo0CL+E= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20200227132054-3f1135a288c9 h1:Koy0f8zyrEVfIHetH7wjP5mQLUXiqDpubSg8V1fAxqc= +google.golang.org/genproto v0.0.0-20200227132054-3f1135a288c9/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= +k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +labix.org/v2/mgo v0.0.0-20140701140051-000000000287 h1:L0cnkNl4TfAXzvdrqsYEmxOHOCv2p5I3taaReO8BWFs= +labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/vendor/cloud.google.com/go/.gitignore b/vendor/cloud.google.com/go/.gitignore new file mode 100644 index 0000000000..ee9694b878 --- /dev/null +++ b/vendor/cloud.google.com/go/.gitignore @@ -0,0 +1,11 @@ +# Editors +.idea +.vscode +*.swp + +# Test files +*.test +coverage.txt + +# Other +.DS_Store diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md new file mode 100644 index 0000000000..ae1a825818 --- /dev/null +++ b/vendor/cloud.google.com/go/CHANGES.md @@ -0,0 +1,1542 @@ +# Changes + +## v0.59.0 + +### Announcements + +goolgeapis/google-cloud-go has moved its source of truth to GitHub and is no longer a mirror. This means that our +contributing process has changed a bit. We will now be conducting all code reviews on GitHub which means we now accept +pull requests! If you have a version of the codebase previously checked out you may wish to update your git remote to +point to GitHub. + +### Changes + +- all: + - Remove dependency on honnef.co/go/tools. + - Update our contributing instructions now that we use GitHub for reviews. + - Remove some un-inclusive terminology. +- compute/metadata: + - Pass cancelable context to DNS lookup. +- .github: + - Update templates issue/PR templates. +- internal: + - Bump several clients to GA. + - Fix GoDoc badge source. + - Several automation changes related to the move to GitHub. + - Start generating a client for asset v1p5beta1. +- Various updates to autogenerated clients. + +## v0.58.0 + +### Deprecation notice + +- `cloud.google.com/go/monitoring/apiv3` has been deprecated due to breaking + changes in the API. Please migrate to `cloud.google.com/go/monitoring/apiv3/v2`. + +### Changes + +- all: + - The remaining uses of gtransport.Dial have been removed. + - The `genproto` dependency has been updated to a version that makes use of + new `protoreflect` library. For more information on these protobuf changes + please see the following post from the official Go blog: + https://blog.golang.org/protobuf-apiv2. +- internal: + - Started generation of datastore admin v1 client. + - Updated protofuf version used for generation to 3.12.X. + - Update the release levels for several APIs. + - Generate clients with protoc-gen-go@v1.4.1. +- monitoring: + - Re-enable generation of monitoring/apiv3 under v2 directory (see deprecation + notice above). +- profiler: + - Fixed flakiness in tests. +- Various updates to autogenerated clients. + +## v0.57.0 + +- all: + - Update module dependency `google.golang.org/api` to `v0.21.0`. +- errorreporting: + - Add exported SetGoogleClientInfo wrappers to manual file. +- expr/v1alpha1: + - Deprecate client. This client will be removed in a future release. +- internal: + - Fix possible data race in TestTracer. + - Pin versions of tools used for generation. + - Correct the release levels for BigQuery APIs. + - Start generation osconfig v1. +- longrunning: + - Add exported SetGoogleClientInfo wrappers to manual file. +- monitoring: + - Stop generation of monitoring/apiv3 because of incoming breaking change. +- trace: + - Add exported SetGoogleClientInfo wrappers to manual file. +- Various updates to autogenerated clients. + +## v0.56.0 + +- secretmanager: + - add IAM helper +- profiler: + - try all us-west1 zones for integration tests +- internal: + - add config to generate webrisk v1 + - add repo and commit to buildcop invocation + - add recaptchaenterprise v1 generation config + - update microgenerator to v0.12.5 + - add datacatalog client + - start generating security center settings v1beta + - start generating osconfig agentendpoint v1 + - setup generation for bigquery/connection/v1beta1 +- all: + - increase continous testing timeout to 45m + - various updates to autogenerated clients. + +## v0.55.0 + +- Various updates to autogenerated clients. + +## v0.54.0 + +- all: + - remove unused golang.org/x/exp from mod file + - update godoc.org links to pkg.go.dev +- compute/metadata: + - use defaultClient when http.Client is nil + - remove subscribeClient +- iam: + - add support for v3 policy and IAM conditions +- Various updates to autogenerated clients. + +## v0.53.0 + +- all: most clients now use transport/grpc.DialPool rather than Dial (see #1777 for outliers). + - Connection pooling now does not use the deprecated (and soon to be removed) gRPC load balancer API. +- profiler: remove symbolization (drops support for go1.10) +- Various updates to autogenerated clients. + +## v0.52.0 + +- internal/gapicgen: multiple improvements related to library generation. +- compute/metadata: unset ResponseHeaderTimeout in defaultClient +- docs: fix link to KMS in README.md +- Various updates to autogenerated clients. + +## v0.51.0 + +- secretmanager: + - add IAM helper for generic resource IAM handle +- cloudbuild: + - migrate to microgen in a major version +- Various updates to autogenerated clients. + +## v0.50.0 + +- profiler: + - Support disabling CPU profile collection. + - Log when a profile creation attempt begins. +- compute/metadata: + - Fix panic on malformed URLs. + - InstanceName returns actual instance name. +- Various updates to autogenerated clients. + +## v0.49.0 + +- functions/metadata: + - Handle string resources in JSON unmarshaller. +- Various updates to autogenerated clients. + +## v0.48.0 + +- Various updates to autogenerated clients + +## v0.47.0 + +This release drops support for Go 1.9 and Go 1.10: we continue to officially +support Go 1.11, Go 1.12, and Go 1.13. + +- Various updates to autogenerated clients. +- Add cloudbuild/apiv1 client. + +## v0.46.3 + +This is an empty release that was created solely to aid in storage's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.46.2 + +This is an empty release that was created solely to aid in spanner's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.46.1 + +This is an empty release that was created solely to aid in firestore's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.46.0 + +- spanner: + - Retry "Session not found" for read-only transactions. + - Retry aborted PDMLs. +- spanner/spannertest: + - Fix a bug that was causing 0X-prefixed number to be parsed incorrectly. +- storage: + - Add HMACKeyOptions. + - Remove *REGIONAL from StorageClass documentation. Using MULTI_REGIONAL, + DURABLE_REDUCED_AVAILABILITY, and REGIONAL are no longer best practice + StorageClasses but they are still acceptable values. +- trace: + - Remove cloud.google.com/go/trace. Package cloud.google.com/go/trace has been + marked OBSOLETE for several years: it is now no longer provided. If you + relied on this package, please vendor it or switch to using + https://cloud.google.com/trace/docs/setup/go (which obsoleted it). + +## v0.45.1 + +This is an empty release that was created solely to aid in pubsub's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.45.0 + +- compute/metadata: + - Add Email method. +- storage: + - Fix duplicated retry logic. + - Add ReaderObjectAttrs.StartOffset. + - Support reading last N bytes of a file when a negative range is given, such + as `obj.NewRangeReader(ctx, -10, -1)`. + - Add HMACKey listing functionality. +- spanner/spannertest: + - Support primary keys with no columns. + - Fix MinInt64 parsing. + - Implement deletion of key ranges. + - Handle reads during a read-write transaction. + - Handle returning DATE values. +- pubsub: + - Fix Ack/Modack request size calculation. +- logging: + - Add auto-detection of monitored resources on GAE Standard. + +## v0.44.3 + +This is an empty release that was created solely to aid in bigtable's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.44.2 + +This is an empty release that was created solely to aid in bigquery's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.44.1 + +This is an empty release that was created solely to aid in datastore's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.44.0 + +- datastore: + - Interface elements whose underlying types are supported, are now supported. + - Reduce time to initial retry from 1s to 100ms. +- firestore: + - Add Increment transformation. +- storage: + - Allow emulator with STORAGE_EMULATOR_HOST. + - Add methods for HMAC key management. +- pubsub: + - Add PublishCount and PublishLatency measurements. + - Add DefaultPublishViews and DefaultSubscribeViews for convenience of + importing all views. + - Add add Subscription.PushConfig.AuthenticationMethod. +- spanner: + - Allow emulator usage with SPANNER_EMULATOR_HOST. + - Add cloud.google.com/go/spanner/spannertest, a spanner emulator. + - Add cloud.google.com/go/spanner/spansql which contains types and a parser + for the Cloud Spanner SQL dialect. +- asset: + - Add apiv1p2beta1 client. + +## v0.43.0 + +This is an empty release that was created solely to aid in logging's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.42.0 + +- bigtable: + - Add an admin method to update an instance and clusters. + - Fix bttest regex matching behavior for alternations (things like `|a`). + - Expose BlockAllFilter filter. +- bigquery: + - Add Routines API support. +- storage: + - Add read-only Bucket.LocationType. +- logging: + - Add TraceSampled to Entry. + - Fix to properly extract {Trace, Span}Id from X-Cloud-Trace-Context. +- pubsub: + - Add Cloud Key Management to TopicConfig. + - Change ExpirationPolicy to optional.Duration. +- automl: + - Add apiv1beta1 client. +- iam: + - Fix compilation problem with iam/credentials/apiv1. + +## v0.41.0 + +- bigtable: + - Check results from PredicateFilter in bttest, which fixes certain false matches. +- profiler: + - debugLog checks user defined logging options before logging. +- spanner: + - PartitionedUpdates respect query parameters. + - StartInstance allows specifying cloud API access scopes. +- bigquery: + - Use empty slice instead of nil for ValueSaver, fixing an issue with zero-length, repeated, nested fields causing panics. +- firestore: + - Return same number of snapshots as doc refs (in the form of duplicate records) during GetAll. +- replay: + - Change references to IPv4 addresses to localhost, making replay compatible with IPv6. + +## v0.40.0 + +- all: + - Update to protobuf-golang v1.3.1. +- datastore: + - Attempt to decode GAE-encoded keys if initial decoding attempt fails. + - Support integer time conversion. +- pubsub: + - Add PublishSettings.BundlerByteLimit. If users receive pubsub.ErrOverflow, + this value should be adjusted higher. + - Use IPv6 compatible target in testutil. +- bigtable: + - Fix Latin-1 regexp filters in bttest, allowing \C. + - Expose PassAllFilter. +- profiler: + - Add log messages for slow path in start. + - Fix start to allow retry until success. +- firestore: + - Add admin client. +- containeranalysis: + - Add apiv1 client. +- grafeas: + - Add apiv1 client. + +## 0.39.0 + +- bigtable: + - Implement DeleteInstance in bttest. + - Return an error on invalid ReadRowsRequest.RowRange key ranges in bttest. +- bigquery: + - Move RequirePartitionFilter outside of TimePartioning. + - Expose models API. +- firestore: + - Allow array values in create and update calls. + - Add CollectionGroup method. +- pubsub: + - Add ExpirationPolicy to Subscription. +- storage: + - Add V4 signing. +- rpcreplay: + - Match streams by first sent request. This further improves rpcreplay's + ability to distinguish streams. +- httpreplay: + - Set up Man-In-The-Middle config only once. This should improve proxy + creation when multiple proxies are used in a single process. + - Remove error on empty Content-Type, allowing requests with no Content-Type + header but a non-empty body. +- all: + - Fix an edge case bug in auto-generated library pagination by properly + propagating pagetoken. + +## 0.38.0 + +This update includes a substantial reduction in our transitive dependency list +by way of updating to opencensus@v0.21.0. + +- spanner: + - Error implements GRPCStatus, allowing status.Convert. +- bigtable: + - Fix a bug in bttest that prevents single column queries returning results + that match other filters. + - Remove verbose retry logging. +- logging: + - Ensure RequestUrl has proper UTF-8, removing the need for users to wrap and + rune replace manually. +- recaptchaenterprise: + - Add v1beta1 client. +- phishingprotection: + - Add v1beta1 client. + +## 0.37.4 + +This patch releases re-builds the go.sum. This was not possible in the +previous release. + +- firestore: + - Add sentinel value DetectProjectID for auto-detecting project ID. + - Add OpenCensus tracing for public methods. + - Marked stable. All future changes come with a backwards compatibility + guarantee. + - Removed firestore/apiv1beta1. All users relying on this low-level library + should migrate to firestore/apiv1. Note that most users should use the + high-level firestore package instead. +- pubsub: + - Allow large messages in synchronous pull case. + - Cap bundler byte limit. This should prevent OOM conditions when there are + a very large number of message publishes occurring. +- storage: + - Add ETag to BucketAttrs and ObjectAttrs. +- datastore: + - Removed some non-sensical OpenCensus traces. +- webrisk: + - Add v1 client. +- asset: + - Add v1 client. +- cloudtasks: + - Add v2 client. + +## 0.37.3 + +This patch release removes github.com/golang/lint from the transitive +dependency list, resolving `go get -u` problems. + +Note: this release intentionally has a broken go.sum. Please use v0.37.4. + +## 0.37.2 + +This patch release is mostly intended to bring in v0.3.0 of +google.golang.org/api, which fixes a GCF deployment issue. + +Note: we had to-date accidentally marked Redis as stable. In this release, we've +fixed it by downgrading its documentation to alpha, as it is in other languages +and docs. + +- all: + - Document context in generated libraries. + +## 0.37.1 + +Small go.mod version bumps to bring in v0.2.0 of google.golang.org/api, which +introduces a new oauth2 url. + +## 0.37.0 + +- spanner: + - Add BatchDML method. + - Reduced initial time between retries. +- bigquery: + - Produce better error messages for InferSchema. + - Add logical type control for avro loads. + - Add support for the GEOGRAPHY type. +- datastore: + - Add sentinel value DetectProjectID for auto-detecting project ID. + - Allow flatten tag on struct pointers. + - Fixed a bug that caused queries to panic with invalid queries. Instead they + will now return an error. +- profiler: + - Add ability to override GCE zone and instance. +- pubsub: + - BEHAVIOR CHANGE: Refactor error code retry logic. RPCs should now more + consistently retry specific error codes based on whether they're idempotent + or non-idempotent. +- httpreplay: Fixed a bug when a non-GET request had a zero-length body causing + the Content-Length header to be dropped. +- iot: + - Add new apiv1 client. +- securitycenter: + - Add new apiv1 client. +- cloudscheduler: + - Add new apiv1 client. + +## 0.36.0 + +- spanner: + - Reduce minimum retry backoff from 1s to 100ms. This makes time between + retries much faster and should improve latency. +- storage: + - Add support for Bucket Policy Only. +- kms: + - Add ResourceIAM helper method. + - Deprecate KeyRingIAM and CryptoKeyIAM. Please use ResourceIAM. +- firestore: + - Switch from v1beta1 API to v1 API. + - Allow emulator with FIRESTORE_EMULATOR_HOST. +- bigquery: + - Add NumLongTermBytes to Table. + - Add TotalBytesProcessedAccuracy to QueryStatistics. +- irm: + - Add new v1alpha2 client. +- talent: + - Add new v4beta1 client. +- rpcreplay: + - Fix connection to work with grpc >= 1.17. + - It is now required for an actual gRPC server to be running for Dial to + succeed. + +## 0.35.1 + +- spanner: + - Adds OpenCensus views back to public API. + +## v0.35.0 + +- all: + - Add go.mod and go.sum. + - Switch usage of gax-go to gax-go/v2. +- bigquery: + - Fix bug where time partitioning could not be removed from a table. + - Fix panic that occurred with empty query parameters. +- bttest: + - Fix bug where deleted rows were returned by ReadRows. +- bigtable/emulator: + - Configure max message size to 256 MiB. +- firestore: + - Allow non-transactional queries in transactions. + - Allow StartAt/EndBefore on direct children at any depth. + - QuerySnapshotIterator.Stop may be called in an error state. + - Fix bug the prevented reset of transaction write state in between retries. +- functions/metadata: + - Make Metadata.Resource a pointer. +- logging: + - Make SpanID available in logging.Entry. +- metadata: + - Wrap !200 error code in a typed err. +- profiler: + - Add function to check if function name is within a particular file in the + profile. + - Set parent field in create profile request. + - Return kubernetes client to start cluster, so client can be used to poll + cluster. + - Add function for checking if filename is in profile. +- pubsub: + - Fix bug where messages expired without an initial modack in + synchronous=true mode. + - Receive does not retry ResourceExhausted errors. +- spanner: + - client.Close now cancels existing requests and should be much faster for + large amounts of sessions. + - Correctly allow MinOpened sessions to be spun up. + +## v0.34.0 + +- functions/metadata: + - Switch to using JSON in context. + - Make Resource a value. +- vision: Fix ProductSearch return type. +- datastore: Add an example for how to handle MultiError. + +## v0.33.1 + +- compute: Removes an erroneously added go.mod. +- logging: Populate source location in fromLogEntry. + +## v0.33.0 + +- bttest: + - Add support for apply_label_transformer. +- expr: + - Add expr library. +- firestore: + - Support retrieval of missing documents. +- kms: + - Add IAM methods. +- pubsub: + - Clarify extension documentation. +- scheduler: + - Add v1beta1 client. +- vision: + - Add product search helper. + - Add new product search client. + +## v0.32.0 + +Note: This release is the last to support Go 1.6 and 1.8. + +- bigquery: + - Add support for removing an expiration. + - Ignore NeverExpire in Table.Create. + - Validate table expiration time. +- cbt: + - Add note about not supporting arbitrary bytes. +- datastore: + - Align key checks. +- firestore: + - Return an error when using Start/End without providing values. +- pubsub: + - Add pstest Close method. + - Clarify MaxExtension documentation. +- securitycenter: + - Add v1beta1 client. +- spanner: + - Allow nil in mutations. + - Improve doc of SessionPoolConfig.MaxOpened. + - Increase session deletion timeout from 5s to 15s. + +## v0.31.0 + +- bigtable: + - Group mutations across multiple requests. +- bigquery: + - Link to bigquery troubleshooting errors page in bigquery.Error comment. +- cbt: + - Fix go generate command. + - Document usage of both maxage + maxversions. +- datastore: + - Passing nil keys results in ErrInvalidKey. +- firestore: + - Clarify what Document.DataTo does with untouched struct fields. +- profile: + - Validate service name in agent. +- pubsub: + - Fix deadlock with pstest and ctx.Cancel. + - Fix a possible deadlock in pstest. +- trace: + - Update doc URL with new fragment. + +Special thanks to @fastest963 for going above and beyond helping us to debug +hard-to-reproduce Pub/Sub issues. + +## v0.30.0 + +- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information. +- bigtable: bttest supports row sample filter. +- functions: metadata package added for accessing Cloud Functions resource metadata. + +## v0.29.0 + +- bigtable: + - Add retry to all idempotent RPCs. + - cbt supports complex GC policies. + - Emulator supports arbitrary bytes in regex filters. +- firestore: Add ArrayUnion and ArrayRemove. +- logging: Add the ContextFunc option to supply the context used for + asynchronous RPCs. +- profiler: Ignore NotDefinedError when fetching the instance name +- pubsub: + - BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled. + - BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning. + - Fix deadlock. + - Restore Ack/Nack/Modacks metrics. + - Improve context handling in iterator. + - Implement synchronous mode for Receive. + - pstest: add Pull. +- spanner: Add a metric for the number of sessions currently opened. +- storage: + - Canceling the context releases all resources. + - Add additional RetentionPolicy attributes. +- vision/apiv1: Add LocalizeObjects method. + +## v0.28.0 + +- bigtable: + - Emulator returns Unimplemented for snapshot RPCs. +- bigquery: + - Support zero-length repeated, nested fields. +- cloud assets: + - Add v1beta client. +- datastore: + - Don't nil out transaction ID on retry. +- firestore: + - BREAKING CHANGE: When watching a query with Query.Snapshots, QuerySnapshotIterator.Next + returns a QuerySnapshot which contains read time, result size, change list and the DocumentIterator + (previously, QuerySnapshotIterator.Next returned just the DocumentIterator). See: https://godoc.org/cloud.google.com/go/firestore#Query.Snapshots. + - Add array-contains operator. +- IAM: + - Add iam/credentials/apiv1 client. +- pubsub: + - Canceling the context passed to Subscription.Receive causes Receive to return when + processing finishes on all messages currently in progress, even if new messages are arriving. +- redis: + - Add redis/apiv1 client. +- storage: + - Add Reader.Attrs. + - Deprecate several Reader getter methods: please use Reader.Attrs for these instead. + - Add ObjectHandle.Bucket and ObjectHandle.Object methods. + +## v0.27.0 + +- bigquery: + - Allow modification of encryption configuration and partitioning options to a table via the Update call. + - Add a SchemaFromJSON function that converts a JSON table schema. +- bigtable: + - Restore cbt count functionality. +- containeranalysis: + - Add v1beta client. +- spanner: + - Fix a case where an iterator might not be closed correctly. +- storage: + - Add ServiceAccount method https://godoc.org/cloud.google.com/go/storage#Client.ServiceAccount. + - Add a method to Reader that returns the parsed value of the Last-Modified header. + +## v0.26.0 + +- bigquery: + - Support filtering listed jobs by min/max creation time. + - Support data clustering (https://godoc.org/cloud.google.com/go/bigquery#Clustering). + - Include job creator email in Job struct. +- bigtable: + - Add `RowSampleFilter`. + - emulator: BREAKING BEHAVIOR CHANGE: Regexps in row, family, column and value filters + must match the entire target string to succeed. Previously, the emulator was + succeeding on partial matches. + NOTE: As of this release, this change only affects the emulator when run + from this repo (bigtable/cmd/emulator/cbtemulator.go). The version launched + from `gcloud` will be updated in a subsequent `gcloud` release. +- dataproc: Add apiv1beta2 client. +- datastore: Save non-nil pointer fields on omitempty. +- logging: populate Entry.Trace from the HTTP X-Cloud-Trace-Context header. +- logging/logadmin: Support writer_identity and include_children. +- pubsub: + - Support labels on topics and subscriptions. + - Support message storage policy for topics. + - Use the distribution of ack times to determine when to extend ack deadlines. + The only user-visible effect of this change should be that programs that + call only `Subscription.Receive` need no IAM permissions other than `Pub/Sub + Subscriber`. +- storage: + - Support predefined ACLs. + - Support additional ACL fields other than Entity and Role. + - Support bucket websites. + - Support bucket logging. + + +## v0.25.0 + +- Added [Code of Conduct](https://github.com/googleapis/google-cloud-go/blob/master/CODE_OF_CONDUCT.md) +- bigtable: + - cbt: Support a GC policy of "never". +- errorreporting: + - Support User. + - Close now calls Flush. + - Use OnError (previously ignored). + - Pass through the RPC error as-is to OnError. +- httpreplay: A tool for recording and replaying HTTP requests + (for the bigquery and storage clients in this repo). +- kms: v1 client added +- logging: add SourceLocation to Entry. +- storage: improve CRC checking on read. + +## v0.24.0 + +- bigquery: Support for the NUMERIC type. +- bigtable: + - cbt: Optionally specify columns for read/lookup + - Support instance-level administration. +- oslogin: New client for the OS Login API. +- pubsub: + - The package is now stable. There will be no further breaking changes. + - Internal changes to improve Subscription.Receive behavior. +- storage: Support updating bucket lifecycle config. +- spanner: Support struct-typed parameter bindings. +- texttospeech: New client for the Text-to-Speech API. + +## v0.23.0 + +- bigquery: Add DDL stats to query statistics. +- bigtable: + - cbt: Add cells-per-column limit for row lookup. + - cbt: Make it possible to combine read filters. +- dlp: v2beta2 client removed. Use the v2 client instead. +- firestore, spanner: Fix compilation errors due to protobuf changes. + +## v0.22.0 + +- bigtable: + - cbt: Support cells per column limit for row read. + - bttest: Correctly handle empty RowSet. + - Fix ReadModifyWrite operation in emulator. + - Fix API path in GetCluster. + +- bigquery: + - BEHAVIOR CHANGE: Retry on 503 status code. + - Add dataset.DeleteWithContents. + - Add SchemaUpdateOptions for query jobs. + - Add Timeline to QueryStatistics. + - Add more stats to ExplainQueryStage. + - Support Parquet data format. + +- datastore: + - Support omitempty for times. + +- dlp: + - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client, + which is now out of beta. + - Add v2 client. + +- firestore: + - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid. + +- iam: + - Support JWT signing via SignJwt callopt. + +- profiler: + - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done. + - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute. + - Avoid returning empty serial port output. + +- pubsub: + - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy. + - BEHAVIOR CHANGE: Don't backoff on EOF. + - pstest: Support Acknowledge and ModifyAckDeadline RPCs. + +- redis: + - Add v1 beta Redis client. + +- spanner: + - Support SessionLabels. + +- speech: + - Add api v1 beta1 client. + +- storage: + - BEHAVIOR CHANGE: Retry reads when retryable error occurs. + - Fix delete of object in requester-pays bucket. + - Support KMS integration. + +## v0.21.0 + +- bigquery: + - Add OpenCensus tracing. + +- firestore: + - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot + whose Exists method returns false. DocumentRef.Get and Transaction.Get + return the non-nil DocumentSnapshot in addition to a NotFound error. + **DocumentRef.GetAll and Transaction.GetAll return a non-nil + DocumentSnapshot instead of nil.** + - Add DocumentIterator.Stop. **Call Stop whenever you are done with a + DocumentIterator.** + - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime + notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen. + - Canceling an RPC now always returns a grpc.Status with codes.Canceled. + +- spanner: + - Add `CommitTimestamp`, which supports inserting the commit timestamp of a + transaction into a column. + +## v0.20.0 + +- bigquery: Support SchemaUpdateOptions for load jobs. + +- bigtable: + - Add SampleRowKeys. + - cbt: Support union, intersection GCPolicy. + - Retry admin RPCS. + - Add trace spans to retries. + +- datastore: Add OpenCensus tracing. + +- firestore: + - Fix queries involving Null and NaN. + - Allow Timestamp protobuffers for time values. + +- logging: Add a WriteTimeout option. + +- spanner: Support Batch API. + +- storage: Add OpenCensus tracing. + +## v0.19.0 + +- bigquery: + - Support customer-managed encryption keys. + +- bigtable: + - Improved emulator support. + - Support GetCluster. + +- datastore: + - Add general mutations. + - Support pointer struct fields. + - Support transaction options. + +- firestore: + - Add Transaction.GetAll. + - Support document cursors. + +- logging: + - Support concurrent RPCs to the service. + - Support per-entry resources. + +- profiler: + - Add config options to disable heap and thread profiling. + - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set. + +- pubsub: + - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the + callback returns). + - Add SubscriptionInProject. + - Add OpenCensus instrumentation for streaming pull. + +- storage: + - Support CORS. + +## v0.18.0 + +- bigquery: + - Marked stable. + - Schema inference of nullable fields supported. + - Added TimePartitioning to QueryConfig. + +- firestore: Data provided to DocumentRef.Set with a Merge option can contain + Delete sentinels. + +- logging: Clients can accept parent resources other than projects. + +- pubsub: + - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome. + - Support updating more subscription metadata: AckDeadline, + RetainAckedMessages and RetentionDuration. + +- oslogin/apiv1beta: New client for the Cloud OS Login API. + +- rpcreplay: A package for recording and replaying gRPC traffic. + +- spanner: + - Add a ReadWithOptions that supports a row limit, as well as an index. + - Support query plan and execution statistics. + - Added [OpenCensus](http://opencensus.io) support. + +- storage: Clarify checksum validation for gzipped files (it is not validated + when the file is served uncompressed). + + +## v0.17.0 + +- firestore BREAKING CHANGES: + - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update. + Change + `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})` + to + `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})` + + Change + `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)` + to + `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})` + - Rename MergePaths to Merge; require args to be FieldPaths + - A value stored as an integer can be read into a floating-point field, and vice versa. +- bigtable/cmd/cbt: + - Support deleting a column. + - Add regex option for row read. +- spanner: Mark stable. +- storage: + - Add Reader.ContentEncoding method. + - Fix handling of SignedURL headers. +- bigquery: + - If Uploader.Put is called with no rows, it returns nil without making a + call. + - Schema inference supports the "nullable" option in struct tags for + non-required fields. + - TimePartitioning supports "Field". + + +## v0.16.0 + +- Other bigquery changes: + - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE). + - UseStandardSQL is deprecated; set UseLegacySQL to true if you need + Legacy SQL. + - Uploader.Put will generate a random insert ID if you do not provide one. + - Support time partitioning for load jobs. + - Support dry-run queries. + - A `Job` remembers its last retrieved status. + - Support retrieving job configuration. + - Support labels for jobs and tables. + - Support dataset access lists. + - Improve support for external data sources, including data from Bigtable and + Google Sheets, and tables with external data. + - Support updating a table's view configuration. + - Fix uploading civil times with nanoseconds. + +- storage: + - Support PubSub notifications. + - Support Requester Pays buckets. + +- profiler: Support goroutine and mutex profile types. + +## v0.15.0 + +- firestore: beta release. See the + [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html). + +- errorreporting: The existing package has been redesigned. + +- errors: This package has been removed. Use errorreporting. + + +## v0.14.0 + +- bigquery BREAKING CHANGES: + - Standard SQL is the default for queries and views. + - `Table.Create` takes `TableMetadata` as a second argument, instead of + options. + - `Dataset.Create` takes `DatasetMetadata` as a second argument. + - `DatasetMetadata` field `ID` renamed to `FullID` + - `TableMetadata` field `ID` renamed to `FullID` + +- Other bigquery changes: + - The client will append a random suffix to a provided job ID if you set + `AddJobIDSuffix` to true in a job config. + - Listing jobs is supported. + - Better retry logic. + +- vision, language, speech: clients are now stable + +- monitoring: client is now beta + +- profiler: + - Rename InstanceName to Instance, ZoneName to Zone + - Auto-detect service name and version on AppEngine. + +## v0.13.0 + +- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these + options to continue using Legacy SQL after the client switches its default + to Standard SQL. + +- bigquery: Support for updating dataset labels. + +- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other + than the client's. DatasetsInProject is no longer needed and is deprecated. + +- bigtable: Fail ListInstances when any zones fail. + +- spanner: support decoding of slices of basic types (e.g. []string, []int64, + etc.) + +- logging/logadmin: UpdateSink no longer creates a sink if it is missing + (actually a change to the underlying service, not the client) + +- profiler: Service and ServiceVersion replace Target in Config. + +## v0.12.0 + +- pubsub: Subscription.Receive now uses streaming pull. + +- pubsub: add Client.TopicInProject to access topics in a different project + than the client. + +- errors: renamed errorreporting. The errors package will be removed shortly. + +- datastore: improved retry behavior. + +- bigquery: support updates to dataset metadata, with etags. + +- bigquery: add etag support to Table.Update (BREAKING: etag argument added). + +- bigquery: generate all job IDs on the client. + +- storage: support bucket lifecycle configurations. + + +## v0.11.0 + +- Clients for spanner, pubsub and video are now in beta. + +- New client for DLP. + +- spanner: performance and testing improvements. + +- storage: requester-pays buckets are supported. + +- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements. + +- pubsub: bug fixes and other minor improvements + +## v0.10.0 + +- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update. + +- pubsub: Subscription.Receive now runs concurrently for higher throughput. + +- vision: cloud.google.com/go/vision is deprecated. Use +cloud.google.com/go/vision/apiv1 instead. + +- translation: now stable. + +- trace: several changes to the surface. See the link below. + +### Code changes required from v0.9.0 + +- pubsub: Replace + + ``` + sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"}) + ``` + + with + + ``` + sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ + PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"}, + }) + ``` + +- trace: traceGRPCServerInterceptor will be provided from *trace.Client. +Given an initialized `*trace.Client` named `tc`, instead of + + ``` + s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc))) + ``` + + write + + ``` + s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor())) + ``` + +- trace trace.GRPCClientInterceptor will also provided from *trace.Client. +Instead of + + ``` + conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor())) + ``` + + write + + ``` + conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())) + ``` + +- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC +interceptor as a dial option as shown below when initializing Cloud package +clients: + + ``` + c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))) + if err != nil { + ... + } + ``` + + +## v0.9.0 + +- Breaking changes to some autogenerated clients. +- rpcreplay package added. + +## v0.8.0 + +- profiler package added. +- storage: + - Retry Objects.Insert call. + - Add ProgressFunc to WRiter. +- pubsub: breaking changes: + - Publish is now asynchronous ([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)). + - Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)). + - Message.Done replaced with Message.Ack and Message.Nack. + +## v0.7.0 + +- Release of a client library for Spanner. See +the +[blog +post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html). +Note that although the Spanner service is beta, the Go client library is alpha. + +## v0.6.0 + +- Beta release of BigQuery, DataStore, Logging and Storage. See the +[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). + +- bigquery: + - struct support. Read a row directly into a struct with +`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`. +You can also use field tags. See the [package documentation][cloud-bigquery-ref] +for details. + + - The `ValueList` type was removed. It is no longer necessary. Instead of + ```go + var v ValueList + ... it.Next(&v) .. + ``` + use + + ```go + var v []Value + ... it.Next(&v) ... + ``` + + - Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or + `ValueList` would append to the slice. Now each call resets the size to zero first. + + - Schema inference will infer the SQL type BYTES for a struct field of + type []byte. Previously it inferred STRING. + + - The types `uint`, `uint64` and `uintptr` are no longer supported in schema + inference. BigQuery's integer type is INT64, and those types may hold values + that are not correctly represented in a 64-bit signed integer. + +## v0.5.0 + +- bigquery: + - The SQL types DATE, TIME and DATETIME are now supported. They correspond to + the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil` + package. + - Support for query parameters. + - Support deleting a dataset. + - Values from INTEGER columns will now be returned as int64, not int. This + will avoid errors arising from large values on 32-bit systems. +- datastore: + - Nested Go structs encoded as Entity values, instead of a +flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg. + ```go + type State struct { + Cities []struct{ + Populations []int + } + } + ``` + See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for +more details. + - Contexts no longer hold namespaces; instead you must set a key's namespace + explicitly. Also, key functions have been changed and renamed. + - The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method: + ```go + q := datastore.NewQuery("Kind").Namespace("ns") + ``` + - All the fields of Key are exported. That means you can construct any Key with a struct literal: + ```go + k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} + ``` + - As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed. + - `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace + ```go + NewIncompleteKey(ctx, kind, parent) + ``` + with + ```go + IncompleteKey(kind, parent) + ``` + and if you do use namespaces, make sure you set the namespace on the returned key. + - `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace + ```go + NewKey(ctx, kind, name, 0, parent) + NewKey(ctx, kind, "", id, parent) + ``` + with + ```go + NameKey(kind, name, parent) + IDKey(kind, id, parent) + ``` + and if you do use namespaces, make sure you set the namespace on the returned key. + - The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`. + - The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection. + - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for +more details. + +## v0.4.0 + +- bigquery: + -`NewGCSReference` is now a function, not a method on `Client`. + - `Table.LoaderFrom` now accepts a `ReaderSource`, enabling + loading data into a table from a file or any `io.Reader`. + * Client.Table and Client.OpenTable have been removed. + Replace + ```go + client.OpenTable("project", "dataset", "table") + ``` + with + ```go + client.DatasetInProject("project", "dataset").Table("table") + ``` + + * Client.CreateTable has been removed. + Replace + ```go + client.CreateTable(ctx, "project", "dataset", "table") + ``` + with + ```go + client.DatasetInProject("project", "dataset").Table("table").Create(ctx) + ``` + + * Dataset.ListTables have been replaced with Dataset.Tables. + Replace + ```go + tables, err := ds.ListTables(ctx) + ``` + with + ```go + it := ds.Tables(ctx) + for { + table, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: use table. + } + ``` + + * Client.Read has been replaced with Job.Read, Table.Read and Query.Read. + Replace + ```go + it, err := client.Read(ctx, job) + ``` + with + ```go + it, err := job.Read(ctx) + ``` + and similarly for reading from tables or queries. + + * The iterator returned from the Read methods is now named RowIterator. Its + behavior is closer to the other iterators in these libraries. It no longer + supports the Schema method; see the next item. + Replace + ```go + for it.Next(ctx) { + var vals ValueList + if err := it.Get(&vals); err != nil { + // TODO: Handle error. + } + // TODO: use vals. + } + if err := it.Err(); err != nil { + // TODO: Handle error. + } + ``` + with + ``` + for { + var vals ValueList + err := it.Next(&vals) + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: use vals. + } + ``` + Instead of the `RecordsPerRequest(n)` option, write + ```go + it.PageInfo().MaxSize = n + ``` + Instead of the `StartIndex(i)` option, write + ```go + it.StartIndex = i + ``` + + * ValueLoader.Load now takes a Schema in addition to a slice of Values. + Replace + ```go + func (vl *myValueLoader) Load(v []bigquery.Value) + ``` + with + ```go + func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema) + ``` + + + * Table.Patch is replace by Table.Update. + Replace + ```go + p := table.Patch() + p.Description("new description") + metadata, err := p.Apply(ctx) + ``` + with + ```go + metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{ + Description: "new description", + }) + ``` + + * Client.Copy is replaced by separate methods for each of its four functions. + All options have been replaced by struct fields. + + * To load data from Google Cloud Storage into a table, use Table.LoaderFrom. + + Replace + ```go + client.Copy(ctx, table, gcsRef) + ``` + with + ```go + table.LoaderFrom(gcsRef).Run(ctx) + ``` + Instead of passing options to Copy, set fields on the Loader: + ```go + loader := table.LoaderFrom(gcsRef) + loader.WriteDisposition = bigquery.WriteTruncate + ``` + + * To extract data from a table into Google Cloud Storage, use + Table.ExtractorTo. Set fields on the returned Extractor instead of + passing options. + + Replace + ```go + client.Copy(ctx, gcsRef, table) + ``` + with + ```go + table.ExtractorTo(gcsRef).Run(ctx) + ``` + + * To copy data into a table from one or more other tables, use + Table.CopierFrom. Set fields on the returned Copier instead of passing options. + + Replace + ```go + client.Copy(ctx, dstTable, srcTable) + ``` + with + ```go + dst.Table.CopierFrom(srcTable).Run(ctx) + ``` + + * To start a query job, create a Query and call its Run method. Set fields + on the query instead of passing options. + + Replace + ```go + client.Copy(ctx, table, query) + ``` + with + ```go + query.Run(ctx) + ``` + + * Table.NewUploader has been renamed to Table.Uploader. Instead of options, + configure an Uploader by setting its fields. + Replace + ```go + u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) + ``` + with + ```go + u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) + u.IgnoreUnknownValues = true + ``` + +- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where `iterator` is the package +`google.golang.org/api/iterator`. + +## v0.3.0 + +- storage: + * AdminClient replaced by methods on Client. + Replace + ```go + adminClient.CreateBucket(ctx, bucketName, attrs) + ``` + with + ```go + client.Bucket(bucketName).Create(ctx, projectID, attrs) + ``` + + * BucketHandle.List replaced by BucketHandle.Objects. + Replace + ```go + for query != nil { + objs, err := bucket.List(d.ctx, query) + if err != nil { ... } + query = objs.Next + for _, obj := range objs.Results { + fmt.Println(obj) + } + } + ``` + with + ```go + iter := bucket.Objects(d.ctx, query) + for { + obj, err := iter.Next() + if err == iterator.Done { + break + } + if err != nil { ... } + fmt.Println(obj) + } + ``` + (The `iterator` package is at `google.golang.org/api/iterator`.) + + Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`. + + Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`. + + + * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. + Replace + ```go + attrs, err := src.CopyTo(ctx, dst, nil) + ``` + with + ```go + attrs, err := dst.CopierFrom(src).Run(ctx) + ``` + + Replace + ```go + attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"}) + ``` + with + ```go + c := dst.CopierFrom(src) + c.ContextType = "text/html" + attrs, err := c.Run(ctx) + ``` + + * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. + Replace + ```go + attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil) + ``` + with + ```go + attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) + ``` + + * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. + Replace + ```go + attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"}) + ``` + with + ```go + attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) + ``` + + * ObjectHandle.WithConditions replaced by ObjectHandle.If. + Replace + ```go + obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen)) + ``` + with + ```go + obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen}) + ``` + + Replace + ```go + obj.WithConditions(storage.IfGenerationMatch(0)) + ``` + with + ```go + obj.If(storage.Conditions{DoesNotExist: true}) + ``` + + * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`). + +- Package preview/logging deleted. Use logging instead. + +## v0.2.0 + +- Logging client replaced with preview version (see below). + +- New clients for some of Google's Machine Learning APIs: Vision, Speech, and +Natural Language. + +- Preview version of a new [Stackdriver Logging][cloud-logging] client in +[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging). +This client uses gRPC as its transport layer, and supports log reading, sinks +and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly. + + diff --git a/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md b/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..8fd1bc9c22 --- /dev/null +++ b/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md @@ -0,0 +1,44 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) + diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md new file mode 100644 index 0000000000..109ca5c43c --- /dev/null +++ b/vendor/cloud.google.com/go/CONTRIBUTING.md @@ -0,0 +1,250 @@ +# Contributing + +1. [File an issue](https://github.com/googleapis/google-cloud-go/issues/new/choose). + The issue will be used to discuss the bug or feature and should be created + before sending a CL. + +1. [Install Go](https://golang.org/dl/). + 1. Ensure that your `GOBIN` directory (by default `$(go env GOPATH)/bin`) + is in your `PATH`. + 1. Check it's working by running `go version`. + * If it doesn't work, check the install location, usually + `/usr/local/go`, is on your `PATH`. + +1. Sign one of the +[contributor license agreements](#contributor-license-agreements) below. + +1. Clone the repo: + `git clone https://github.com/googleapis/google-cloud-go` + +1. Change into the checked out source: + `cd google-cloud-go` + +1. Fork the repo. + +1. Set your fork as a remote: + `git remote add fork git@github.com:GITHUB_USERNAME/google-cloud-go.git` + +1. Make changes (see [Formatting](#formatting) and [Style](#style)), commit to + your fork. + + Commit messages should follow the + [Go project style](https://github.com/golang/go/wiki/CommitMessage). For example: + ``` + functions: add gophers codelab + ``` + +1. Send a pull request with your changes. + +1. A maintainer will review the pull request and make comments. + + Prefer adding additional commits over amending and force-pushing since it can + be difficult to follow code reviews when the commit history changes. + + Commits will be squashed when they're merged. + +## Integration Tests + +In addition to the unit tests, you may run the integration test suite. These +directions describe setting up your environment to run integration tests for +_all_ packages: note that many of these instructions may be redundant if you +intend only to run integration tests on a single package. + +#### GCP Setup + +To run the integrations tests, creation and configuration of two projects in +the Google Developers Console is required: one specifically for Firestore +integration tests, and another for all other integration tests. We'll refer to +these projects as "general project" and "Firestore project". + +After creating each project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) +for each project. Ensure the project-level **Owner** +[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to +each service account. During the creation of the service account, you should +download the JSON credential file for use later. + +Next, ensure the following APIs are enabled in the general project: + +- BigQuery API +- BigQuery Data Transfer API +- Cloud Dataproc API +- Cloud Dataproc Control API Private +- Cloud Datastore API +- Cloud Firestore API +- Cloud Key Management Service (KMS) API +- Cloud Natural Language API +- Cloud OS Login API +- Cloud Pub/Sub API +- Cloud Resource Manager API +- Cloud Spanner API +- Cloud Speech API +- Cloud Translation API +- Cloud Video Intelligence API +- Cloud Vision API +- Compute Engine API +- Compute Engine Instance Group Manager API +- Container Registry API +- Firebase Rules API +- Google Cloud APIs +- Google Cloud Deployment Manager V2 API +- Google Cloud SQL +- Google Cloud Storage +- Google Cloud Storage JSON API +- Google Compute Engine Instance Group Updater API +- Google Compute Engine Instance Groups API +- Kubernetes Engine API +- Stackdriver Error Reporting API + +Next, create a Datastore database in the general project, and a Firestore +database in the Firestore project. + +Finally, in the general project, create an API key for the translate API: + +- Go to GCP Developer Console. +- Navigate to APIs & Services > Credentials. +- Click Create Credentials > API Key. +- Save this key for use in `GCLOUD_TESTS_API_KEY` as described below. + +#### Local Setup + +Once the two projects are created and configured, set the following environment +variables: + +- `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g. +bamboo-shift-455) for the general project. +- `GCLOUD_TESTS_GOLANG_KEY`: The path to the JSON key file of the general +project's service account. +- `GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID`: Developers Console project's ID +(e.g. doorway-cliff-677) for the Firestore project. +- `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the +Firestore project's service account. +- `GCLOUD_TESTS_GOLANG_KEYRING`: The full name of the keyring for the tests, +in the form +"projects/P/locations/L/keyRings/R". The creation of this is described below. +- `GCLOUD_TESTS_API_KEY`: API key for using the Translate API. +- `GCLOUD_TESTS_GOLANG_ZONE`: Compute Engine zone. + +Install the [gcloud command-line tool][gcloudcli] to your machine and use it to +create some resources used in integration tests. + +From the project's root directory: + +``` sh +# Sets the default project in your env. +$ gcloud config set project $GCLOUD_TESTS_GOLANG_PROJECT_ID + +# Authenticates the gcloud tool with your account. +$ gcloud auth login + +# Create the indexes used in the datastore integration tests. +$ gcloud datastore indexes create datastore/testdata/index.yaml + +# Creates a Google Cloud storage bucket with the same name as your test project, +# and with the Stackdriver Logging service account as owner, for the sink +# integration tests in logging. +$ gsutil mb gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID +$ gsutil acl ch -g cloud-logs@google.com:O gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID + +# Creates a PubSub topic for integration tests of storage notifications. +$ gcloud beta pubsub topics create go-storage-notification-test +# Next, go to the Pub/Sub dashboard in GCP console. Authorize the user +# "service-@gs-project-accounts.iam.gserviceaccount.com" +# as a publisher to that topic. + +# Creates a Spanner instance for the spanner integration tests. +$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 10 --description 'Instance for go client test' +# NOTE: Spanner instances are priced by the node-hour, so you may want to +# delete the instance after testing with 'gcloud beta spanner instances delete'. + +$ export MY_KEYRING=some-keyring-name +$ export MY_LOCATION=global +# Creates a KMS keyring, in the same location as the default location for your +# project's buckets. +$ gcloud kms keyrings create $MY_KEYRING --location $MY_LOCATION +# Creates two keys in the keyring, named key1 and key2. +$ gcloud kms keys create key1 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption +$ gcloud kms keys create key2 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption +# Sets the GCLOUD_TESTS_GOLANG_KEYRING environment variable. +$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_LOCATION/keyRings/$MY_KEYRING +# Authorizes Google Cloud Storage to encrypt and decrypt using key1. +gsutil kms authorize -p $GCLOUD_TESTS_GOLANG_PROJECT_ID -k $GCLOUD_TESTS_GOLANG_KEYRING/cryptoKeys/key1 +``` + +#### Running + +Once you've done the necessary setup, you can run the integration tests by +running: + +``` sh +$ go test -v cloud.google.com/go/... +``` + +#### Replay + +Some packages can record the RPCs during integration tests to a file for +subsequent replay. To record, pass the `-record` flag to `go test`. The +recording will be saved to the _package_`.replay` file. To replay integration +tests from a saved recording, the replay file must be present, the `-short` +flag must be passed to `go test`, and the `GCLOUD_TESTS_GOLANG_ENABLE_REPLAY` +environment variable must have a non-empty value. + +## Contributor License Agreements + +Before we can accept your pull requests you'll need to sign a Contributor +License Agreement (CLA): + +- **If you are an individual writing original source code** and **you own the +intellectual property**, then you'll need to sign an [individual CLA][indvcla]. +- **If you work for a company that wants to allow you to contribute your +work**, then you'll need to sign a [corporate CLA][corpcla]. + +You can sign these electronically (just scroll to the bottom). After that, +we'll be able to accept your pull requests. + +## Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) + +[gcloudcli]: https://developers.google.com/cloud/sdk/gcloud/ +[indvcla]: https://developers.google.com/open-source/cla/individual +[corpcla]: https://developers.google.com/open-source/cla/corporate diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md index f3a0c3c5e8..b115812c26 100644 --- a/vendor/cloud.google.com/go/README.md +++ b/vendor/cloud.google.com/go/README.md @@ -1,6 +1,6 @@ # Google Cloud Client Libraries for Go -[![GoDoc](https://godoc.org/cloud.google.com/go?status.svg)](https://godoc.org/cloud.google.com/go) +[![GoDoc](https://godoc.org/cloud.google.com/go?status.svg)](https://pkg.go.dev/cloud.google.com/go) Go packages for [Google Cloud Platform](https://cloud.google.com) services. @@ -8,11 +8,19 @@ Go packages for [Google Cloud Platform](https://cloud.google.com) services. import "cloud.google.com/go" ``` -To install the packages on your system, *do not clone the repo*. Instead use +To install the packages on your system, *do not clone the repo*. Instead: -``` -$ go get -u cloud.google.com/go/... -``` +1. Change to your project directory: + + ``` + cd /my/cloud/project + ``` +1. Get the package you want to use. Some products have their own module, so it's + best to `go get` the package(s) you want to use: + + ``` + $ go get cloud.google.com/go/firestore # Replace with the package you want to use. + ``` **NOTE:** Some of these packages are under development, and may occasionally make backwards-incompatible changes. @@ -23,40 +31,46 @@ make backwards-incompatible changes. Google API | Status | Package ------------------------------------------------|--------------|----------------------------------------------------------- -[Asset][cloud-asset] | alpha | [`cloud.google.com/go/asset/v1beta`][cloud-asset-ref] -[BigQuery][cloud-bigquery] | stable | [`cloud.google.com/go/bigquery`][cloud-bigquery-ref] -[Bigtable][cloud-bigtable] | stable | [`cloud.google.com/go/bigtable`][cloud-bigtable-ref] -[Cloudtasks][cloud-tasks] | stable | [`cloud.google.com/go/cloudtasks/apiv2`][cloud-tasks-ref] -[Container][cloud-container] | stable | [`cloud.google.com/go/container/apiv1`][cloud-container-ref] -[ContainerAnalysis][cloud-containeranalysis] | beta | [`cloud.google.com/go/containeranalysis/apiv1beta1`][cloud-containeranalysis-ref] -[Dataproc][cloud-dataproc] | stable | [`cloud.google.com/go/dataproc/apiv1`][cloud-dataproc-ref] -[Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`][cloud-datastore-ref] -[Debugger][cloud-debugger] | alpha | [`cloud.google.com/go/debugger/apiv2`][cloud-debugger-ref] -[Dialogflow][cloud-dialogflow] | alpha | [`cloud.google.com/go/dialogflow/apiv2`][cloud-dialogflow-ref] -[Data Loss Prevention][cloud-dlp] | alpha | [`cloud.google.com/go/dlp/apiv2`][cloud-dlp-ref] -[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`][cloud-errors-ref] -[Firestore][cloud-firestore] | stable | [`cloud.google.com/go/firestore`][cloud-firestore-ref] -[IAM][cloud-iam] | stable | [`cloud.google.com/go/iam`][cloud-iam-ref] -[IoT][cloud-iot] | alpha | [`cloud.google.com/iot/apiv1`][cloud-iot-ref] -[KMS][cloud-kms] | stable | [`cloud.google.com/go/kms`][cloud-kms-ref] -[Natural Language][cloud-natural-language] | stable | [`cloud.google.com/go/language/apiv1`][cloud-natural-language-ref] -[Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`][cloud-logging-ref] -[Monitoring][cloud-monitoring] | alpha | [`cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref] -[OS Login][cloud-oslogin] | alpha | [`cloud.google.com/go/oslogin/apiv1`][cloud-oslogin-ref] -[Pub/Sub][cloud-pubsub] | stable | [`cloud.google.com/go/pubsub`][cloud-pubsub-ref] -[Phishing Protection][cloud-phishingprotection] | alpha | [`cloud.google.com/go/phishingprotection/apiv1betad1`][cloud-phishingprotection-ref] -[reCAPTCHA Enterprise][cloud-recaptcha] | alpha | [`cloud.google.com/go/recaptchaenterprise/apiv1betad1`][cloud-recaptcha-ref] -[Memorystore][cloud-memorystore] | alpha | [`cloud.google.com/go/redis/apiv1`][cloud-memorystore-ref] -[Scheduler][cloud-scheduler] | stable | [`cloud.google.com/go/scheduler/apiv1`][cloud-scheduler-ref] -[Spanner][cloud-spanner] | stable | [`cloud.google.com/go/spanner`][cloud-spanner-ref] -[Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`][cloud-speech-ref] -[Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`][cloud-storage-ref] -[Talent][cloud-talent] | alpha | [`cloud.google.com/go/talent/apiv4beta1`][cloud-talent-ref] -[Text To Speech][cloud-texttospeech] | alpha | [`cloud.google.com/go/texttospeech/apiv1`][cloud-texttospeech-ref] -[Trace][cloud-trace] | alpha | [`cloud.google.com/go/trace/apiv2`][cloud-trace-ref] -[Translate][cloud-translate] | stable | [`cloud.google.com/go/translate`][cloud-translate-ref] -[Video Intelligence][cloud-video] | alpha | [`cloud.google.com/go/videointelligence/apiv1beta1`][cloud-video-ref] -[Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`][cloud-vision-ref] +[Asset][cloud-asset] | stable | [`cloud.google.com/go/asset/apiv1`](https://pkg.go.dev/cloud.google.com/go/asset/v1beta) +[Automl][cloud-automl] | stable | [`cloud.google.com/go/automl/apiv1`](https://pkg.go.dev/cloud.google.com/go/automl/apiv1) +[BigQuery][cloud-bigquery] | stable | [`cloud.google.com/go/bigquery`](https://pkg.go.dev/cloud.google.com/go/bigquery) +[Bigtable][cloud-bigtable] | stable | [`cloud.google.com/go/bigtable`](https://pkg.go.dev/cloud.google.com/go/bigtable) +[Cloudbuild][cloud-build] | stable | [`cloud.google.com/go/cloudbuild/apiv1`](https://pkg.go.dev/cloud.google.com/go/cloudbuild/apiv1) +[Cloudtasks][cloud-tasks] | stable | [`cloud.google.com/go/cloudtasks/apiv2`](https://pkg.go.dev/cloud.google.com/go/cloudtasks/apiv2) +[Container][cloud-container] | stable | [`cloud.google.com/go/container/apiv1`](https://pkg.go.dev/cloud.google.com/go/container/apiv1) +[ContainerAnalysis][cloud-containeranalysis] | beta | [`cloud.google.com/go/containeranalysis/apiv1`](https://pkg.go.dev/cloud.google.com/go/containeranalysis/apiv1) +[Dataproc][cloud-dataproc] | stable | [`cloud.google.com/go/dataproc/apiv1`](https://pkg.go.dev/cloud.google.com/go/dataproc/apiv1) +[Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`](https://pkg.go.dev/cloud.google.com/go/datastore) +[Debugger][cloud-debugger] | stable | [`cloud.google.com/go/debugger/apiv2`](https://pkg.go.dev/cloud.google.com/go/debugger/apiv2) +[Dialogflow][cloud-dialogflow] | stable | [`cloud.google.com/go/dialogflow/apiv2`](https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2) +[Data Loss Prevention][cloud-dlp] | stable | [`cloud.google.com/go/dlp/apiv2`](https://pkg.go.dev/cloud.google.com/go/dlp/apiv2) +[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`](https://pkg.go.dev/cloud.google.com/go/errorreporting) +[Firestore][cloud-firestore] | stable | [`cloud.google.com/go/firestore`](https://pkg.go.dev/cloud.google.com/go/firestore) +[IAM][cloud-iam] | stable | [`cloud.google.com/go/iam`](https://pkg.go.dev/cloud.google.com/go/iam) +[IoT][cloud-iot] | stable | [`cloud.google.com/go/iot/apiv1`](https://pkg.go.dev/cloud.google.com/go/iot/apiv1) +[IRM][cloud-irm] | alpha | [`cloud.google.com/go/irm/apiv1alpha2`](https://pkg.go.dev/cloud.google.com/go/irm/apiv1alpha2) +[KMS][cloud-kms] | stable | [`cloud.google.com/go/kms/apiv1`](https://pkg.go.dev/cloud.google.com/go/kms/apiv1) +[Natural Language][cloud-natural-language] | stable | [`cloud.google.com/go/language/apiv1`](https://pkg.go.dev/cloud.google.com/go/language/apiv1) +[Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`](https://pkg.go.dev/cloud.google.com/go/logging) +[Memorystore][cloud-memorystore] | alpha | [`cloud.google.com/go/redis/apiv1`](https://pkg.go.dev/cloud.google.com/go/redis/apiv1) +[Monitoring][cloud-monitoring] | stable | [`cloud.google.com/go/monitoring/apiv3`](https://pkg.go.dev/cloud.google.com/go/monitoring/apiv3) +[OS Login][cloud-oslogin] | stable | [`cloud.google.com/go/oslogin/apiv1`](https://pkg.go.dev/cloud.google.com/go/oslogin/apiv1) +[Pub/Sub][cloud-pubsub] | stable | [`cloud.google.com/go/pubsub`](https://pkg.go.dev/cloud.google.com/go/pubsub) +[Phishing Protection][cloud-phishingprotection] | alpha | [`cloud.google.com/go/phishingprotection/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/phishingprotection/apiv1beta1) +[reCAPTCHA Enterprise][cloud-recaptcha] | alpha | [`cloud.google.com/go/recaptchaenterprise/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/recaptchaenterprise/apiv1beta1) +[Recommender][cloud-recommender] | beta | [`cloud.google.com/go/recommender/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/recommender/apiv1beta1) +[Scheduler][cloud-scheduler] | stable | [`cloud.google.com/go/scheduler/apiv1`](https://pkg.go.dev/cloud.google.com/go/scheduler/apiv1) +[Securitycenter][cloud-securitycenter] | stable | [`cloud.google.com/go/securitycenter/apiv1`](https://pkg.go.dev/cloud.google.com/go/securitycenter/apiv1) +[Spanner][cloud-spanner] | stable | [`cloud.google.com/go/spanner`](https://pkg.go.dev/cloud.google.com/go/spanner) +[Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`](https://pkg.go.dev/cloud.google.com/go/speech/apiv1) +[Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`](https://pkg.go.dev/cloud.google.com/go/storage) +[Talent][cloud-talent] | alpha | [`cloud.google.com/go/talent/apiv4beta1`](https://pkg.go.dev/cloud.google.com/go/talent/apiv4beta1) +[Text To Speech][cloud-texttospeech] | stable | [`cloud.google.com/go/texttospeech/apiv1`](https://pkg.go.dev/cloud.google.com/go/texttospeech/apiv1) +[Trace][cloud-trace] | stable | [`cloud.google.com/go/trace/apiv2`](https://pkg.go.dev/cloud.google.com/go/trace/apiv2) +[Translate][cloud-translate] | stable | [`cloud.google.com/go/translate`](https://pkg.go.dev/cloud.google.com/go/translate) +[Video Intelligence][cloud-video] | beta | [`cloud.google.com/go/videointelligence/apiv1beta2`](https://pkg.go.dev/cloud.google.com/go/videointelligence/apiv1beta2) +[Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`](https://pkg.go.dev/cloud.google.com/go/vision/apiv1) +[Webrisk][cloud-webrisk] | alpha | [`cloud.google.com/go/webrisk/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/webrisk/apiv1beta1) > **Alpha status**: the API is still being actively developed. As a > result, it might change in backward-incompatible ways and is not recommended @@ -69,7 +83,7 @@ Google API | Status | Package > **Stable status**: the API is mature and ready for production use. We will > continue addressing bugs and feature requests. -Documentation and examples are available at [godoc.org/cloud.google.com/go](godoc.org/cloud.google.com/go) +Documentation and examples are available at [pkg.go.dev/cloud.google.com/go](https://pkg.go.dev/cloud.google.com/go) ## Go Versions Supported @@ -90,7 +104,7 @@ client, err := storage.NewClient(ctx) To authorize using a [JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys), pass -[`option.WithCredentialsFile`](https://godoc.org/google.golang.org/api/option#WithCredentialsFile) +[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile) to the `NewClient` function of the desired package. For example: [snip]:# (auth-JSON) @@ -99,9 +113,9 @@ client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfil ``` You can exert more control over authorization by using the -[`golang.org/x/oauth2`](https://godoc.org/golang.org/x/oauth2) package to +[`golang.org/x/oauth2`](https://pkg.go.dev/golang.org/x/oauth2) package to create an `oauth2.TokenSource`. Then pass -[`option.WithTokenSource`](https://godoc.org/google.golang.org/api/option#WithTokenSource) +[`option.WithTokenSource`](https://pkg.go.dev/google.golang.org/api/option#WithTokenSource) to the `NewClient` function: [snip]:# (auth-ts) ```go @@ -113,115 +127,52 @@ client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource)) Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md) -document for details. We're using Gerrit for our code reviews. Please don't open pull -requests against this repo, new pull requests will be automatically closed. +document for details. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct) for more information. -[cloud-datastore]: https://cloud.google.com/datastore/ -[cloud-datastore-ref]: https://godoc.org/cloud.google.com/go/datastore - -[cloud-firestore]: https://cloud.google.com/firestore/ -[cloud-firestore-ref]: https://godoc.org/cloud.google.com/go/firestore - -[cloud-pubsub]: https://cloud.google.com/pubsub/ -[cloud-pubsub-ref]: https://godoc.org/cloud.google.com/go/pubsub - -[cloud-storage]: https://cloud.google.com/storage/ -[cloud-storage-ref]: https://godoc.org/cloud.google.com/go/storage - -[cloud-bigtable]: https://cloud.google.com/bigtable/ -[cloud-bigtable-ref]: https://godoc.org/cloud.google.com/go/bigtable - -[cloud-bigquery]: https://cloud.google.com/bigquery/ -[cloud-bigquery-ref]: https://godoc.org/cloud.google.com/go/bigquery - -[cloud-logging]: https://cloud.google.com/logging/ -[cloud-logging-ref]: https://godoc.org/cloud.google.com/go/logging - -[cloud-monitoring]: https://cloud.google.com/monitoring/ -[cloud-monitoring-ref]: https://godoc.org/cloud.google.com/go/monitoring/apiv3 - -[cloud-vision]: https://cloud.google.com/vision -[cloud-vision-ref]: https://godoc.org/cloud.google.com/go/vision/apiv1 - -[cloud-language]: https://cloud.google.com/natural-language -[cloud-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1 - -[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest -[cloud-oslogin-ref]: https://cloud.google.com/go/oslogin/apiv1 - -[cloud-speech]: https://cloud.google.com/speech -[cloud-speech-ref]: https://godoc.org/cloud.google.com/go/speech/apiv1 - -[cloud-spanner]: https://cloud.google.com/spanner/ -[cloud-spanner-ref]: https://godoc.org/cloud.google.com/go/spanner - -[cloud-translate]: https://cloud.google.com/translate -[cloud-translate-ref]: https://godoc.org/cloud.google.com/go/translate - -[cloud-video]: https://cloud.google.com/video-intelligence/ -[cloud-video-ref]: https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1 - -[cloud-errors]: https://cloud.google.com/error-reporting/ -[cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errorreporting - -[cloud-container]: https://cloud.google.com/containers/ -[cloud-container-ref]: https://godoc.org/cloud.google.com/go/container/apiv1 - -[cloud-debugger]: https://cloud.google.com/debugger/ -[cloud-debugger-ref]: https://godoc.org/cloud.google.com/go/debugger/apiv2 - -[cloud-dlp]: https://cloud.google.com/dlp/ -[cloud-dlp-ref]: https://godoc.org/cloud.google.com/go/dlp/apiv2beta1 - -[cloud-dataproc]: https://cloud.google.com/dataproc/ -[cloud-dataproc-ref]: https://godoc.org/cloud.google.com/go/dataproc/apiv1 - -[cloud-iam]: https://cloud.google.com/iam/ -[cloud-iam-ref]: https://godoc.org/cloud.google.com/go/iam - -[cloud-kms]: https://cloud.google.com/kms/ -[cloud-kms-ref]: https://godoc.org/cloud.google.com/go/kms/apiv1 - -[cloud-natural-language]: https://cloud.google.com/natural-language/ -[cloud-natural-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1 - -[cloud-memorystore]: https://cloud.google.com/memorystore/ -[cloud-memorystore-ref]: https://godoc.org/cloud.google.com/go/redis/apiv1 - -[cloud-texttospeech]: https://cloud.google.com/texttospeech/ -[cloud-texttospeech-ref]: https://godoc.org/cloud.google.com/go/texttospeech/apiv1 - -[cloud-trace]: https://cloud.google.com/trace/ -[cloud-trace-ref]: https://godoc.org/cloud.google.com/go/trace/apiv2 - -[cloud-dialogflow]: https://cloud.google.com/dialogflow-enterprise/ -[cloud-dialogflow-ref]: https://godoc.org/cloud.google.com/go/dialogflow/apiv2 - -[cloud-containeranalysis]: https://cloud.google.com/container-registry/docs/container-analysis -[cloud-containeranalysis-ref]: https://godoc.org/cloud.google.com/go/devtools/containeranalysis/apiv1beta1 - [cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory -[cloud-asset-ref]: https://godoc.org/cloud.google.com/go/asset/apiv1 - -[cloud-tasks]: https://cloud.google.com/tasks/ -[cloud-tasks-ref]: https://godoc.org/cloud.google.com/go/cloudtasks/apiv2 - -[cloud-scheduler]: https://cloud.google.com/scheduler -[cloud-scheduler-ref]: https://godoc.org/cloud.google.com/go/scheduler/apiv1 - +[cloud-automl]: https://cloud.google.com/automl +[cloud-build]: https://cloud.google.com/cloud-build/ +[cloud-bigquery]: https://cloud.google.com/bigquery/ +[cloud-bigtable]: https://cloud.google.com/bigtable/ +[cloud-container]: https://cloud.google.com/containers/ +[cloud-containeranalysis]: https://cloud.google.com/container-registry/docs/container-analysis +[cloud-dataproc]: https://cloud.google.com/dataproc/ +[cloud-datastore]: https://cloud.google.com/datastore/ +[cloud-dialogflow]: https://cloud.google.com/dialogflow-enterprise/ +[cloud-debugger]: https://cloud.google.com/debugger/ +[cloud-dlp]: https://cloud.google.com/dlp/ +[cloud-errors]: https://cloud.google.com/error-reporting/ +[cloud-firestore]: https://cloud.google.com/firestore/ +[cloud-iam]: https://cloud.google.com/iam/ [cloud-iot]: https://cloud.google.com/iot-core/ -[cloud-iot-ref]: https://godoc.org/cloud.google.com/go/iot/apiv1 - +[cloud-irm]: https://cloud.google.com/incident-response/docs/concepts +[cloud-kms]: https://cloud.google.com/kms/ +[cloud-pubsub]: https://cloud.google.com/pubsub/ +[cloud-storage]: https://cloud.google.com/storage/ +[cloud-language]: https://cloud.google.com/natural-language +[cloud-logging]: https://cloud.google.com/logging/ +[cloud-natural-language]: https://cloud.google.com/natural-language/ +[cloud-memorystore]: https://cloud.google.com/memorystore/ +[cloud-monitoring]: https://cloud.google.com/monitoring/ +[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest [cloud-phishingprotection]: https://cloud.google.com/phishing-protection/ -[cloud-phishingprotection-ref]: https://cloud.google.com/go/phishingprotection/apiv1beta1 - -[cloud-recaptcha]: https://cloud.google.com/recaptcha-enterprise/ -[cloud-recaptcha-ref]: https://cloud.google.com/go/recaptchaenterprise/apiv1beta1 - +[cloud-securitycenter]: https://cloud.google.com/security-command-center/ +[cloud-scheduler]: https://cloud.google.com/scheduler +[cloud-spanner]: https://cloud.google.com/spanner/ +[cloud-speech]: https://cloud.google.com/speech [cloud-talent]: https://cloud.google.com/solutions/talent-solution/ -[cloud-talent-ref]: https://godoc.org/cloud.google.com/go/talent/apiv4beta1 +[cloud-tasks]: https://cloud.google.com/tasks/ +[cloud-texttospeech]: https://cloud.google.com/texttospeech/ +[cloud-talent]: https://cloud.google.com/solutions/talent-solution/ +[cloud-trace]: https://cloud.google.com/trace/ +[cloud-translate]: https://cloud.google.com/translate +[cloud-recaptcha]: https://cloud.google.com/recaptcha-enterprise/ +[cloud-recommender]: https://cloud.google.com/recommendations/ +[cloud-video]: https://cloud.google.com/video-intelligence/ +[cloud-vision]: https://cloud.google.com/vision +[cloud-webrisk]: https://cloud.google.com/web-risk/ diff --git a/vendor/cloud.google.com/go/RELEASING.md b/vendor/cloud.google.com/go/RELEASING.md new file mode 100644 index 0000000000..c8c7f93352 --- /dev/null +++ b/vendor/cloud.google.com/go/RELEASING.md @@ -0,0 +1,128 @@ +# Setup from scratch + +1. [Install Go](https://golang.org/dl/). + 1. Ensure that your `GOBIN` directory (by default `$(go env GOPATH)/bin`) + is in your `PATH`. + 1. Check it's working by running `go version`. + * If it doesn't work, check the install location, usually + `/usr/local/go`, is on your `PATH`. + +1. Sign one of the +[contributor license agreements](#contributor-license-agreements) below. + +1. Clone the repo: + `git clone https://github.com/googleapis/google-cloud-go` + +1. Change into the checked out source: + `cd google-cloud-go` + +1. Fork the repo and add your fork as a secondary remote (this is necessary in + order to create PRs). + +# Which module to release? + +The Go client libraries have several modules. Each module does not strictly +correspond to a single library - they correspond to trees of directories. If a +file needs to be released, you must release the closest ancestor module. + +To see all modules: + +``` +$ cat `find . -name go.mod` | grep module +module cloud.google.com/go +module cloud.google.com/go/bigtable +module cloud.google.com/go/firestore +module cloud.google.com/go/bigquery +module cloud.google.com/go/storage +module cloud.google.com/go/datastore +module cloud.google.com/go/pubsub +module cloud.google.com/go/spanner +module cloud.google.com/go/logging +``` + +The `cloud.google.com/go` is the repository root module. Each other module is +a submodule. + +So, if you need to release a change in `bigtable/bttest/inmem.go`, the closest +ancestor module is `cloud.google.com/go/bigtable` - so you should release a new +version of the `cloud.google.com/go/bigtable` submodule. + +If you need to release a change in `asset/apiv1/asset_client.go`, the closest +ancestor module is `cloud.google.com/go` - so you should release a new version +of the `cloud.google.com/go` repository root module. Note: releasing +`cloud.google.com/go` has no impact on any of the submodules, and vice-versa. +They are released entirely independently. + +# Test failures + +If there are any test failures in the Kokoro build, releases are blocked until +the failures have been resolved. + +# How to release `cloud.google.com/go` + +1. Check for failures in the + [continuous Kokoro build](http://go/google-cloud-go-continuous). If there are any + failures in the most recent build, address them before proceeding with the + release. +1. Navigate to `~/code/gocloud/` and switch to master. +1. `git pull` +1. Run `git tag -l | grep -v beta | grep -v alpha` to see all existing releases. + The current latest tag `$CV` is the largest tag. It should look something + like `vX.Y.Z` (note: ignore all `LIB/vX.Y.Z` tags - these are tags for a + specific library, not the module root). We'll call the current version `$CV` + and the new version `$NV`. +1. On master, run `git log $CV...` to list all the changes since the last + release. NOTE: You must manually visually parse out changes to submodules [1] + (the `git log` is going to show you things in submodules, which are not going + to be part of your release). +1. Edit `CHANGES.md` to include a summary of the changes. +1. `cd internal/version && go generate && cd -` +1. Commit the changes, push to your fork, and create a PR. +1. Wait for the PR to be reviewed and merged. Once it's merged, and without + merging any other PRs in the meantime: + a. Switch to master. + b. `git pull` + c. Tag the repo with the next version: `git tag $NV`. + d. Push the tag to origin: + `git push origin $NV` +2. Update [the releases page](https://github.com/googleapis/google-cloud-go/releases) + with the new release, copying the contents of `CHANGES.md`. + +# How to release a submodule + +We have several submodules, including `cloud.google.com/go/logging`, +`cloud.google.com/go/datastore`, and so on. + +To release a submodule: + +(these instructions assume we're releasing `cloud.google.com/go/datastore` - adjust accordingly) + +1. Check for failures in the + [continuous Kokoro build](http://go/google-cloud-go-continuous). If there are any + failures in the most recent build, address them before proceeding with the + release. (This applies even if the failures are in a different submodule from the one + being released.) +1. Navigate to `~/code/gocloud/` and switch to master. +1. `git pull` +1. Run `git tag -l | grep datastore | grep -v beta | grep -v alpha` to see all + existing releases. The current latest tag `$CV` is the largest tag. It + should look something like `datastore/vX.Y.Z`. We'll call the current version + `$CV` and the new version `$NV`. +1. On master, run `git log $CV.. -- datastore/` to list all the changes to the + submodule directory since the last release. +1. Edit `datastore/CHANGES.md` to include a summary of the changes. +1. `cd internal/version && go generate && cd -` +1. Commit the changes, push to your fork, and create a PR. +1. Wait for the PR to be reviewed and merged. Once it's merged, and without + merging any other PRs in the meantime: + a. Switch to master. + b. `git pull` + c. Tag the repo with the next version: `git tag $NV`. + d. Push the tag to origin: + `git push origin $NV` +1. Update [the releases page](https://github.com/googleapis/google-cloud-go/releases) + with the new release, copying the contents of `datastore/CHANGES.md`. + +# Appendix + +1: This should get better as submodule tooling matures. diff --git a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclinetest.h b/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclinetest.h deleted file mode 100644 index 156c0b87b0..0000000000 --- a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclinetest.h +++ /dev/null @@ -1,9 +0,0 @@ -// +build ignore - -// Empty include file to generate z symbols - - - - - -// EOF diff --git a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclntab.go b/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclntab.go deleted file mode 100644 index dcd7015bb7..0000000000 --- a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclntab.go +++ /dev/null @@ -1,472 +0,0 @@ -// Copyright 2018 Google Inc. All Rights Reserved. -// -// 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. - -/* - * Line tables - */ - -package gosym - -import ( - "encoding/binary" - "sync" -) - -// A LineTable is a data structure mapping program counters to line numbers. -// -// In Go 1.1 and earlier, each function (represented by a Func) had its own LineTable, -// and the line number corresponded to a numbering of all source lines in the -// program, across all files. That absolute line number would then have to be -// converted separately to a file name and line number within the file. -// -// In Go 1.2, the format of the data changed so that there is a single LineTable -// for the entire program, shared by all Funcs, and there are no absolute line -// numbers, just line numbers within specific files. -// -// For the most part, LineTable's methods should be treated as an internal -// detail of the package; callers should use the methods on Table instead. -type LineTable struct { - Data []byte - PC uint64 - Line int - - // Go 1.2 state - mu sync.Mutex - go12 int // is this in Go 1.2 format? -1 no, 0 unknown, 1 yes - binary binary.ByteOrder - quantum uint32 - ptrsize uint32 - functab []byte - nfunctab uint32 - filetab []byte - nfiletab uint32 - fileMap map[string]uint32 -} - -// NOTE(rsc): This is wrong for GOARCH=arm, which uses a quantum of 4, -// but we have no idea whether we're using arm or not. This only -// matters in the old (pre-Go 1.2) symbol table format, so it's not worth -// fixing. -const oldQuantum = 1 - -func (t *LineTable) parse(targetPC uint64, targetLine int) (b []byte, pc uint64, line int) { - // The PC/line table can be thought of as a sequence of - // * - // batches. Each update batch results in a (pc, line) pair, - // where line applies to every PC from pc up to but not - // including the pc of the next pair. - // - // Here we process each update individually, which simplifies - // the code, but makes the corner cases more confusing. - b, pc, line = t.Data, t.PC, t.Line - for pc <= targetPC && line != targetLine && len(b) > 0 { - code := b[0] - b = b[1:] - switch { - case code == 0: - if len(b) < 4 { - b = b[0:0] - break - } - val := binary.BigEndian.Uint32(b) - b = b[4:] - line += int(val) - case code <= 64: - line += int(code) - case code <= 128: - line -= int(code - 64) - default: - pc += oldQuantum * uint64(code-128) - continue - } - pc += oldQuantum - } - return b, pc, line -} - -func (t *LineTable) slice(pc uint64) *LineTable { - data, pc, line := t.parse(pc, -1) - return &LineTable{Data: data, PC: pc, Line: line} -} - -// PCToLine returns the line number for the given program counter. -// Callers should use Table's PCToLine method instead. -func (t *LineTable) PCToLine(pc uint64) int { - if t.isGo12() { - return t.go12PCToLine(pc) - } - _, _, line := t.parse(pc, -1) - return line -} - -// LineToPC returns the program counter for the given line number, -// considering only program counters before maxpc. -// Callers should use Table's LineToPC method instead. -func (t *LineTable) LineToPC(line int, maxpc uint64) uint64 { - if t.isGo12() { - return 0 - } - _, pc, line1 := t.parse(maxpc, line) - if line1 != line { - return 0 - } - // Subtract quantum from PC to account for post-line increment - return pc - oldQuantum -} - -// NewLineTable returns a new PC/line table -// corresponding to the encoded data. -// Text must be the start address of the -// corresponding text segment. -func NewLineTable(data []byte, text uint64) *LineTable { - return &LineTable{Data: data, PC: text, Line: 0} -} - -// Go 1.2 symbol table format. -// See golang.org/s/go12symtab. -// -// A general note about the methods here: rather than try to avoid -// index out of bounds errors, we trust Go to detect them, and then -// we recover from the panics and treat them as indicative of a malformed -// or incomplete table. -// -// The methods called by symtab.go, which begin with "go12" prefixes, -// are expected to have that recovery logic. - -// isGo12 reports whether this is a Go 1.2 (or later) symbol table. -func (t *LineTable) isGo12() bool { - t.go12Init() - return t.go12 == 1 -} - -const go12magic = 0xfffffffb - -// uintptr returns the pointer-sized value encoded at b. -// The pointer size is dictated by the table being read. -func (t *LineTable) uintptr(b []byte) uint64 { - if t.ptrsize == 4 { - return uint64(t.binary.Uint32(b)) - } - return t.binary.Uint64(b) -} - -// go12init initializes the Go 1.2 metadata if t is a Go 1.2 symbol table. -func (t *LineTable) go12Init() { - t.mu.Lock() - defer t.mu.Unlock() - if t.go12 != 0 { - return - } - - defer func() { - // If we panic parsing, assume it's not a Go 1.2 symbol table. - recover() - }() - - // Check header: 4-byte magic, two zeros, pc quantum, pointer size. - t.go12 = -1 // not Go 1.2 until proven otherwise - if len(t.Data) < 16 || t.Data[4] != 0 || t.Data[5] != 0 || - (t.Data[6] != 1 && t.Data[6] != 4) || // pc quantum - (t.Data[7] != 4 && t.Data[7] != 8) { // pointer size - return - } - - switch uint32(go12magic) { - case binary.LittleEndian.Uint32(t.Data): - t.binary = binary.LittleEndian - case binary.BigEndian.Uint32(t.Data): - t.binary = binary.BigEndian - default: - return - } - - t.quantum = uint32(t.Data[6]) - t.ptrsize = uint32(t.Data[7]) - - t.nfunctab = uint32(t.uintptr(t.Data[8:])) - t.functab = t.Data[8+t.ptrsize:] - functabsize := t.nfunctab*2*t.ptrsize + t.ptrsize - fileoff := t.binary.Uint32(t.functab[functabsize:]) - t.functab = t.functab[:functabsize] - t.filetab = t.Data[fileoff:] - t.nfiletab = t.binary.Uint32(t.filetab) - t.filetab = t.filetab[:t.nfiletab*4] - - t.go12 = 1 // so far so good -} - -// go12Funcs returns a slice of Funcs derived from the Go 1.2 pcln table. -func (t *LineTable) go12Funcs() []Func { - // Assume it is malformed and return nil on error. - defer func() { - recover() - }() - - n := len(t.functab) / int(t.ptrsize) / 2 - funcs := make([]Func, n) - for i := range funcs { - f := &funcs[i] - f.Entry = uint64(t.uintptr(t.functab[2*i*int(t.ptrsize):])) - f.End = uint64(t.uintptr(t.functab[(2*i+2)*int(t.ptrsize):])) - info := t.Data[t.uintptr(t.functab[(2*i+1)*int(t.ptrsize):]):] - f.LineTable = t - f.FrameSize = int(t.binary.Uint32(info[t.ptrsize+2*4:])) - f.Sym = &Sym{ - Value: f.Entry, - Type: 'T', - Name: t.string(t.binary.Uint32(info[t.ptrsize:])), - GoType: 0, - Func: f, - } - } - return funcs -} - -// findFunc returns the func corresponding to the given program counter. -func (t *LineTable) findFunc(pc uint64) []byte { - if pc < t.uintptr(t.functab) || pc >= t.uintptr(t.functab[len(t.functab)-int(t.ptrsize):]) { - return nil - } - - // The function table is a list of 2*nfunctab+1 uintptrs, - // alternating program counters and offsets to func structures. - f := t.functab - nf := t.nfunctab - for nf > 0 { - m := nf / 2 - fm := f[2*t.ptrsize*m:] - if t.uintptr(fm) <= pc && pc < t.uintptr(fm[2*t.ptrsize:]) { - return t.Data[t.uintptr(fm[t.ptrsize:]):] - } else if pc < t.uintptr(fm) { - nf = m - } else { - f = f[(m+1)*2*t.ptrsize:] - nf -= m + 1 - } - } - return nil -} - -// readvarint reads, removes, and returns a varint from *pp. -func (t *LineTable) readvarint(pp *[]byte) uint32 { - var v, shift uint32 - p := *pp - for shift = 0; ; shift += 7 { - b := p[0] - p = p[1:] - v |= (uint32(b) & 0x7F) << shift - if b&0x80 == 0 { - break - } - } - *pp = p - return v -} - -// string returns a Go string found at off. -func (t *LineTable) string(off uint32) string { - for i := off; ; i++ { - if t.Data[i] == 0 { - return string(t.Data[off:i]) - } - } -} - -// step advances to the next pc, value pair in the encoded table. -func (t *LineTable) step(p *[]byte, pc *uint64, val *int32, first bool) bool { - uvdelta := t.readvarint(p) - if uvdelta == 0 && !first { - return false - } - if uvdelta&1 != 0 { - uvdelta = ^(uvdelta >> 1) - } else { - uvdelta >>= 1 - } - vdelta := int32(uvdelta) - pcdelta := t.readvarint(p) * t.quantum - *pc += uint64(pcdelta) - *val += vdelta - return true -} - -// pcvalue reports the value associated with the target pc. -// off is the offset to the beginning of the pc-value table, -// and entry is the start PC for the corresponding function. -func (t *LineTable) pcvalue(off uint32, entry, targetpc uint64) int32 { - if off == 0 { - return -1 - } - p := t.Data[off:] - - val := int32(-1) - pc := entry - for t.step(&p, &pc, &val, pc == entry) { - if targetpc < pc { - return val - } - } - return -1 -} - -// findFileLine scans one function in the binary looking for a -// program counter in the given file on the given line. -// It does so by running the pc-value tables mapping program counter -// to file number. Since most functions come from a single file, these -// are usually short and quick to scan. If a file match is found, then the -// code goes to the expense of looking for a simultaneous line number match. -func (t *LineTable) findFileLine(entry uint64, filetab, linetab uint32, filenum, line int32) uint64 { - if filetab == 0 || linetab == 0 { - return 0 - } - - fp := t.Data[filetab:] - fl := t.Data[linetab:] - fileVal := int32(-1) - filePC := entry - lineVal := int32(-1) - linePC := entry - fileStartPC := filePC - for t.step(&fp, &filePC, &fileVal, filePC == entry) { - if fileVal == filenum && fileStartPC < filePC { - // fileVal is in effect starting at fileStartPC up to - // but not including filePC, and it's the file we want. - // Run the PC table looking for a matching line number - // or until we reach filePC. - lineStartPC := linePC - for linePC < filePC && t.step(&fl, &linePC, &lineVal, linePC == entry) { - // lineVal is in effect until linePC, and lineStartPC < filePC. - if lineVal == line { - if fileStartPC <= lineStartPC { - return lineStartPC - } - if fileStartPC < linePC { - return fileStartPC - } - } - lineStartPC = linePC - } - } - fileStartPC = filePC - } - return 0 -} - -// go12PCToLine maps program counter to line number for the Go 1.2 pcln table. -func (t *LineTable) go12PCToLine(pc uint64) (line int) { - return t.go12PCToVal(pc, t.ptrsize+5*4) -} - -// go12PCToSPAdj maps program counter to Stack Pointer adjustment for the Go 1.2 pcln table. -func (t *LineTable) go12PCToSPAdj(pc uint64) (spadj int) { - return t.go12PCToVal(pc, t.ptrsize+3*4) -} - -func (t *LineTable) go12PCToVal(pc uint64, fOffset uint32) (val int) { - defer func() { - if recover() != nil { - val = -1 - } - }() - - f := t.findFunc(pc) - if f == nil { - return -1 - } - entry := t.uintptr(f) - linetab := t.binary.Uint32(f[fOffset:]) - return int(t.pcvalue(linetab, entry, pc)) -} - -// go12PCToFile maps program counter to file name for the Go 1.2 pcln table. -func (t *LineTable) go12PCToFile(pc uint64) (file string) { - defer func() { - if recover() != nil { - file = "" - } - }() - - f := t.findFunc(pc) - if f == nil { - return "" - } - entry := t.uintptr(f) - filetab := t.binary.Uint32(f[t.ptrsize+4*4:]) - fno := t.pcvalue(filetab, entry, pc) - if fno <= 0 { - return "" - } - return t.string(t.binary.Uint32(t.filetab[4*fno:])) -} - -// go12LineToPC maps a (file, line) pair to a program counter for the Go 1.2 pcln table. -func (t *LineTable) go12LineToPC(file string, line int) (pc uint64) { - defer func() { - if recover() != nil { - pc = 0 - } - }() - - t.initFileMap() - filenum := t.fileMap[file] - if filenum == 0 { - return 0 - } - - // Scan all functions. - // If this turns out to be a bottleneck, we could build a map[int32][]int32 - // mapping file number to a list of functions with code from that file. - for i := uint32(0); i < t.nfunctab; i++ { - f := t.Data[t.uintptr(t.functab[2*t.ptrsize*i+t.ptrsize:]):] - entry := t.uintptr(f) - filetab := t.binary.Uint32(f[t.ptrsize+4*4:]) - linetab := t.binary.Uint32(f[t.ptrsize+5*4:]) - pc := t.findFileLine(entry, filetab, linetab, int32(filenum), int32(line)) - if pc != 0 { - return pc - } - } - return 0 -} - -// initFileMap initializes the map from file name to file number. -func (t *LineTable) initFileMap() { - t.mu.Lock() - defer t.mu.Unlock() - - if t.fileMap != nil { - return - } - m := make(map[string]uint32) - - for i := uint32(1); i < t.nfiletab; i++ { - s := t.string(t.binary.Uint32(t.filetab[4*i:])) - m[s] = i - } - t.fileMap = m -} - -// go12MapFiles adds to m a key for every file in the Go 1.2 LineTable. -// Every key maps to obj. That's not a very interesting map, but it provides -// a way for callers to obtain the list of files in the program. -func (t *LineTable) go12MapFiles(m map[string]*Obj, obj *Obj) { - defer func() { - recover() - }() - - t.initFileMap() - for file := range t.fileMap { - m[file] = obj - } -} diff --git a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/symtab.go b/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/symtab.go deleted file mode 100644 index 2c83b841cf..0000000000 --- a/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/symtab.go +++ /dev/null @@ -1,731 +0,0 @@ -// Copyright 2018 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package gosym implements access to the Go symbol -// and line number tables embedded in Go binaries generated -// by the gc compilers. -package gosym - -// The table format is a variant of the format used in Plan 9's a.out -// format, documented at http://plan9.bell-labs.com/magic/man2html/6/a.out. -// The best reference for the differences between the Plan 9 format -// and the Go format is the runtime source, specifically ../../runtime/symtab.c. - -import ( - "bytes" - "encoding/binary" - "fmt" - "strconv" - "strings" -) - -/* - * Symbols - */ - -// A Sym represents a single symbol table entry. -type Sym struct { - Value uint64 - Type byte - Name string - GoType uint64 - // If this symbol if a function symbol, the corresponding Func - Func *Func -} - -// Static reports whether this symbol is static (not visible outside its file). -func (s *Sym) Static() bool { return s.Type >= 'a' } - -// PackageName returns the package part of the symbol name, -// or the empty string if there is none. -func (s *Sym) PackageName() string { - if i := strings.Index(s.Name, "."); i != -1 { - return s.Name[0:i] - } - return "" -} - -// ReceiverName returns the receiver type name of this symbol, -// or the empty string if there is none. -func (s *Sym) ReceiverName() string { - l := strings.Index(s.Name, ".") - r := strings.LastIndex(s.Name, ".") - if l == -1 || r == -1 || l == r { - return "" - } - return s.Name[l+1 : r] -} - -// BaseName returns the symbol name without the package or receiver name. -func (s *Sym) BaseName() string { - if i := strings.LastIndex(s.Name, "."); i != -1 { - return s.Name[i+1:] - } - return s.Name -} - -// A Func collects information about a single function. -type Func struct { - Entry uint64 - *Sym - End uint64 - Params []*Sym - Locals []*Sym - FrameSize int - LineTable *LineTable - Obj *Obj -} - -// An Obj represents a collection of functions in a symbol table. -// -// The exact method of division of a binary into separate Objs is an internal detail -// of the symbol table format. -// -// In early versions of Go each source file became a different Obj. -// -// In Go 1 and Go 1.1, each package produced one Obj for all Go sources -// and one Obj per C source file. -// -// In Go 1.2, there is a single Obj for the entire program. -type Obj struct { - // Funcs is a list of functions in the Obj. - Funcs []Func - - // In Go 1.1 and earlier, Paths is a list of symbols corresponding - // to the source file names that produced the Obj. - // In Go 1.2, Paths is nil. - // Use the keys of Table.Files to obtain a list of source files. - Paths []Sym // meta -} - -/* - * Symbol tables - */ - -// Table represents a Go symbol table. It stores all of the -// symbols decoded from the program and provides methods to translate -// between symbols, names, and addresses. -type Table struct { - Syms []Sym - Funcs []Func - Files map[string]*Obj // nil for Go 1.2 and later binaries - Objs []Obj // nil for Go 1.2 and later binaries - - go12line *LineTable // Go 1.2 line number table -} - -type sym struct { - value uint64 - gotype uint64 - typ byte - name []byte -} - -var ( - littleEndianSymtab = []byte{0xFD, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00} - bigEndianSymtab = []byte{0xFF, 0xFF, 0xFF, 0xFD, 0x00, 0x00, 0x00} - oldLittleEndianSymtab = []byte{0xFE, 0xFF, 0xFF, 0xFF, 0x00, 0x00} -) - -func walksymtab(data []byte, fn func(sym) error) error { - if len(data) == 0 { // missing symtab is okay - return nil - } - var order binary.ByteOrder = binary.BigEndian - newTable := false - switch { - case bytes.HasPrefix(data, oldLittleEndianSymtab): - // Same as Go 1.0, but little endian. - // Format was used during interim development between Go 1.0 and Go 1.1. - // Should not be widespread, but easy to support. - data = data[6:] - order = binary.LittleEndian - case bytes.HasPrefix(data, bigEndianSymtab): - newTable = true - case bytes.HasPrefix(data, littleEndianSymtab): - newTable = true - order = binary.LittleEndian - } - var ptrsz int - if newTable { - if len(data) < 8 { - return &DecodingError{len(data), "unexpected EOF", nil} - } - ptrsz = int(data[7]) - if ptrsz != 4 && ptrsz != 8 { - return &DecodingError{7, "invalid pointer size", ptrsz} - } - data = data[8:] - } - var s sym - p := data - for len(p) >= 4 { - var typ byte - if newTable { - // Symbol type, value, Go type. - typ = p[0] & 0x3F - wideValue := p[0]&0x40 != 0 - goType := p[0]&0x80 != 0 - if typ < 26 { - typ += 'A' - } else { - typ += 'a' - 26 - } - s.typ = typ - p = p[1:] - if wideValue { - if len(p) < ptrsz { - return &DecodingError{len(data), "unexpected EOF", nil} - } - // fixed-width value - if ptrsz == 8 { - s.value = order.Uint64(p[0:8]) - p = p[8:] - } else { - s.value = uint64(order.Uint32(p[0:4])) - p = p[4:] - } - } else { - // varint value - s.value = 0 - shift := uint(0) - for len(p) > 0 && p[0]&0x80 != 0 { - s.value |= uint64(p[0]&0x7F) << shift - shift += 7 - p = p[1:] - } - if len(p) == 0 { - return &DecodingError{len(data), "unexpected EOF", nil} - } - s.value |= uint64(p[0]) << shift - p = p[1:] - } - if goType { - if len(p) < ptrsz { - return &DecodingError{len(data), "unexpected EOF", nil} - } - // fixed-width go type - if ptrsz == 8 { - s.gotype = order.Uint64(p[0:8]) - p = p[8:] - } else { - s.gotype = uint64(order.Uint32(p[0:4])) - p = p[4:] - } - } - } else { - // Value, symbol type. - s.value = uint64(order.Uint32(p[0:4])) - if len(p) < 5 { - return &DecodingError{len(data), "unexpected EOF", nil} - } - typ = p[4] - if typ&0x80 == 0 { - return &DecodingError{len(data) - len(p) + 4, "bad symbol type", typ} - } - typ &^= 0x80 - s.typ = typ - p = p[5:] - } - - // Name. - var i int - var nnul int - for i = 0; i < len(p); i++ { - if p[i] == 0 { - nnul = 1 - break - } - } - switch typ { - case 'z', 'Z': - p = p[i+nnul:] - for i = 0; i+2 <= len(p); i += 2 { - if p[i] == 0 && p[i+1] == 0 { - nnul = 2 - break - } - } - } - if len(p) < i+nnul { - return &DecodingError{len(data), "unexpected EOF", nil} - } - s.name = p[0:i] - i += nnul - p = p[i:] - - if !newTable { - if len(p) < 4 { - return &DecodingError{len(data), "unexpected EOF", nil} - } - // Go type. - s.gotype = uint64(order.Uint32(p[:4])) - p = p[4:] - } - fn(s) - } - return nil -} - -// NewTable decodes the Go symbol table in data, -// returning an in-memory representation. -func NewTable(symtab []byte, pcln *LineTable) (*Table, error) { - var n int - err := walksymtab(symtab, func(s sym) error { - n++ - return nil - }) - if err != nil { - return nil, err - } - - var t Table - if pcln.isGo12() { - t.go12line = pcln - } - fname := make(map[uint16]string) - t.Syms = make([]Sym, 0, n) - nf := 0 - nz := 0 - lasttyp := uint8(0) - err = walksymtab(symtab, func(s sym) error { - n := len(t.Syms) - t.Syms = t.Syms[0 : n+1] - ts := &t.Syms[n] - ts.Type = s.typ - ts.Value = uint64(s.value) - ts.GoType = uint64(s.gotype) - switch s.typ { - default: - // rewrite name to use . instead of · (c2 b7) - w := 0 - b := s.name - for i := 0; i < len(b); i++ { - if b[i] == 0xc2 && i+1 < len(b) && b[i+1] == 0xb7 { - i++ - b[i] = '.' - } - b[w] = b[i] - w++ - } - ts.Name = string(s.name[0:w]) - case 'z', 'Z': - if lasttyp != 'z' && lasttyp != 'Z' { - nz++ - } - for i := 0; i < len(s.name); i += 2 { - eltIdx := binary.BigEndian.Uint16(s.name[i : i+2]) - elt, ok := fname[eltIdx] - if !ok { - return &DecodingError{-1, "bad filename code", eltIdx} - } - if n := len(ts.Name); n > 0 && ts.Name[n-1] != '/' { - ts.Name += "/" - } - ts.Name += elt - } - } - switch s.typ { - case 'T', 't', 'L', 'l': - nf++ - case 'f': - fname[uint16(s.value)] = ts.Name - } - lasttyp = s.typ - return nil - }) - if err != nil { - return nil, err - } - - t.Funcs = make([]Func, 0, nf) - t.Files = make(map[string]*Obj) - - var obj *Obj - if t.go12line != nil { - // Put all functions into one Obj. - t.Objs = make([]Obj, 1) - obj = &t.Objs[0] - t.go12line.go12MapFiles(t.Files, obj) - } else { - t.Objs = make([]Obj, 0, nz) - } - - // Count text symbols and attach frame sizes, parameters, and - // locals to them. Also, find object file boundaries. - lastf := 0 - for i := 0; i < len(t.Syms); i++ { - sym := &t.Syms[i] - switch sym.Type { - case 'Z', 'z': // path symbol - if t.go12line != nil { - // Go 1.2 binaries have the file information elsewhere. Ignore. - break - } - // Finish the current object - if obj != nil { - obj.Funcs = t.Funcs[lastf:] - } - lastf = len(t.Funcs) - - // Start new object - n := len(t.Objs) - t.Objs = t.Objs[0 : n+1] - obj = &t.Objs[n] - - // Count & copy path symbols - var end int - for end = i + 1; end < len(t.Syms); end++ { - if c := t.Syms[end].Type; c != 'Z' && c != 'z' { - break - } - } - obj.Paths = t.Syms[i:end] - i = end - 1 // loop will i++ - - // Record file names - depth := 0 - for j := range obj.Paths { - s := &obj.Paths[j] - if s.Name == "" { - depth-- - } else { - if depth == 0 { - t.Files[s.Name] = obj - } - depth++ - } - } - - case 'T', 't', 'L', 'l': // text symbol - if n := len(t.Funcs); n > 0 { - t.Funcs[n-1].End = sym.Value - } - if sym.Name == "etext" { - continue - } - - // Count parameter and local (auto) syms - var np, na int - var end int - countloop: - for end = i + 1; end < len(t.Syms); end++ { - switch t.Syms[end].Type { - case 'T', 't', 'L', 'l', 'Z', 'z': - break countloop - case 'p': - np++ - case 'a': - na++ - } - } - - // Fill in the function symbol - n := len(t.Funcs) - t.Funcs = t.Funcs[0 : n+1] - fn := &t.Funcs[n] - sym.Func = fn - fn.Params = make([]*Sym, 0, np) - fn.Locals = make([]*Sym, 0, na) - fn.Sym = sym - fn.Entry = sym.Value - fn.Obj = obj - if t.go12line != nil { - // All functions share the same line table. - // It knows how to narrow down to a specific - // function quickly. - fn.LineTable = t.go12line - } else if pcln != nil { - fn.LineTable = pcln.slice(fn.Entry) - pcln = fn.LineTable - } - for j := i; j < end; j++ { - s := &t.Syms[j] - switch s.Type { - case 'm': - fn.FrameSize = int(s.Value) - case 'p': - n := len(fn.Params) - fn.Params = fn.Params[0 : n+1] - fn.Params[n] = s - case 'a': - n := len(fn.Locals) - fn.Locals = fn.Locals[0 : n+1] - fn.Locals[n] = s - } - } - i = end - 1 // loop will i++ - } - } - - if t.go12line != nil && nf == 0 { - t.Funcs = t.go12line.go12Funcs() - } - if obj != nil { - obj.Funcs = t.Funcs[lastf:] - } - return &t, nil -} - -// PCToFunc returns the function containing the program counter pc, -// or nil if there is no such function. -func (t *Table) PCToFunc(pc uint64) *Func { - funcs := t.Funcs - for len(funcs) > 0 { - m := len(funcs) / 2 - fn := &funcs[m] - switch { - case pc < fn.Entry: - funcs = funcs[0:m] - case fn.Entry <= pc && pc < fn.End: - return fn - default: - funcs = funcs[m+1:] - } - } - return nil -} - -// PCToLine looks up line number information for a program counter. -// If there is no information, it returns fn == nil. -func (t *Table) PCToLine(pc uint64) (file string, line int, fn *Func) { - if fn = t.PCToFunc(pc); fn == nil { - return - } - if t.go12line != nil { - file = t.go12line.go12PCToFile(pc) - line = t.go12line.go12PCToLine(pc) - } else { - file, line = fn.Obj.lineFromAline(fn.LineTable.PCToLine(pc)) - } - return -} - -// PCToSPAdj returns the stack pointer adjustment for a program counter. -func (t *Table) PCToSPAdj(pc uint64) (spadj int) { - if fn := t.PCToFunc(pc); fn == nil { - return 0 - } - if t.go12line != nil { - return t.go12line.go12PCToSPAdj(pc) - } - return 0 -} - -// LineToPC looks up the first program counter on the given line in -// the named file. It returns UnknownPathError or UnknownLineError if -// there is an error looking up this line. -func (t *Table) LineToPC(file string, line int) (pc uint64, fn *Func, err error) { - obj, ok := t.Files[file] - if !ok { - return 0, nil, UnknownFileError(file) - } - - if t.go12line != nil { - pc := t.go12line.go12LineToPC(file, line) - if pc == 0 { - return 0, nil, &UnknownLineError{file, line} - } - return pc, t.PCToFunc(pc), nil - } - - abs, err := obj.alineFromLine(file, line) - if err != nil { - return - } - for i := range obj.Funcs { - f := &obj.Funcs[i] - pc := f.LineTable.LineToPC(abs, f.End) - if pc != 0 { - return pc, f, nil - } - } - return 0, nil, &UnknownLineError{file, line} -} - -// LookupSym returns the text, data, or bss symbol with the given name, -// or nil if no such symbol is found. -func (t *Table) LookupSym(name string) *Sym { - // TODO(austin) Maybe make a map - for i := range t.Syms { - s := &t.Syms[i] - switch s.Type { - case 'T', 't', 'L', 'l', 'D', 'd', 'B', 'b': - if s.Name == name { - return s - } - } - } - return nil -} - -// LookupFunc returns the text, data, or bss symbol with the given name, -// or nil if no such symbol is found. -func (t *Table) LookupFunc(name string) *Func { - for i := range t.Funcs { - f := &t.Funcs[i] - if f.Sym.Name == name { - return f - } - } - return nil -} - -// SymByAddr returns the text, data, or bss symbol starting at the given address. -func (t *Table) SymByAddr(addr uint64) *Sym { - for i := range t.Syms { - s := &t.Syms[i] - switch s.Type { - case 'T', 't', 'L', 'l', 'D', 'd', 'B', 'b': - if s.Value == addr { - return s - } - } - } - return nil -} - -/* - * Object files - */ - -// This is legacy code for Go 1.1 and earlier, which used the -// Plan 9 format for pc-line tables. This code was never quite -// correct. It's probably very close, and it's usually correct, but -// we never quite found all the corner cases. -// -// Go 1.2 and later use a simpler format, documented at golang.org/s/go12symtab. - -func (o *Obj) lineFromAline(aline int) (string, int) { - type stackEnt struct { - path string - start int - offset int - prev *stackEnt - } - - noPath := &stackEnt{"", 0, 0, nil} - tos := noPath - -pathloop: - for _, s := range o.Paths { - val := int(s.Value) - switch { - case val > aline: - break pathloop - - case val == 1: - // Start a new stack - tos = &stackEnt{s.Name, val, 0, noPath} - - case s.Name == "": - // Pop - if tos == noPath { - return "", 0 - } - tos.prev.offset += val - tos.start - tos = tos.prev - - default: - // Push - tos = &stackEnt{s.Name, val, 0, tos} - } - } - - if tos == noPath { - return "", 0 - } - return tos.path, aline - tos.start - tos.offset + 1 -} - -func (o *Obj) alineFromLine(path string, line int) (int, error) { - if line < 1 { - return 0, &UnknownLineError{path, line} - } - - for i, s := range o.Paths { - // Find this path - if s.Name != path { - continue - } - - // Find this line at this stack level - depth := 0 - var incstart int - line += int(s.Value) - pathloop: - for _, s := range o.Paths[i:] { - val := int(s.Value) - switch { - case depth == 1 && val >= line: - return line - 1, nil - - case s.Name == "": - depth-- - if depth == 0 { - break pathloop - } else if depth == 1 { - line += val - incstart - } - - default: - if depth == 1 { - incstart = val - } - depth++ - } - } - return 0, &UnknownLineError{path, line} - } - return 0, UnknownFileError(path) -} - -/* - * Errors - */ - -// UnknownFileError represents a failure to find the specific file in -// the symbol table. -type UnknownFileError string - -func (e UnknownFileError) Error() string { return "unknown file: " + string(e) } - -// UnknownLineError represents a failure to map a line to a program -// counter, either because the line is beyond the bounds of the file -// or because there is no code on the given line. -type UnknownLineError struct { - File string - Line int -} - -func (e *UnknownLineError) Error() string { - return "no code at " + e.File + ":" + strconv.Itoa(e.Line) -} - -// DecodingError represents an error during the decoding of -// the symbol table. -type DecodingError struct { - off int - msg string - val interface{} -} - -func (e *DecodingError) Error() string { - msg := e.msg - if e.val != nil { - msg += fmt.Sprintf(" '%v'", e.val) - } - msg += fmt.Sprintf(" at byte %#x", e.off) - return msg -} diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go index 125b7033c9..6b13424fd9 100644 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go @@ -61,25 +61,14 @@ var ( instID = &cachedValue{k: "instance/id", trim: true} ) -var ( - defaultClient = &Client{hc: &http.Client{ - Transport: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - ResponseHeaderTimeout: 2 * time.Second, - }, - }} - subscribeClient = &Client{hc: &http.Client{ - Transport: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - }, - }} -) +var defaultClient = &Client{hc: &http.Client{ + Transport: &http.Transport{ + Dial: (&net.Dialer{ + Timeout: 2 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, + }, +}} // NotDefinedError is returned when requested metadata is not defined. // @@ -151,7 +140,7 @@ func testOnGCE() bool { }() go func() { - addrs, err := net.LookupHost("metadata.google.internal") + addrs, err := net.DefaultResolver.LookupHost(ctx, "metadata.google.internal") if err != nil || len(addrs) == 0 { resc <- false return @@ -206,10 +195,9 @@ func systemInfoSuggestsGCE() bool { return name == "Google" || name == "Google Compute Engine" } -// Subscribe calls Client.Subscribe on a client designed for subscribing (one with no -// ResponseHeaderTimeout). +// Subscribe calls Client.Subscribe on the default client. func Subscribe(suffix string, fn func(v string, ok bool) error) error { - return subscribeClient.Subscribe(suffix, fn) + return defaultClient.Subscribe(suffix, fn) } // Get calls Client.Get on the default client. @@ -227,6 +215,9 @@ func InternalIP() (string, error) { return defaultClient.InternalIP() } // ExternalIP returns the instance's primary external (public) IP address. func ExternalIP() (string, error) { return defaultClient.ExternalIP() } +// Email calls Client.Email on the default client. +func Email(serviceAccount string) (string, error) { return defaultClient.Email(serviceAccount) } + // Hostname returns the instance's hostname. This will be of the form // ".c..internal". func Hostname() (string, error) { return defaultClient.Hostname() } @@ -277,9 +268,14 @@ type Client struct { hc *http.Client } -// NewClient returns a Client that can be used to fetch metadata. All HTTP requests -// will use the given http.Client instead of the default client. +// NewClient returns a Client that can be used to fetch metadata. +// Returns the client that uses the specified http.Client for HTTP requests. +// If nil is specified, returns the default client. func NewClient(c *http.Client) *Client { + if c == nil { + return defaultClient + } + return &Client{hc: c} } @@ -301,7 +297,10 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { host = metadataIP } u := "http://" + host + "/computeMetadata/v1/" + suffix - req, _ := http.NewRequest("GET", u, nil) + req, err := http.NewRequest("GET", u, nil) + if err != nil { + return "", "", err + } req.Header.Set("Metadata-Flavor", "Google") req.Header.Set("User-Agent", userAgent) res, err := c.hc.Do(req) @@ -367,6 +366,16 @@ func (c *Client) InternalIP() (string, error) { return c.getTrimmed("instance/network-interfaces/0/ip") } +// Email returns the email address associated with the service account. +// The account may be empty or the string "default" to use the instance's +// main account. +func (c *Client) Email(serviceAccount string) (string, error) { + if serviceAccount == "" { + serviceAccount = "default" + } + return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email") +} + // ExternalIP returns the instance's primary external (public) IP address. func (c *Client) ExternalIP() (string, error) { return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip") @@ -394,11 +403,7 @@ func (c *Client) InstanceTags() ([]string, error) { // InstanceName returns the current VM's instance ID string. func (c *Client) InstanceName() (string, error) { - host, err := c.Hostname() - if err != nil { - return "", err - } - return strings.Split(host, ".")[0], nil + return c.getTrimmed("instance/name") } // Zone returns the current VM's zone, such as "us-central1-b". diff --git a/vendor/cloud.google.com/go/cloud.go b/vendor/cloud.google.com/go/doc.go similarity index 100% rename from vendor/cloud.google.com/go/cloud.go rename to vendor/cloud.google.com/go/doc.go diff --git a/vendor/cloud.google.com/go/go.mod b/vendor/cloud.google.com/go/go.mod deleted file mode 100644 index e3d7d7e623..0000000000 --- a/vendor/cloud.google.com/go/go.mod +++ /dev/null @@ -1,29 +0,0 @@ -module cloud.google.com/go - -go 1.9 - -require ( - cloud.google.com/go/datastore v1.0.0 - github.com/golang/mock v1.3.1 - github.com/golang/protobuf v1.3.2 - github.com/google/btree v1.0.0 - github.com/google/go-cmp v0.3.0 - github.com/google/martian v2.1.0+incompatible - github.com/google/pprof v0.0.0-20190515194954-54271f7e092f - github.com/googleapis/gax-go/v2 v2.0.5 - github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 - go.opencensus.io v0.22.0 - golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522 - golang.org/x/lint v0.0.0-20190409202823-959b441ac422 - golang.org/x/net v0.0.0-20190620200207-3b0461eec859 - golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 - golang.org/x/sync v0.0.0-20190423024810-112230192c58 - golang.org/x/text v0.3.2 - golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 - golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 - google.golang.org/api v0.8.0 - google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 - google.golang.org/grpc v1.21.1 - honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a - rsc.io/binaryregexp v0.2.0 -) diff --git a/vendor/cloud.google.com/go/internal/version/update_version.sh b/vendor/cloud.google.com/go/internal/version/update_version.sh new file mode 100644 index 0000000000..d7c5a3e219 --- /dev/null +++ b/vendor/cloud.google.com/go/internal/version/update_version.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# 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. + +today=$(date +%Y%m%d) + +sed -i -r -e 's/const Repo = "([0-9]{8})"/const Repo = "'$today'"/' $GOFILE + diff --git a/vendor/cloud.google.com/go/internal/version/version.go b/vendor/cloud.google.com/go/internal/version/version.go index d291921b18..7664a1e5ac 100644 --- a/vendor/cloud.google.com/go/internal/version/version.go +++ b/vendor/cloud.google.com/go/internal/version/version.go @@ -26,7 +26,7 @@ import ( // Repo is the current version of the client libraries in this // repo. It should be a date in YYYYMMDD format. -const Repo = "20190802" +const Repo = "20200618" // Go returns the Go runtime version. The returned string // has no whitespace. diff --git a/vendor/cloud.google.com/go/logging/CHANGES.md b/vendor/cloud.google.com/go/logging/CHANGES.md new file mode 100644 index 0000000000..fbf92a70d3 --- /dev/null +++ b/vendor/cloud.google.com/go/logging/CHANGES.md @@ -0,0 +1,6 @@ +# Changes + +## v1.0.0 + +This is the first tag to carve out logging as its own module. See: +https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. \ No newline at end of file diff --git a/vendor/github.com/moby/sys/LICENSE b/vendor/cloud.google.com/go/logging/LICENSE similarity index 100% rename from vendor/github.com/moby/sys/LICENSE rename to vendor/cloud.google.com/go/logging/LICENSE diff --git a/vendor/cloud.google.com/go/logging/go.mod b/vendor/cloud.google.com/go/logging/go.mod deleted file mode 100644 index 8739fdf496..0000000000 --- a/vendor/cloud.google.com/go/logging/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module cloud.google.com/go/logging - -go 1.9 - -require ( - cloud.google.com/go v0.43.0 - github.com/golang/protobuf v1.3.1 - github.com/google/go-cmp v0.3.0 - github.com/googleapis/gax-go/v2 v2.0.5 - go.opencensus.io v0.22.0 - golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 - google.golang.org/api v0.7.0 - google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532 - google.golang.org/grpc v1.21.1 -) diff --git a/vendor/cloud.google.com/go/tools.go b/vendor/cloud.google.com/go/tools.go index fa01cc44cc..da5ca585d4 100644 --- a/vendor/cloud.google.com/go/tools.go +++ b/vendor/cloud.google.com/go/tools.go @@ -26,8 +26,6 @@ package cloud import ( _ "github.com/golang/protobuf/protoc-gen-go" _ "github.com/jstemmer/go-junit-report" - _ "golang.org/x/exp/cmd/apidiff" _ "golang.org/x/lint/golint" _ "golang.org/x/tools/cmd/goimports" - _ "honnef.co/go/tools/cmd/staticcheck" ) diff --git a/vendor/github.com/Azure/go-ansiterm/go.mod b/vendor/github.com/Azure/go-ansiterm/go.mod deleted file mode 100644 index 965cb8120e..0000000000 --- a/vendor/github.com/Azure/go-ansiterm/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/Azure/go-ansiterm - -go 1.16 - -require golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 diff --git a/vendor/github.com/Graylog2/go-gelf/README.md b/vendor/github.com/Graylog2/go-gelf/README.md deleted file mode 100644 index 81d56121b3..0000000000 --- a/vendor/github.com/Graylog2/go-gelf/README.md +++ /dev/null @@ -1,117 +0,0 @@ -go-gelf - GELF Library and Writer for Go -======================================== - -[GELF] (Graylog Extended Log Format) is an application-level logging -protocol that avoids many of the shortcomings of [syslog]. While it -can be run over any stream or datagram transport protocol, it has -special support ([chunking]) to allow long messages to be split over -multiple datagrams. - -Versions --------- - -In order to enable versionning of this package with Go, this project -is using GoPkg.in. The default branch of this project will be v1 -for some time to prevent breaking clients. We encourage all project -to change their imports to the new GoPkg.in URIs as soon as possible. - -To see up to date code, make sure to switch to the master branch. - -v1.0.0 ------- - -This implementation currently supports UDP and TCP as a transport -protocol. TLS is unsupported. - -The library provides an API that applications can use to log messages -directly to a Graylog server and an `io.Writer` that can be used to -redirect the standard library's log messages (`os.Stdout`) to a -Graylog server. - -[GELF]: http://docs.graylog.org/en/2.2/pages/gelf.html -[syslog]: https://tools.ietf.org/html/rfc5424 -[chunking]: http://docs.graylog.org/en/2.2/pages/gelf.html#chunked-gelf - - -Installing ----------- - -go-gelf is go get-able: - - go get gopkg.in/Graylog2/go-gelf.v1/gelf - - or - - go get github.com/Graylog2/go-gelf/gelf - -This will get you version 1.0.0, with only UDP support and legacy API. -Newer versions are available through GoPkg.in: - - go get gopkg.in/Graylog2/go-gelf.v2/gelf - -Usage ------ - -The easiest way to integrate graylog logging into your go app is by -having your `main` function (or even `init`) call `log.SetOutput()`. -By using an `io.MultiWriter`, we can log to both stdout and graylog - -giving us both centralized and local logs. (Redundancy is nice). - -```golang -package main - -import ( - "flag" - "gopkg.in/Graylog2/go-gelf.v2/gelf" - "io" - "log" - "os" -) - -func main() { - var graylogAddr string - - flag.StringVar(&graylogAddr, "graylog", "", "graylog server addr") - flag.Parse() - - if graylogAddr != "" { - // If using UDP - gelfWriter, err := gelf.NewUDPWriter(graylogAddr) - // If using TCP - //gelfWriter, err := gelf.NewTCPWriter(graylogAddr) - if err != nil { - log.Fatalf("gelf.NewWriter: %s", err) - } - // log to both stderr and graylog2 - log.SetOutput(io.MultiWriter(os.Stderr, gelfWriter)) - log.Printf("logging to stderr & graylog2@'%s'", graylogAddr) - } - - // From here on out, any calls to log.Print* functions - // will appear on stdout, and be sent over UDP or TCP to the - // specified Graylog2 server. - - log.Printf("Hello gray World") - - // ... -} -``` -The above program can be invoked as: - - go run test.go -graylog=localhost:12201 - -When using UDP messages may be dropped or re-ordered. However, Graylog -server availability will not impact application performance; there is -a small, fixed overhead per log call regardless of whether the target -server is reachable or not. - - -To Do ------ - -- WriteMessage example - -License -------- - -go-gelf is offered under the MIT license, see LICENSE for details. diff --git a/vendor/github.com/Microsoft/go-winio/.gitignore b/vendor/github.com/Microsoft/go-winio/.gitignore new file mode 100644 index 0000000000..b883f1fdc6 --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/.gitignore @@ -0,0 +1 @@ +*.exe diff --git a/vendor/github.com/Microsoft/go-winio/CODEOWNERS b/vendor/github.com/Microsoft/go-winio/CODEOWNERS new file mode 100644 index 0000000000..ae1b4942b9 --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/CODEOWNERS @@ -0,0 +1 @@ + * @microsoft/containerplat diff --git a/vendor/github.com/Microsoft/go-winio/go.mod b/vendor/github.com/Microsoft/go-winio/go.mod deleted file mode 100644 index 98a8dea0e7..0000000000 --- a/vendor/github.com/Microsoft/go-winio/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -module github.com/Microsoft/go-winio - -go 1.12 - -require ( - github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.7.0 - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c -) diff --git a/vendor/github.com/Microsoft/go-winio/pkg/etwlogrus/HookTest.wprp b/vendor/github.com/Microsoft/go-winio/pkg/etwlogrus/HookTest.wprp new file mode 100644 index 0000000000..b67fb6af7c --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/pkg/etwlogrus/HookTest.wprp @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/.gitattributes b/vendor/github.com/Microsoft/hcsshim/.gitattributes new file mode 100644 index 0000000000..94f480de94 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/.gitignore b/vendor/github.com/Microsoft/hcsshim/.gitignore new file mode 100644 index 0000000000..aec9bd4bb0 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/.gitignore @@ -0,0 +1,3 @@ +*.exe +.idea +.vscode diff --git a/vendor/github.com/Microsoft/hcsshim/CODEOWNERS b/vendor/github.com/Microsoft/hcsshim/CODEOWNERS new file mode 100644 index 0000000000..f4c5a07d14 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/CODEOWNERS @@ -0,0 +1 @@ +* @microsoft/containerplat \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/Protobuild.toml b/vendor/github.com/Microsoft/hcsshim/Protobuild.toml new file mode 100644 index 0000000000..ee18671aa6 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/Protobuild.toml @@ -0,0 +1,49 @@ +version = "unstable" +generator = "gogoctrd" +plugins = ["grpc", "fieldpath"] + +# Control protoc include paths. Below are usually some good defaults, but feel +# free to try it without them if it works for your project. +[includes] + # Include paths that will be added before all others. Typically, you want to + # treat the root of the project as an include, but this may not be necessary. + before = ["./protobuf"] + + # Paths that should be treated as include roots in relation to the vendor + # directory. These will be calculated with the vendor directory nearest the + # target package. + packages = ["github.com/gogo/protobuf"] + + # Paths that will be added untouched to the end of the includes. We use + # `/usr/local/include` to pickup the common install location of protobuf. + # This is the default. + after = ["/usr/local/include"] + +# This section maps protobuf imports to Go packages. These will become +# `-M` directives in the call to the go protobuf generator. +[packages] + "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" + "google/protobuf/any.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/empty.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/struct.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/duration.proto" = "github.com/gogo/protobuf/types" + "github/containerd/cgroups/stats/v1/metrics.proto" = "github.com/containerd/cgroups/stats/v1" + +[[overrides]] +prefixes = ["github.com/Microsoft/hcsshim/internal/shimdiag"] +plugins = ["ttrpc"] + +[[overrides]] +prefixes = ["github.com/Microsoft/hcsshim/internal/computeagent"] +plugins = ["ttrpc"] + +[[overrides]] +prefixes = ["github.com/Microsoft/hcsshim/internal/ncproxyttrpc"] +plugins = ["ttrpc"] + +[[overrides]] +prefixes = ["github.com/Microsoft/hcsshim/internal/vmservice"] +plugins = ["ttrpc"] \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/next.pb.txt b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/next.pb.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vendor/github.com/Microsoft/hcsshim/functional_tests.ps1 b/vendor/github.com/Microsoft/hcsshim/functional_tests.ps1 new file mode 100644 index 0000000000..ce6edbcf32 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/functional_tests.ps1 @@ -0,0 +1,12 @@ +# Requirements so far: +# dockerd running +# - image microsoft/nanoserver (matching host base image) docker load -i c:\baseimages\nanoserver.tar +# - image alpine (linux) docker pull --platform=linux alpine + + +# TODO: Add this a parameter for debugging. ie "functional-tests -debug=$true" +#$env:HCSSHIM_FUNCTIONAL_TESTS_DEBUG="yes please" + +#pushd uvm +go test -v -tags "functional uvmcreate uvmscratch uvmscsi uvmvpmem uvmvsmb uvmp9" ./... +#popd \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/go.mod b/vendor/github.com/Microsoft/hcsshim/go.mod deleted file mode 100644 index ffc9c2f387..0000000000 --- a/vendor/github.com/Microsoft/hcsshim/go.mod +++ /dev/null @@ -1,31 +0,0 @@ -module github.com/Microsoft/hcsshim - -go 1.13 - -require ( - github.com/Microsoft/go-winio v0.4.17 - github.com/cenkalti/backoff/v4 v4.1.1 - github.com/containerd/cgroups v1.0.1 - github.com/containerd/console v1.0.2 - github.com/containerd/containerd v1.4.9 - github.com/containerd/continuity v0.1.0 // indirect - github.com/containerd/fifo v1.0.0 // indirect - github.com/containerd/go-runc v1.0.0 - github.com/containerd/ttrpc v1.1.0 - github.com/containerd/typeurl v1.0.2 - github.com/gogo/protobuf v1.3.2 - github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d - github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.8.1 - github.com/urfave/cli v1.22.2 - go.opencensus.io v0.22.3 - golang.org/x/sync v0.0.0-20201207232520-09787c993a3a - golang.org/x/sys v0.0.0-20210324051608-47abb6519492 - google.golang.org/grpc v1.33.2 - gotest.tools/v3 v3.0.3 // indirect -) - -replace ( - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 - google.golang.org/grpc => google.golang.org/grpc v1.27.1 -) diff --git a/vendor/github.com/RackSec/srslog/.gitignore b/vendor/github.com/RackSec/srslog/.gitignore new file mode 100644 index 0000000000..ebf0f2e4e3 --- /dev/null +++ b/vendor/github.com/RackSec/srslog/.gitignore @@ -0,0 +1 @@ +.cover diff --git a/vendor/github.com/RackSec/srslog/.travis.yml b/vendor/github.com/RackSec/srslog/.travis.yml new file mode 100644 index 0000000000..4e5c4f0753 --- /dev/null +++ b/vendor/github.com/RackSec/srslog/.travis.yml @@ -0,0 +1,18 @@ +sudo: required +dist: trusty +group: edge +language: go +go: +- 1.5 +before_install: + - pip install --user codecov +script: +- | + go get ./... + go test -v -coverprofile=coverage.txt -covermode=atomic + go vet +after_success: + - codecov +notifications: + slack: + secure: dtDue9gP6CRR1jYjEf6raXXFak3QKGcCFvCf5mfvv5XScdpmc3udwgqc5TdyjC0goaC9OK/4jTcCD30dYZm/u6ux3E9mo3xwMl2xRLHx76p5r9rSQtloH19BDwA2+A+bpDfFQVz05k2YXuTiGSvNMMdwzx+Dr294Sl/z43RFB4+b9/R/6LlFpRW89IwftvpLAFnBy4K/ZcspQzKM+rQfQTL5Kk+iZ/KBsuR/VziDq6MoJ8t43i4ee8vwS06vFBKDbUiZ4FIZpLgc2RAL5qso5aWRKYXL6waXfoKHZWKPe0w4+9IY1rDJxG1jEb7YGgcbLaF9xzPRRs2b2yO/c87FKpkh6PDgYHfLjpgXotCoojZrL4p1x6MI1ldJr3NhARGPxS9r4liB9n6Y5nD+ErXi1IMf55fuUHcPY27Jc0ySeLFeM6cIWJ8OhFejCgGw6a5DnnmJo0PqopsaBDHhadpLejT1+K6bL2iGkT4SLcVNuRGLs+VyuNf1+5XpkWZvy32vquO7SZOngLLBv+GIem+t3fWm0Z9s/0i1uRCQei1iUutlYjoV/LBd35H2rhob4B5phIuJin9kb0zbHf6HnaoN0CtN8r0d8G5CZiInVlG5Xcid5Byb4dddf5U2EJTDuCMVyyiM7tcnfjqw9UbVYNxtYM9SzcqIq+uVqM8pYL9xSec= diff --git a/vendor/github.com/RackSec/srslog/CODE_OF_CONDUCT.md b/vendor/github.com/RackSec/srslog/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..18ac49fc75 --- /dev/null +++ b/vendor/github.com/RackSec/srslog/CODE_OF_CONDUCT.md @@ -0,0 +1,50 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of +fostering an open and welcoming community, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating +documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +By adopting this Code of Conduct, project maintainers commit themselves to +fairly and consistently applying these principles to every aspect of managing +this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting a project maintainer at [sirsean@gmail.com]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. Maintainers are +obligated to maintain confidentiality with regard to the reporter of an +incident. + + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.3.0, available at +[http://contributor-covenant.org/version/1/3/0/][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/3/0/ diff --git a/vendor/github.com/armon/go-metrics/.gitignore b/vendor/github.com/armon/go-metrics/.gitignore new file mode 100644 index 0000000000..00268614f0 --- /dev/null +++ b/vendor/github.com/armon/go-metrics/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/armon/go-metrics/metrics.go b/vendor/github.com/armon/go-metrics/metrics.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/armon/go-metrics/sink.go b/vendor/github.com/armon/go-metrics/sink.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/armon/go-metrics/start.go b/vendor/github.com/armon/go-metrics/start.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/armon/go-metrics/statsite.go b/vendor/github.com/armon/go-metrics/statsite.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/armon/go-radix/.gitignore b/vendor/github.com/armon/go-radix/.gitignore new file mode 100644 index 0000000000..00268614f0 --- /dev/null +++ b/vendor/github.com/armon/go-radix/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/armon/go-radix/.travis.yml b/vendor/github.com/armon/go-radix/.travis.yml new file mode 100644 index 0000000000..1a0bbea6c7 --- /dev/null +++ b/vendor/github.com/armon/go-radix/.travis.yml @@ -0,0 +1,3 @@ +language: go +go: + - tip diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md deleted file mode 100644 index 27e1aee45a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/README.md +++ /dev/null @@ -1,502 +0,0 @@ -[![API Reference](https://img.shields.io/badge/api-reference-blue.svg)](https://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt) - -# AWS SDK for Go - -aws-sdk-go is the official AWS SDK for the Go programming language. - -Checkout our [release notes](https://github.com/aws/aws-sdk-go/releases) for -information about the latest bug fixes, updates, and features added to the SDK. - -We [announced](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-2-0-developer-preview/) the Developer Preview for the [v2 AWS SDK for Go](https://github.com/aws/aws-sdk-go-v2). The v2 SDK source is available at https://github.com/aws/aws-sdk-go-v2, and add it to your project with `go get github.com/aws/aws-sdk-go-v2`. Check out the v2 SDK's [changes and updates](https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md), and let us know what you think. We want your feedback. - -We have a pilot redesign of the [AWS SDK for Go API reference documentation](https://docs.aws.amazon.com/sdk-for-go/v1/api/gosdk-apiref.html). Let us know what you think. - -## Installing - -Use `go get` to retrieve the SDK to add it to your `GOPATH` workspace, or -project's Go module dependencies. - - go get github.com/aws/aws-sdk-go - -To update the SDK use `go get -u` to retrieve the latest version of the SDK. - - go get -u github.com/aws/aws-sdk-go - -### Dependencies - -The SDK includes a `vendor` folder containing the runtime dependencies of the -SDK. The metadata of the SDK's dependencies can be found in the Go module file -`go.mod` or Dep file `Gopkg.toml`. - -### Go Modules - -If you are using Go modules, your `go get` will default to the latest tagged -release version of the SDK. To get a specific release version of the SDK use -`@` in your `go get` command. - - go get github.com/aws/aws-sdk-go@v1.15.77 - -To get the latest SDK repository change use `@latest`. - - go get github.com/aws/aws-sdk-go@latest - -### Go 1.5 - -If you are using Go 1.5 without vendoring enabled, (`GO15VENDOREXPERIMENT=1`), -you will need to use `...` when retrieving the SDK to get its dependencies. - - go get github.com/aws/aws-sdk-go/... - -This will still include the `vendor` folder. The `vendor` folder can be deleted -if not used by your environment. - - rm -rf $GOPATH/src/github.com/aws/aws-sdk-go/vendor - -## Getting Help - -Please use these community resources for getting help. We use the GitHub issues -for tracking bugs and feature requests. - -* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag. -* Come join the AWS SDK for Go community chat on [gitter](https://gitter.im/aws/aws-sdk-go). -* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html). -* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new). - -## Opening Issues - -If you encounter a bug with the AWS SDK for Go we would like to hear about it. -Search the [existing issues](https://github.com/aws/aws-sdk-go/issues) and see -if others are also experiencing the issue before opening a new issue. Please -include the version of AWS SDK for Go, Go language, and OS you’re using. Please -also include reproduction case when appropriate. - -The GitHub issues are intended for bug reports and feature requests. For help -and questions with using AWS SDK for GO please make use of the resources listed -in the [Getting Help](https://github.com/aws/aws-sdk-go#getting-help) section. -Keeping the list of open issues lean will help us respond in a timely manner. - -## Reference Documentation - -[`Getting Started Guide`](https://aws.amazon.com/sdk-for-go/) - This document -is a general introduction on how to configure and make requests with the SDK. -If this is your first time using the SDK, this documentation and the API -documentation will help you get started. This document focuses on the syntax -and behavior of the SDK. The [Service Developer -Guide](https://aws.amazon.com/documentation/) will help you get started using -specific AWS services. - -[`SDK API Reference -Documentation`](https://docs.aws.amazon.com/sdk-for-go/api/) - Use this -document to look up all API operation input and output parameters for AWS -services supported by the SDK. The API reference also includes documentation of -the SDK, and examples how to using the SDK, service client API operations, and -API operation require parameters. - -[`Service Developer Guide`](https://aws.amazon.com/documentation/) - Use this -documentation to learn how to interface with AWS services. These guides are -great for getting started with a service, or when looking for more -information about a service. While this document is not required for coding, -services may supply helpful samples to look out for. - -[`SDK Examples`](https://github.com/aws/aws-sdk-go/tree/master/example) - -Included in the SDK's repo are several hand crafted examples using the SDK -features and AWS services. - -## Overview of SDK's Packages - -The SDK is composed of two main components, SDK core, and service clients. -The SDK core packages are all available under the aws package at the root of -the SDK. Each client for a supported AWS service is available within its own -package under the service folder at the root of the SDK. - - * aws - SDK core, provides common shared types such as Config, Logger, - and utilities to make working with API parameters easier. - - * awserr - Provides the error interface that the SDK will use for all - errors that occur in the SDK's processing. This includes service API - response errors as well. The Error type is made up of a code and message. - Cast the SDK's returned error type to awserr.Error and call the Code - method to compare returned error to specific error codes. See the package's - documentation for additional values that can be extracted such as RequestID. - - * credentials - Provides the types and built in credentials providers - the SDK will use to retrieve AWS credentials to make API requests with. - Nested under this folder are also additional credentials providers such as - stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles. - - * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK. - Use this to lookup AWS service endpoint information such as which services - are in a region, and what regions a service is in. Constants are also provided - for all region identifiers, e.g UsWest2RegionID for "us-west-2". - - * session - Provides initial default configuration, and load - configuration from external sources such as environment and shared - credentials file. - - * request - Provides the API request sending, and retry logic for the SDK. - This package also includes utilities for defining your own request - retryer, and configuring how the SDK processes the request. - - * service - Clients for AWS services. All services supported by the SDK are - available under this folder. - -## How to Use the SDK's AWS Service Clients - -The SDK includes the Go types and utilities you can use to make requests to -AWS service APIs. Within the service folder at the root of the SDK you'll find -a package for each AWS service the SDK supports. All service clients follow common pattern of creation and usage. - -When creating a client for an AWS service you'll first need to have a Session -value constructed. The Session provides shared configuration that can be shared -between your service clients. When service clients are created you can pass -in additional configuration via the aws.Config type to override configuration -provided by in the Session to create service client instances with custom -configuration. - -Once the service's client is created you can use it to make API requests the -AWS service. These clients are safe to use concurrently. - -## Configuring the SDK - -In the AWS SDK for Go, you can configure settings for service clients, such -as the log level and maximum number of retries. Most settings are optional; -however, for each service client, you must specify a region and your credentials. -The SDK uses these values to send requests to the correct AWS region and sign -requests with the correct credentials. You can specify these values as part -of a session or as environment variables. - -See the SDK's [configuration guide][config_guide] for more information. - -See the [session][session_pkg] package documentation for more information on how to use Session -with the SDK. - -See the [Config][config_typ] type in the [aws][aws_pkg] package for more information on configuration -options. - -[config_guide]: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html -[session_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/session/ -[config_typ]: https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -[aws_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/ - -### Configuring Credentials - -When using the SDK you'll generally need your AWS credentials to authenticate -with AWS services. The SDK supports multiple methods of supporting these -credentials. By default the SDK will source credentials automatically from -its default credential chain. See the session package for more information -on this chain, and how to configure it. The common items in the credential -chain are the following: - - * Environment Credentials - Set of environment variables that are useful - when sub processes are created for specific roles. - - * Shared Credentials file (~/.aws/credentials) - This file stores your - credentials based on a profile name and is useful for local development. - - * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials - to application running on an EC2 instance. This removes the need to manage - credential files in production. - -Credentials can be configured in code as well by setting the Config's Credentials -value to a custom provider or using one of the providers included with the -SDK to bypass the default credential chain and use a custom one. This is -helpful when you want to instruct the SDK to only use a specific set of -credentials or providers. - -This example creates a credential provider for assuming an IAM role, "myRoleARN" -and configures the S3 service client to use that role for API requests. - -```go - // Initial credentials loaded from SDK's default credential chain. Such as - // the environment, shared credentials (~/.aws/credentials), or EC2 Instance - // Role. These credentials will be used to to make the STS Assume Role API. - sess := session.Must(session.NewSession()) - - // Create the credentials from AssumeRoleProvider to assume the role - // referenced by the "myRoleARN" ARN. - creds := stscreds.NewCredentials(sess, "myRoleArn") - - // Create service client value configured for credentials - // from assumed role. - svc := s3.New(sess, &aws.Config{Credentials: creds}) -``` - -See the [credentials][credentials_pkg] package documentation for more information on credential -providers included with the SDK, and how to customize the SDK's usage of -credentials. - -The SDK has support for the shared configuration file (~/.aws/config). This -support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1", -or enabling the feature in code when creating a Session via the -Option's SharedConfigState parameter. - -```go - sess := session.Must(session.NewSessionWithOptions(session.Options{ - SharedConfigState: session.SharedConfigEnable, - })) -``` - -[credentials_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials - -### Configuring AWS Region - -In addition to the credentials you'll need to specify the region the SDK -will use to make AWS API requests to. In the SDK you can specify the region -either with an environment variable, or directly in code when a Session or -service client is created. The last value specified in code wins if the region -is specified multiple ways. - -To set the region via the environment variable set the "AWS_REGION" to the -region you want to the SDK to use. Using this method to set the region will -allow you to run your application in multiple regions without needing additional -code in the application to select the region. - - AWS_REGION=us-west-2 - -The endpoints package includes constants for all regions the SDK knows. The -values are all suffixed with RegionID. These values are helpful, because they -reduce the need to type the region string manually. - -To set the region on a Session use the aws package's Config struct parameter -Region to the AWS region you want the service clients created from the session to -use. This is helpful when you want to create multiple service clients, and -all of the clients make API requests to the same region. - -```go - sess := session.Must(session.NewSession(&aws.Config{ - Region: aws.String(endpoints.UsWest2RegionID), - })) -``` - -See the [endpoints][endpoints_pkg] package for the AWS Regions and Endpoints metadata. - -In addition to setting the region when creating a Session you can also set -the region on a per service client bases. This overrides the region of a -Session. This is helpful when you want to create service clients in specific -regions different from the Session's region. - -```go - svc := s3.New(sess, &aws.Config{ - Region: aws.String(endpoints.UsWest2RegionID), - }) -``` - -See the [Config][config_typ] type in the [aws][aws_pkg] package for more information and additional -options such as setting the Endpoint, and other service client configuration options. - -[endpoints_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/ - -## Making API Requests - -Once the client is created you can make an API request to the service. -Each API method takes a input parameter, and returns the service response -and an error. The SDK provides methods for making the API call in multiple ways. - -In this list we'll use the S3 ListObjects API as an example for the different -ways of making API requests. - - * ListObjects - Base API operation that will make the API request to the service. - - * ListObjectsRequest - API methods suffixed with Request will construct the - API request, but not send it. This is also helpful when you want to get a - presigned URL for a request, and share the presigned URL instead of your - application making the request directly. - - * ListObjectsPages - Same as the base API operation, but uses a callback to - automatically handle pagination of the API's response. - - * ListObjectsWithContext - Same as base API operation, but adds support for - the Context pattern. This is helpful for controlling the canceling of in - flight requests. See the Go standard library context package for more - information. This method also takes request package's Option functional - options as the variadic argument for modifying how the request will be - made, or extracting information from the raw HTTP response. - - * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for - the Context pattern. Similar to ListObjectsWithContext this method also - takes the request package's Option function option types as the variadic - argument. - -In addition to the API operations the SDK also includes several higher level -methods that abstract checking for and waiting for an AWS resource to be in -a desired state. In this list we'll use WaitUntilBucketExists to demonstrate -the different forms of waiters. - - * WaitUntilBucketExists. - Method to make API request to query an AWS service for - a resource's state. Will return successfully when that state is accomplished. - - * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds - support for the Context pattern. In addition these methods take request - package's WaiterOptions to configure the waiter, and how underlying request - will be made by the SDK. - -The API method will document which error codes the service might return for -the operation. These errors will also be available as const strings prefixed -with "ErrCode" in the service client's package. If there are no errors listed -in the API's SDK documentation you'll need to consult the AWS service's API -documentation for the errors that could be returned. - -```go - ctx := context.Background() - - result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{ - Bucket: aws.String("my-bucket"), - Key: aws.String("my-key"), - }) - if err != nil { - // Cast err to awserr.Error to handle specific error codes. - aerr, ok := err.(awserr.Error) - if ok && aerr.Code() == s3.ErrCodeNoSuchKey { - // Specific error code handling - } - return err - } - - // Make sure to close the body when done with it for S3 GetObject APIs or - // will leak connections. - defer result.Body.Close() - - fmt.Println("Object Size:", aws.Int64Value(result.ContentLength)) -``` - -### API Request Pagination and Resource Waiters - -Pagination helper methods are suffixed with "Pages", and provide the -functionality needed to round trip API page requests. Pagination methods -take a callback function that will be called for each page of the API's response. - -```go - objects := []string{} - err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{ - Bucket: aws.String(myBucket), - }, func(p *s3.ListObjectsOutput, lastPage bool) bool { - for _, o := range p.Contents { - objects = append(objects, aws.StringValue(o.Key)) - } - return true // continue paging - }) - if err != nil { - panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err)) - } - - fmt.Println("Objects in bucket:", objects) -``` - -Waiter helper methods provide the functionality to wait for an AWS resource -state. These methods abstract the logic needed to check the state of an -AWS resource, and wait until that resource is in a desired state. The waiter -will block until the resource is in the state that is desired, an error occurs, -or the waiter times out. If a resource times out the error code returned will -be request.WaiterResourceNotReadyErrorCode. - -```go - err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{ - Bucket: aws.String(myBucket), - }) - if err != nil { - aerr, ok := err.(awserr.Error) - if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode { - fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist") - } - panic(fmt.Errorf("failed to wait for bucket to exist, %v", err)) - } - fmt.Println("Bucket", myBucket, "exists") -``` - -## Complete SDK Example - -This example shows a complete working Go file which will upload a file to S3 -and use the Context pattern to implement timeout logic that will cancel the -request if it takes too long. This example highlights how to use sessions, -create a service client, make a request, handle the error, and process the -response. - -```go - package main - - import ( - "context" - "flag" - "fmt" - "os" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" - ) - - // Uploads a file to S3 given a bucket and object key. Also takes a duration - // value to terminate the update if it doesn't complete within that time. - // - // The AWS Region needs to be provided in the AWS shared config or on the - // environment variable as `AWS_REGION`. Credentials also must be provided - // Will default to shared config file, but can load from environment if provided. - // - // Usage: - // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail - // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt - func main() { - var bucket, key string - var timeout time.Duration - - flag.StringVar(&bucket, "b", "", "Bucket name.") - flag.StringVar(&key, "k", "", "Object key name.") - flag.DurationVar(&timeout, "d", 0, "Upload timeout.") - flag.Parse() - - // All clients require a Session. The Session provides the client with - // shared configuration such as region, endpoint, and credentials. A - // Session should be shared where possible to take advantage of - // configuration and credential caching. See the session package for - // more information. - sess := session.Must(session.NewSession()) - - // Create a new instance of the service's client with a Session. - // Optional aws.Config values can also be provided as variadic arguments - // to the New function. This option allows you to provide service - // specific configuration. - svc := s3.New(sess) - - // Create a context with a timeout that will abort the upload if it takes - // more than the passed in timeout. - ctx := context.Background() - var cancelFn func() - if timeout > 0 { - ctx, cancelFn = context.WithTimeout(ctx, timeout) - } - // Ensure the context is canceled to prevent leaking. - // See context package for more information, https://golang.org/pkg/context/ - if cancelFn != nil { - defer cancelFn() - } - - // Uploads the object to S3. The Context will interrupt the request if the - // timeout expires. - _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - Body: os.Stdin, - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { - // If the SDK can determine the request or retry delay was canceled - // by a context the CanceledErrorCode error code will be returned. - fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) - } else { - fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) - } - os.Exit(1) - } - - fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) - } -``` - -## License - -This SDK is distributed under the -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), -see LICENSE.txt and NOTICE.txt for more information. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini b/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini new file mode 100644 index 0000000000..7fc91d9d20 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini @@ -0,0 +1,12 @@ +[default] +aws_access_key_id = accessKey +aws_secret_access_key = secret +aws_session_token = token + +[no_token] +aws_access_key_id = accessKey +aws_secret_access_key = secret + +[with_colon] +aws_access_key_id: accessKey +aws_secret_access_key: secret diff --git a/vendor/github.com/aws/aws-sdk-go/go.mod b/vendor/github.com/aws/aws-sdk-go/go.mod deleted file mode 100644 index 329c3ea439..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/aws/aws-sdk-go - -require github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af diff --git a/vendor/github.com/aws/aws-sdk-go/private/README.md b/vendor/github.com/aws/aws-sdk-go/private/README.md deleted file mode 100644 index 5bdb4c50ac..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## AWS SDK for Go Private packages ## -`private` is a collection of packages used internally by the SDK, and is subject to have breaking changes. This package is not `internal` so that if you really need to use its functionality, and understand breaking changes will be made, you are able to. - -These packages will be refactored in the future so that the API generator and model parsers are exposed cleanly on their own. Making it easier for you to generate your own code based on the API models. diff --git a/vendor/github.com/beorn7/perks/README.md b/vendor/github.com/beorn7/perks/README.md deleted file mode 100644 index fc05777701..0000000000 --- a/vendor/github.com/beorn7/perks/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Perks for Go (golang.org) - -Perks contains the Go package quantile that computes approximate quantiles over -an unbounded data stream within low memory and CPU bounds. - -For more information and examples, see: -http://godoc.org/github.com/bmizerany/perks - -A very special thank you and shout out to Graham Cormode (Rutgers University), -Flip Korn (AT&T Labs–Research), S. Muthukrishnan (Rutgers University), and -Divesh Srivastava (AT&T Labs–Research) for their research and publication of -[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf) - -Thank you, also: -* Armon Dadgar (@armon) -* Andrew Gerrand (@nf) -* Brad Fitzpatrick (@bradfitz) -* Keith Rarick (@kr) - -FAQ: - -Q: Why not move the quantile package into the project root? -A: I want to add more packages to perks later. - -Copyright (C) 2013 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/beorn7/perks/go.mod b/vendor/github.com/beorn7/perks/go.mod deleted file mode 100644 index c4022f2127..0000000000 --- a/vendor/github.com/beorn7/perks/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/beorn7/perks - -go 1.11 diff --git a/vendor/github.com/beorn7/perks/quantile/exampledata.txt b/vendor/github.com/beorn7/perks/quantile/exampledata.txt new file mode 100644 index 0000000000..1602287d7c --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/exampledata.txt @@ -0,0 +1,2388 @@ +8 +5 +26 +12 +5 +235 +13 +6 +28 +30 +3 +3 +3 +3 +5 +2 +33 +7 +2 +4 +7 +12 +14 +5 +8 +3 +10 +4 +5 +3 +6 +6 +209 +20 +3 +10 +14 +3 +4 +6 +8 +5 +11 +7 +3 +2 +3 +3 +212 +5 +222 +4 +10 +10 +5 +6 +3 +8 +3 +10 +254 +220 +2 +3 +5 +24 +5 +4 +222 +7 +3 +3 +223 +8 +15 +12 +14 +14 +3 +2 +2 +3 +13 +3 +11 +4 +4 +6 +5 +7 +13 +5 +3 +5 +2 +5 +3 +5 +2 +7 +15 +17 +14 +3 +6 +6 +3 +17 +5 +4 +7 +6 +4 +4 +8 +6 +8 +3 +9 +3 +6 +3 +4 +5 +3 +3 +660 +4 +6 +10 +3 +6 +3 +2 +5 +13 +2 +4 +4 +10 +4 +8 +4 +3 +7 +9 +9 +3 +10 +37 +3 +13 +4 +12 +3 +6 +10 +8 +5 +21 +2 +3 +8 +3 +2 +3 +3 +4 +12 +2 +4 +8 +8 +4 +3 +2 +20 +1 +6 +32 +2 +11 +6 +18 +3 +8 +11 +3 +212 +3 +4 +2 +6 +7 +12 +11 +3 +2 +16 +10 +6 +4 +6 +3 +2 +7 +3 +2 +2 +2 +2 +5 +6 +4 +3 +10 +3 +4 +6 +5 +3 +4 +4 +5 +6 +4 +3 +4 +4 +5 +7 +5 +5 +3 +2 +7 +2 +4 +12 +4 +5 +6 +2 +4 +4 +8 +4 +15 +13 +7 +16 +5 +3 +23 +5 +5 +7 +3 +2 +9 +8 +7 +5 +8 +11 +4 +10 +76 +4 +47 +4 +3 +2 +7 +4 +2 +3 +37 +10 +4 +2 +20 +5 +4 +4 +10 +10 +4 +3 +7 +23 +240 +7 +13 +5 +5 +3 +3 +2 +5 +4 +2 +8 +7 +19 +2 +23 +8 +7 +2 +5 +3 +8 +3 +8 +13 +5 +5 +5 +2 +3 +23 +4 +9 +8 +4 +3 +3 +5 +220 +2 +3 +4 +6 +14 +3 +53 +6 +2 +5 +18 +6 +3 +219 +6 +5 +2 +5 +3 +6 +5 +15 +4 +3 +17 +3 +2 +4 +7 +2 +3 +3 +4 +4 +3 +2 +664 +6 +3 +23 +5 +5 +16 +5 +8 +2 +4 +2 +24 +12 +3 +2 +3 +5 +8 +3 +5 +4 +3 +14 +3 +5 +8 +2 +3 +7 +9 +4 +2 +3 +6 +8 +4 +3 +4 +6 +5 +3 +3 +6 +3 +19 +4 +4 +6 +3 +6 +3 +5 +22 +5 +4 +4 +3 +8 +11 +4 +9 +7 +6 +13 +4 +4 +4 +6 +17 +9 +3 +3 +3 +4 +3 +221 +5 +11 +3 +4 +2 +12 +6 +3 +5 +7 +5 +7 +4 +9 +7 +14 +37 +19 +217 +16 +3 +5 +2 +2 +7 +19 +7 +6 +7 +4 +24 +5 +11 +4 +7 +7 +9 +13 +3 +4 +3 +6 +28 +4 +4 +5 +5 +2 +5 +6 +4 +4 +6 +10 +5 +4 +3 +2 +3 +3 +6 +5 +5 +4 +3 +2 +3 +7 +4 +6 +18 +16 +8 +16 +4 +5 +8 +6 +9 +13 +1545 +6 +215 +6 +5 +6 +3 +45 +31 +5 +2 +2 +4 +3 +3 +2 +5 +4 +3 +5 +7 +7 +4 +5 +8 +5 +4 +749 +2 +31 +9 +11 +2 +11 +5 +4 +4 +7 +9 +11 +4 +5 +4 +7 +3 +4 +6 +2 +15 +3 +4 +3 +4 +3 +5 +2 +13 +5 +5 +3 +3 +23 +4 +4 +5 +7 +4 +13 +2 +4 +3 +4 +2 +6 +2 +7 +3 +5 +5 +3 +29 +5 +4 +4 +3 +10 +2 +3 +79 +16 +6 +6 +7 +7 +3 +5 +5 +7 +4 +3 +7 +9 +5 +6 +5 +9 +6 +3 +6 +4 +17 +2 +10 +9 +3 +6 +2 +3 +21 +22 +5 +11 +4 +2 +17 +2 +224 +2 +14 +3 +4 +4 +2 +4 +4 +4 +4 +5 +3 +4 +4 +10 +2 +6 +3 +3 +5 +7 +2 +7 +5 +6 +3 +218 +2 +2 +5 +2 +6 +3 +5 +222 +14 +6 +33 +3 +2 +5 +3 +3 +3 +9 +5 +3 +3 +2 +7 +4 +3 +4 +3 +5 +6 +5 +26 +4 +13 +9 +7 +3 +221 +3 +3 +4 +4 +4 +4 +2 +18 +5 +3 +7 +9 +6 +8 +3 +10 +3 +11 +9 +5 +4 +17 +5 +5 +6 +6 +3 +2 +4 +12 +17 +6 +7 +218 +4 +2 +4 +10 +3 +5 +15 +3 +9 +4 +3 +3 +6 +29 +3 +3 +4 +5 +5 +3 +8 +5 +6 +6 +7 +5 +3 +5 +3 +29 +2 +31 +5 +15 +24 +16 +5 +207 +4 +3 +3 +2 +15 +4 +4 +13 +5 +5 +4 +6 +10 +2 +7 +8 +4 +6 +20 +5 +3 +4 +3 +12 +12 +5 +17 +7 +3 +3 +3 +6 +10 +3 +5 +25 +80 +4 +9 +3 +2 +11 +3 +3 +2 +3 +8 +7 +5 +5 +19 +5 +3 +3 +12 +11 +2 +6 +5 +5 +5 +3 +3 +3 +4 +209 +14 +3 +2 +5 +19 +4 +4 +3 +4 +14 +5 +6 +4 +13 +9 +7 +4 +7 +10 +2 +9 +5 +7 +2 +8 +4 +6 +5 +5 +222 +8 +7 +12 +5 +216 +3 +4 +4 +6 +3 +14 +8 +7 +13 +4 +3 +3 +3 +3 +17 +5 +4 +3 +33 +6 +6 +33 +7 +5 +3 +8 +7 +5 +2 +9 +4 +2 +233 +24 +7 +4 +8 +10 +3 +4 +15 +2 +16 +3 +3 +13 +12 +7 +5 +4 +207 +4 +2 +4 +27 +15 +2 +5 +2 +25 +6 +5 +5 +6 +13 +6 +18 +6 +4 +12 +225 +10 +7 +5 +2 +2 +11 +4 +14 +21 +8 +10 +3 +5 +4 +232 +2 +5 +5 +3 +7 +17 +11 +6 +6 +23 +4 +6 +3 +5 +4 +2 +17 +3 +6 +5 +8 +3 +2 +2 +14 +9 +4 +4 +2 +5 +5 +3 +7 +6 +12 +6 +10 +3 +6 +2 +2 +19 +5 +4 +4 +9 +2 +4 +13 +3 +5 +6 +3 +6 +5 +4 +9 +6 +3 +5 +7 +3 +6 +6 +4 +3 +10 +6 +3 +221 +3 +5 +3 +6 +4 +8 +5 +3 +6 +4 +4 +2 +54 +5 +6 +11 +3 +3 +4 +4 +4 +3 +7 +3 +11 +11 +7 +10 +6 +13 +223 +213 +15 +231 +7 +3 +7 +228 +2 +3 +4 +4 +5 +6 +7 +4 +13 +3 +4 +5 +3 +6 +4 +6 +7 +2 +4 +3 +4 +3 +3 +6 +3 +7 +3 +5 +18 +5 +6 +8 +10 +3 +3 +3 +2 +4 +2 +4 +4 +5 +6 +6 +4 +10 +13 +3 +12 +5 +12 +16 +8 +4 +19 +11 +2 +4 +5 +6 +8 +5 +6 +4 +18 +10 +4 +2 +216 +6 +6 +6 +2 +4 +12 +8 +3 +11 +5 +6 +14 +5 +3 +13 +4 +5 +4 +5 +3 +28 +6 +3 +7 +219 +3 +9 +7 +3 +10 +6 +3 +4 +19 +5 +7 +11 +6 +15 +19 +4 +13 +11 +3 +7 +5 +10 +2 +8 +11 +2 +6 +4 +6 +24 +6 +3 +3 +3 +3 +6 +18 +4 +11 +4 +2 +5 +10 +8 +3 +9 +5 +3 +4 +5 +6 +2 +5 +7 +4 +4 +14 +6 +4 +4 +5 +5 +7 +2 +4 +3 +7 +3 +3 +6 +4 +5 +4 +4 +4 +3 +3 +3 +3 +8 +14 +2 +3 +5 +3 +2 +4 +5 +3 +7 +3 +3 +18 +3 +4 +4 +5 +7 +3 +3 +3 +13 +5 +4 +8 +211 +5 +5 +3 +5 +2 +5 +4 +2 +655 +6 +3 +5 +11 +2 +5 +3 +12 +9 +15 +11 +5 +12 +217 +2 +6 +17 +3 +3 +207 +5 +5 +4 +5 +9 +3 +2 +8 +5 +4 +3 +2 +5 +12 +4 +14 +5 +4 +2 +13 +5 +8 +4 +225 +4 +3 +4 +5 +4 +3 +3 +6 +23 +9 +2 +6 +7 +233 +4 +4 +6 +18 +3 +4 +6 +3 +4 +4 +2 +3 +7 +4 +13 +227 +4 +3 +5 +4 +2 +12 +9 +17 +3 +7 +14 +6 +4 +5 +21 +4 +8 +9 +2 +9 +25 +16 +3 +6 +4 +7 +8 +5 +2 +3 +5 +4 +3 +3 +5 +3 +3 +3 +2 +3 +19 +2 +4 +3 +4 +2 +3 +4 +4 +2 +4 +3 +3 +3 +2 +6 +3 +17 +5 +6 +4 +3 +13 +5 +3 +3 +3 +4 +9 +4 +2 +14 +12 +4 +5 +24 +4 +3 +37 +12 +11 +21 +3 +4 +3 +13 +4 +2 +3 +15 +4 +11 +4 +4 +3 +8 +3 +4 +4 +12 +8 +5 +3 +3 +4 +2 +220 +3 +5 +223 +3 +3 +3 +10 +3 +15 +4 +241 +9 +7 +3 +6 +6 +23 +4 +13 +7 +3 +4 +7 +4 +9 +3 +3 +4 +10 +5 +5 +1 +5 +24 +2 +4 +5 +5 +6 +14 +3 +8 +2 +3 +5 +13 +13 +3 +5 +2 +3 +15 +3 +4 +2 +10 +4 +4 +4 +5 +5 +3 +5 +3 +4 +7 +4 +27 +3 +6 +4 +15 +3 +5 +6 +6 +5 +4 +8 +3 +9 +2 +6 +3 +4 +3 +7 +4 +18 +3 +11 +3 +3 +8 +9 +7 +24 +3 +219 +7 +10 +4 +5 +9 +12 +2 +5 +4 +4 +4 +3 +3 +19 +5 +8 +16 +8 +6 +22 +3 +23 +3 +242 +9 +4 +3 +3 +5 +7 +3 +3 +5 +8 +3 +7 +5 +14 +8 +10 +3 +4 +3 +7 +4 +6 +7 +4 +10 +4 +3 +11 +3 +7 +10 +3 +13 +6 +8 +12 +10 +5 +7 +9 +3 +4 +7 +7 +10 +8 +30 +9 +19 +4 +3 +19 +15 +4 +13 +3 +215 +223 +4 +7 +4 +8 +17 +16 +3 +7 +6 +5 +5 +4 +12 +3 +7 +4 +4 +13 +4 +5 +2 +5 +6 +5 +6 +6 +7 +10 +18 +23 +9 +3 +3 +6 +5 +2 +4 +2 +7 +3 +3 +2 +5 +5 +14 +10 +224 +6 +3 +4 +3 +7 +5 +9 +3 +6 +4 +2 +5 +11 +4 +3 +3 +2 +8 +4 +7 +4 +10 +7 +3 +3 +18 +18 +17 +3 +3 +3 +4 +5 +3 +3 +4 +12 +7 +3 +11 +13 +5 +4 +7 +13 +5 +4 +11 +3 +12 +3 +6 +4 +4 +21 +4 +6 +9 +5 +3 +10 +8 +4 +6 +4 +4 +6 +5 +4 +8 +6 +4 +6 +4 +4 +5 +9 +6 +3 +4 +2 +9 +3 +18 +2 +4 +3 +13 +3 +6 +6 +8 +7 +9 +3 +2 +16 +3 +4 +6 +3 +2 +33 +22 +14 +4 +9 +12 +4 +5 +6 +3 +23 +9 +4 +3 +5 +5 +3 +4 +5 +3 +5 +3 +10 +4 +5 +5 +8 +4 +4 +6 +8 +5 +4 +3 +4 +6 +3 +3 +3 +5 +9 +12 +6 +5 +9 +3 +5 +3 +2 +2 +2 +18 +3 +2 +21 +2 +5 +4 +6 +4 +5 +10 +3 +9 +3 +2 +10 +7 +3 +6 +6 +4 +4 +8 +12 +7 +3 +7 +3 +3 +9 +3 +4 +5 +4 +4 +5 +5 +10 +15 +4 +4 +14 +6 +227 +3 +14 +5 +216 +22 +5 +4 +2 +2 +6 +3 +4 +2 +9 +9 +4 +3 +28 +13 +11 +4 +5 +3 +3 +2 +3 +3 +5 +3 +4 +3 +5 +23 +26 +3 +4 +5 +6 +4 +6 +3 +5 +5 +3 +4 +3 +2 +2 +2 +7 +14 +3 +6 +7 +17 +2 +2 +15 +14 +16 +4 +6 +7 +13 +6 +4 +5 +6 +16 +3 +3 +28 +3 +6 +15 +3 +9 +2 +4 +6 +3 +3 +22 +4 +12 +6 +7 +2 +5 +4 +10 +3 +16 +6 +9 +2 +5 +12 +7 +5 +5 +5 +5 +2 +11 +9 +17 +4 +3 +11 +7 +3 +5 +15 +4 +3 +4 +211 +8 +7 +5 +4 +7 +6 +7 +6 +3 +6 +5 +6 +5 +3 +4 +4 +26 +4 +6 +10 +4 +4 +3 +2 +3 +3 +4 +5 +9 +3 +9 +4 +4 +5 +5 +8 +2 +4 +2 +3 +8 +4 +11 +19 +5 +8 +6 +3 +5 +6 +12 +3 +2 +4 +16 +12 +3 +4 +4 +8 +6 +5 +6 +6 +219 +8 +222 +6 +16 +3 +13 +19 +5 +4 +3 +11 +6 +10 +4 +7 +7 +12 +5 +3 +3 +5 +6 +10 +3 +8 +2 +5 +4 +7 +2 +4 +4 +2 +12 +9 +6 +4 +2 +40 +2 +4 +10 +4 +223 +4 +2 +20 +6 +7 +24 +5 +4 +5 +2 +20 +16 +6 +5 +13 +2 +3 +3 +19 +3 +2 +4 +5 +6 +7 +11 +12 +5 +6 +7 +7 +3 +5 +3 +5 +3 +14 +3 +4 +4 +2 +11 +1 +7 +3 +9 +6 +11 +12 +5 +8 +6 +221 +4 +2 +12 +4 +3 +15 +4 +5 +226 +7 +218 +7 +5 +4 +5 +18 +4 +5 +9 +4 +4 +2 +9 +18 +18 +9 +5 +6 +6 +3 +3 +7 +3 +5 +4 +4 +4 +12 +3 +6 +31 +5 +4 +7 +3 +6 +5 +6 +5 +11 +2 +2 +11 +11 +6 +7 +5 +8 +7 +10 +5 +23 +7 +4 +3 +5 +34 +2 +5 +23 +7 +3 +6 +8 +4 +4 +4 +2 +5 +3 +8 +5 +4 +8 +25 +2 +3 +17 +8 +3 +4 +8 +7 +3 +15 +6 +5 +7 +21 +9 +5 +6 +6 +5 +3 +2 +3 +10 +3 +6 +3 +14 +7 +4 +4 +8 +7 +8 +2 +6 +12 +4 +213 +6 +5 +21 +8 +2 +5 +23 +3 +11 +2 +3 +6 +25 +2 +3 +6 +7 +6 +6 +4 +4 +6 +3 +17 +9 +7 +6 +4 +3 +10 +7 +2 +3 +3 +3 +11 +8 +3 +7 +6 +4 +14 +36 +3 +4 +3 +3 +22 +13 +21 +4 +2 +7 +4 +4 +17 +15 +3 +7 +11 +2 +4 +7 +6 +209 +6 +3 +2 +2 +24 +4 +9 +4 +3 +3 +3 +29 +2 +2 +4 +3 +3 +5 +4 +6 +3 +3 +2 +4 diff --git a/vendor/github.com/bsphere/le_go/.gitignore b/vendor/github.com/bsphere/le_go/.gitignore new file mode 100644 index 0000000000..836562412f --- /dev/null +++ b/vendor/github.com/bsphere/le_go/.gitignore @@ -0,0 +1,23 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test diff --git a/vendor/github.com/bsphere/le_go/.travis.yml b/vendor/github.com/bsphere/le_go/.travis.yml new file mode 100644 index 0000000000..aa1b91fe6c --- /dev/null +++ b/vendor/github.com/bsphere/le_go/.travis.yml @@ -0,0 +1,4 @@ +language: go + +go: + - 1.4 \ No newline at end of file diff --git a/vendor/github.com/cespare/xxhash/v2/.travis.yml b/vendor/github.com/cespare/xxhash/v2/.travis.yml new file mode 100644 index 0000000000..c516ea88da --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/.travis.yml @@ -0,0 +1,8 @@ +language: go +go: + - "1.x" + - master +env: + - TAGS="" + - TAGS="-tags purego" +script: go test $TAGS -v ./... diff --git a/vendor/github.com/cespare/xxhash/v2/go.mod b/vendor/github.com/cespare/xxhash/v2/go.mod deleted file mode 100644 index 49f67608bf..0000000000 --- a/vendor/github.com/cespare/xxhash/v2/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/cespare/xxhash/v2 - -go 1.11 diff --git a/vendor/github.com/cilium/ebpf/.clang-format b/vendor/github.com/cilium/ebpf/.clang-format new file mode 100644 index 0000000000..4eb94b1baa --- /dev/null +++ b/vendor/github.com/cilium/ebpf/.clang-format @@ -0,0 +1,17 @@ +--- +Language: Cpp +BasedOnStyle: LLVM +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: true +AlignEscapedNewlines: DontAlign +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortFunctionsOnASingleLine: false +BreakBeforeBraces: Attach +IndentWidth: 4 +KeepEmptyLinesAtTheStartOfBlocks: false +TabWidth: 4 +UseTab: ForContinuationAndIndentation +ColumnLimit: 1000 +... diff --git a/vendor/github.com/cilium/ebpf/.gitignore b/vendor/github.com/cilium/ebpf/.gitignore new file mode 100644 index 0000000000..38b15653c0 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/.gitignore @@ -0,0 +1,13 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +*.o + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out diff --git a/vendor/github.com/cilium/ebpf/.golangci.yaml b/vendor/github.com/cilium/ebpf/.golangci.yaml new file mode 100644 index 0000000000..a88374197e --- /dev/null +++ b/vendor/github.com/cilium/ebpf/.golangci.yaml @@ -0,0 +1,29 @@ +--- +issues: + exclude-rules: + # syscall param structs will have unused fields in Go code. + - path: syscall.*.go + linters: + - structcheck + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - goimports + - gosimple + - govet + - ineffassign + - misspell + - staticcheck + - structcheck + - typecheck + - unused + - varcheck + + # Could be enabled later: + # - gocyclo + # - prealloc + # - maligned + # - gosec diff --git a/vendor/github.com/cilium/ebpf/ARCHITECTURE.md b/vendor/github.com/cilium/ebpf/ARCHITECTURE.md new file mode 100644 index 0000000000..aee9c0a0d4 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/ARCHITECTURE.md @@ -0,0 +1,80 @@ +Architecture of the library +=== + + ELF -> Specifications -> Objects -> Links + +ELF +--- + +BPF is usually produced by using Clang to compile a subset of C. Clang outputs +an ELF file which contains program byte code (aka BPF), but also metadata for +maps used by the program. The metadata follows the conventions set by libbpf +shipped with the kernel. Certain ELF sections have special meaning +and contain structures defined by libbpf. Newer versions of clang emit +additional metadata in BPF Type Format (aka BTF). + +The library aims to be compatible with libbpf so that moving from a C toolchain +to a Go one creates little friction. To that end, the [ELF reader](elf_reader.go) +is tested against the Linux selftests and avoids introducing custom behaviour +if possible. + +The output of the ELF reader is a `CollectionSpec` which encodes +all of the information contained in the ELF in a form that is easy to work with +in Go. + +### BTF + +The BPF Type Format describes more than just the types used by a BPF program. It +includes debug aids like which source line corresponds to which instructions and +what global variables are used. + +[BTF parsing](internal/btf/) lives in a separate internal package since exposing +it would mean an additional maintenance burden, and because the API still +has sharp corners. The most important concept is the `btf.Type` interface, which +also describes things that aren't really types like `.rodata` or `.bss` sections. +`btf.Type`s can form cyclical graphs, which can easily lead to infinite loops if +one is not careful. Hopefully a safe pattern to work with `btf.Type` emerges as +we write more code that deals with it. + +Specifications +--- + +`CollectionSpec`, `ProgramSpec` and `MapSpec` are blueprints for in-kernel +objects and contain everything necessary to execute the relevant `bpf(2)` +syscalls. Since the ELF reader outputs a `CollectionSpec` it's possible to +modify clang-compiled BPF code, for example to rewrite constants. At the same +time the [asm](asm/) package provides an assembler that can be used to generate +`ProgramSpec` on the fly. + +Creating a spec should never require any privileges or be restricted in any way, +for example by only allowing programs in native endianness. This ensures that +the library stays flexible. + +Objects +--- + +`Program` and `Map` are the result of loading specs into the kernel. Sometimes +loading a spec will fail because the kernel is too old, or a feature is not +enabled. There are multiple ways the library deals with that: + +* Fallback: older kernels don't allowing naming programs and maps. The library + automatically detects support for names, and omits them during load if + necessary. This works since name is primarily a debug aid. + +* Sentinel error: sometimes it's possible to detect that a feature isn't available. + In that case the library will return an error wrapping `ErrNotSupported`. + This is also useful to skip tests that can't run on the current kernel. + +Once program and map objects are loaded they expose the kernel's low-level API, +e.g. `NextKey`. Often this API is awkward to use in Go, so there are safer +wrappers on top of the low-level API, like `MapIterator`. The low-level API is +useful as an out when our higher-level API doesn't support a particular use case. + +Links +--- + +BPF can be attached to many different points in the kernel and newer BPF hooks +tend to use bpf_link to do so. Older hooks unfortunately use a combination of +syscalls, netlink messages, etc. Adding support for a new link type should not +pull in large dependencies like netlink, so XDP programs or tracepoints are +out of scope. diff --git a/vendor/github.com/cilium/ebpf/CODE_OF_CONDUCT.md b/vendor/github.com/cilium/ebpf/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..8e42838c5a --- /dev/null +++ b/vendor/github.com/cilium/ebpf/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at nathanjsweet at gmail dot com or i at lmb dot io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/cilium/ebpf/CONTRIBUTING.md b/vendor/github.com/cilium/ebpf/CONTRIBUTING.md new file mode 100644 index 0000000000..72ceb43782 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/CONTRIBUTING.md @@ -0,0 +1,40 @@ +# How to contribute + +Development is on [GitHub](https://github.com/cilium/ebpf) and contributions in +the form of pull requests and issues reporting bugs or suggesting new features +are welcome. Please take a look at [the architecture](ARCHITECTURE.md) to get +a better understanding for the high-level goals. + +New features must be accompanied by tests. Before starting work on any large +feature, please [join](https://cilium.herokuapp.com/) the +[#libbpf-go](https://cilium.slack.com/messages/libbpf-go) channel on Slack to +discuss the design first. + +When submitting pull requests, consider writing details about what problem you +are solving and why the proposed approach solves that problem in commit messages +and/or pull request description to help future library users and maintainers to +reason about the proposed changes. + +## Running the tests + +Many of the tests require privileges to set resource limits and load eBPF code. +The easiest way to obtain these is to run the tests with `sudo`. + +To test the current package with your local kernel you can simply run: +``` +go test -exec sudo ./... +``` + +To test the current package with a different kernel version you can use the [run-tests.sh](run-tests.sh) script. +It requires [virtme](https://github.com/amluto/virtme) and qemu to be installed. + +Examples: + +```bash +# Run all tests on a 5.4 kernel +./run-tests.sh 5.4 + +# Run a subset of tests: +./run-tests.sh 5.4 go test ./link +``` + diff --git a/vendor/github.com/cilium/ebpf/Makefile b/vendor/github.com/cilium/ebpf/Makefile new file mode 100644 index 0000000000..5dd342c5b2 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/Makefile @@ -0,0 +1,70 @@ +# The development version of clang is distributed as the 'clang' binary, +# while stable/released versions have a version number attached. +# Pin the default clang to a stable version. +CLANG ?= clang-12 +CFLAGS := -target bpf -O2 -g -Wall -Werror $(CFLAGS) + +# Obtain an absolute path to the directory of the Makefile. +# Assume the Makefile is in the root of the repository. +REPODIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +UIDGID := $(shell stat -c '%u:%g' ${REPODIR}) + +IMAGE := $(shell cat ${REPODIR}/testdata/docker/IMAGE) +VERSION := $(shell cat ${REPODIR}/testdata/docker/VERSION) + +# clang <8 doesn't tag relocs properly (STT_NOTYPE) +# clang 9 is the first version emitting BTF +TARGETS := \ + testdata/loader-clang-7 \ + testdata/loader-clang-9 \ + testdata/loader-$(CLANG) \ + testdata/invalid_map \ + testdata/raw_tracepoint \ + testdata/invalid_map_static \ + testdata/initialized_btf_map \ + testdata/strings \ + internal/btf/testdata/relocs + +.PHONY: all clean docker-all docker-shell + +.DEFAULT_TARGET = docker-all + +# Build all ELF binaries using a Dockerized LLVM toolchain. +docker-all: + docker run --rm --user "${UIDGID}" \ + -v "${REPODIR}":/ebpf -w /ebpf --env MAKEFLAGS \ + --env CFLAGS="-fdebug-prefix-map=/ebpf=." \ + "${IMAGE}:${VERSION}" \ + make all + +# (debug) Drop the user into a shell inside the Docker container as root. +docker-shell: + docker run --rm -ti \ + -v "${REPODIR}":/ebpf -w /ebpf \ + "${IMAGE}:${VERSION}" + +clean: + -$(RM) testdata/*.elf + -$(RM) internal/btf/testdata/*.elf + +all: $(addsuffix -el.elf,$(TARGETS)) $(addsuffix -eb.elf,$(TARGETS)) + ln -srf testdata/loader-$(CLANG)-el.elf testdata/loader-el.elf + ln -srf testdata/loader-$(CLANG)-eb.elf testdata/loader-eb.elf + +testdata/loader-%-el.elf: testdata/loader.c + $* $(CFLAGS) -mlittle-endian -c $< -o $@ + +testdata/loader-%-eb.elf: testdata/loader.c + $* $(CFLAGS) -mbig-endian -c $< -o $@ + +%-el.elf: %.c + $(CLANG) $(CFLAGS) -mlittle-endian -c $< -o $@ + +%-eb.elf : %.c + $(CLANG) $(CFLAGS) -mbig-endian -c $< -o $@ + +# Usage: make VMLINUX=/path/to/vmlinux vmlinux-btf +.PHONY: vmlinux-btf +vmlinux-btf: internal/btf/testdata/vmlinux-btf.gz +internal/btf/testdata/vmlinux-btf.gz: $(VMLINUX) + objcopy --dump-section .BTF=/dev/stdout "$<" /dev/null | gzip > "$@" diff --git a/vendor/github.com/cilium/ebpf/examples/README.md b/vendor/github.com/cilium/ebpf/examples/README.md deleted file mode 100644 index 1765e3ce2e..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# eBPF Examples - -- [kprobe](kprobe/) - Attach a program to the entry or exit of an arbitrary kernel symbol (function). -- [uretprobe](uretprobe/) - Like a kprobe, but for symbols in userspace binaries (e.g. `bash`). -- [tracepoint](tracepoint/) - Attach a program to predetermined kernel tracepoints. -- Add your use case(s) here! - -## How to run - -```bash -cd ebpf/examples/ -go run -exec sudo [./kprobe, ./uretprobe, ./tracepoint, ...] -``` diff --git a/vendor/github.com/cilium/ebpf/examples/go.mod b/vendor/github.com/cilium/ebpf/examples/go.mod deleted file mode 100644 index 6722dfd3c4..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/cilium/ebpf/examples - -go 1.15 - -require ( - github.com/cilium/ebpf v0.6.1-0.20210610105443-1e7f01c7124c - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c -) diff --git a/vendor/github.com/cilium/ebpf/examples/headers/bpf_helper_defs.h b/vendor/github.com/cilium/ebpf/examples/headers/bpf_helper_defs.h deleted file mode 100644 index 5ac02ece11..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/headers/bpf_helper_defs.h +++ /dev/null @@ -1,3265 +0,0 @@ -/* This is auto-generated file. See bpf_helpers_doc.py for details. */ - -/* Forward declarations of BPF structs */ -struct bpf_fib_lookup; -struct bpf_sk_lookup; -struct bpf_perf_event_data; -struct bpf_perf_event_value; -struct bpf_pidns_info; -struct bpf_sock; -struct bpf_sock_addr; -struct bpf_sock_ops; -struct bpf_sock_tuple; -struct bpf_spin_lock; -struct bpf_sysctl; -struct bpf_tcp_sock; -struct bpf_tunnel_key; -struct bpf_xfrm_state; -struct pt_regs; -struct sk_reuseport_md; -struct sockaddr; -struct tcphdr; -struct seq_file; -struct tcp6_sock; -struct tcp_sock; -struct tcp_timewait_sock; -struct tcp_request_sock; -struct udp6_sock; -struct task_struct; -struct __sk_buff; -struct sk_msg_md; -struct xdp_md; - -/* - * bpf_map_lookup_elem - * - * Perform a lookup in *map* for an entry associated to *key*. - * - * Returns - * Map value associated to *key*, or **NULL** if no entry was - * found. - */ -static void *(*bpf_map_lookup_elem)(void *map, const void *key) = (void *) 1; - -/* - * bpf_map_update_elem - * - * Add or update the value of the entry associated to *key* in - * *map* with *value*. *flags* is one of: - * - * **BPF_NOEXIST** - * The entry for *key* must not exist in the map. - * **BPF_EXIST** - * The entry for *key* must already exist in the map. - * **BPF_ANY** - * No condition on the existence of the entry for *key*. - * - * Flag value **BPF_NOEXIST** cannot be used for maps of types - * **BPF_MAP_TYPE_ARRAY** or **BPF_MAP_TYPE_PERCPU_ARRAY** (all - * elements always exist), the helper would return an error. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_map_update_elem)(void *map, const void *key, const void *value, __u64 flags) = (void *) 2; - -/* - * bpf_map_delete_elem - * - * Delete entry with *key* from *map*. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_map_delete_elem)(void *map, const void *key) = (void *) 3; - -/* - * bpf_probe_read - * - * For tracing programs, safely attempt to read *size* bytes from - * kernel space address *unsafe_ptr* and store the data in *dst*. - * - * Generally, use **bpf_probe_read_user**\ () or - * **bpf_probe_read_kernel**\ () instead. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_probe_read)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 4; - -/* - * bpf_ktime_get_ns - * - * Return the time elapsed since system boot, in nanoseconds. - * Does not include time the system was suspended. - * See: **clock_gettime**\ (**CLOCK_MONOTONIC**) - * - * Returns - * Current *ktime*. - */ -static __u64 (*bpf_ktime_get_ns)(void) = (void *) 5; - -/* - * bpf_trace_printk - * - * This helper is a "printk()-like" facility for debugging. It - * prints a message defined by format *fmt* (of size *fmt_size*) - * to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if - * available. It can take up to three additional **u64** - * arguments (as an eBPF helpers, the total number of arguments is - * limited to five). - * - * Each time the helper is called, it appends a line to the trace. - * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is - * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this. - * The format of the trace is customizable, and the exact output - * one will get depends on the options set in - * *\/sys/kernel/debug/tracing/trace_options* (see also the - * *README* file under the same directory). However, it usually - * defaults to something like: - * - * :: - * - * telnet-470 [001] .N.. 419421.045894: 0x00000001: - * - * In the above: - * - * * ``telnet`` is the name of the current task. - * * ``470`` is the PID of the current task. - * * ``001`` is the CPU number on which the task is - * running. - * * In ``.N..``, each character refers to a set of - * options (whether irqs are enabled, scheduling - * options, whether hard/softirqs are running, level of - * preempt_disabled respectively). **N** means that - * **TIF_NEED_RESCHED** and **PREEMPT_NEED_RESCHED** - * are set. - * * ``419421.045894`` is a timestamp. - * * ``0x00000001`` is a fake value used by BPF for the - * instruction pointer register. - * * ```` is the message formatted with - * *fmt*. - * - * The conversion specifiers supported by *fmt* are similar, but - * more limited than for printk(). They are **%d**, **%i**, - * **%u**, **%x**, **%ld**, **%li**, **%lu**, **%lx**, **%lld**, - * **%lli**, **%llu**, **%llx**, **%p**, **%s**. No modifier (size - * of field, padding with zeroes, etc.) is available, and the - * helper will return **-EINVAL** (but print nothing) if it - * encounters an unknown specifier. - * - * Also, note that **bpf_trace_printk**\ () is slow, and should - * only be used for debugging purposes. For this reason, a notice - * bloc (spanning several lines) is printed to kernel logs and - * states that the helper should not be used "for production use" - * the first time this helper is used (or more precisely, when - * **trace_printk**\ () buffers are allocated). For passing values - * to user space, perf events should be preferred. - * - * Returns - * The number of bytes written to the buffer, or a negative error - * in case of failure. - */ -static long (*bpf_trace_printk)(const char *fmt, __u32 fmt_size, ...) = (void *) 6; - -/* - * bpf_get_prandom_u32 - * - * Get a pseudo-random number. - * - * From a security point of view, this helper uses its own - * pseudo-random internal state, and cannot be used to infer the - * seed of other random functions in the kernel. However, it is - * essential to note that the generator used by the helper is not - * cryptographically secure. - * - * Returns - * A random 32-bit unsigned value. - */ -static __u32 (*bpf_get_prandom_u32)(void) = (void *) 7; - -/* - * bpf_get_smp_processor_id - * - * Get the SMP (symmetric multiprocessing) processor id. Note that - * all programs run with preemption disabled, which means that the - * SMP processor id is stable during all the execution of the - * program. - * - * Returns - * The SMP id of the processor running the program. - */ -static __u32 (*bpf_get_smp_processor_id)(void) = (void *) 8; - -/* - * bpf_skb_store_bytes - * - * Store *len* bytes from address *from* into the packet - * associated to *skb*, at *offset*. *flags* are a combination of - * **BPF_F_RECOMPUTE_CSUM** (automatically recompute the - * checksum for the packet after storing the bytes) and - * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ - * **->swhash** and *skb*\ **->l4hash** to 0). - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_store_bytes)(struct __sk_buff *skb, __u32 offset, const void *from, __u32 len, __u64 flags) = (void *) 9; - -/* - * bpf_l3_csum_replace - * - * Recompute the layer 3 (e.g. IP) checksum for the packet - * associated to *skb*. Computation is incremental, so the helper - * must know the former value of the header field that was - * modified (*from*), the new value of this field (*to*), and the - * number of bytes (2 or 4) for this field, stored in *size*. - * Alternatively, it is possible to store the difference between - * the previous and the new values of the header field in *to*, by - * setting *from* and *size* to 0. For both methods, *offset* - * indicates the location of the IP checksum within the packet. - * - * This helper works in combination with **bpf_csum_diff**\ (), - * which does not update the checksum in-place, but offers more - * flexibility and can handle sizes larger than 2 or 4 for the - * checksum to update. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_l3_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 size) = (void *) 10; - -/* - * bpf_l4_csum_replace - * - * Recompute the layer 4 (e.g. TCP, UDP or ICMP) checksum for the - * packet associated to *skb*. Computation is incremental, so the - * helper must know the former value of the header field that was - * modified (*from*), the new value of this field (*to*), and the - * number of bytes (2 or 4) for this field, stored on the lowest - * four bits of *flags*. Alternatively, it is possible to store - * the difference between the previous and the new values of the - * header field in *to*, by setting *from* and the four lowest - * bits of *flags* to 0. For both methods, *offset* indicates the - * location of the IP checksum within the packet. In addition to - * the size of the field, *flags* can be added (bitwise OR) actual - * flags. With **BPF_F_MARK_MANGLED_0**, a null checksum is left - * untouched (unless **BPF_F_MARK_ENFORCE** is added as well), and - * for updates resulting in a null checksum the value is set to - * **CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates - * the checksum is to be computed against a pseudo-header. - * - * This helper works in combination with **bpf_csum_diff**\ (), - * which does not update the checksum in-place, but offers more - * flexibility and can handle sizes larger than 2 or 4 for the - * checksum to update. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_l4_csum_replace)(struct __sk_buff *skb, __u32 offset, __u64 from, __u64 to, __u64 flags) = (void *) 11; - -/* - * bpf_tail_call - * - * This special helper is used to trigger a "tail call", or in - * other words, to jump into another eBPF program. The same stack - * frame is used (but values on stack and in registers for the - * caller are not accessible to the callee). This mechanism allows - * for program chaining, either for raising the maximum number of - * available eBPF instructions, or to execute given programs in - * conditional blocks. For security reasons, there is an upper - * limit to the number of successive tail calls that can be - * performed. - * - * Upon call of this helper, the program attempts to jump into a - * program referenced at index *index* in *prog_array_map*, a - * special map of type **BPF_MAP_TYPE_PROG_ARRAY**, and passes - * *ctx*, a pointer to the context. - * - * If the call succeeds, the kernel immediately runs the first - * instruction of the new program. This is not a function call, - * and it never returns to the previous program. If the call - * fails, then the helper has no effect, and the caller continues - * to run its subsequent instructions. A call can fail if the - * destination program for the jump does not exist (i.e. *index* - * is superior to the number of entries in *prog_array_map*), or - * if the maximum number of tail calls has been reached for this - * chain of programs. This limit is defined in the kernel by the - * macro **MAX_TAIL_CALL_CNT** (not accessible to user space), - * which is currently set to 32. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_tail_call)(void *ctx, void *prog_array_map, __u32 index) = (void *) 12; - -/* - * bpf_clone_redirect - * - * Clone and redirect the packet associated to *skb* to another - * net device of index *ifindex*. Both ingress and egress - * interfaces can be used for redirection. The **BPF_F_INGRESS** - * value in *flags* is used to make the distinction (ingress path - * is selected if the flag is present, egress path otherwise). - * This is the only flag supported for now. - * - * In comparison with **bpf_redirect**\ () helper, - * **bpf_clone_redirect**\ () has the associated cost of - * duplicating the packet buffer, but this can be executed out of - * the eBPF program. Conversely, **bpf_redirect**\ () is more - * efficient, but it is handled through an action code where the - * redirection happens only after the eBPF program has returned. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_clone_redirect)(struct __sk_buff *skb, __u32 ifindex, __u64 flags) = (void *) 13; - -/* - * bpf_get_current_pid_tgid - * - * - * Returns - * A 64-bit integer containing the current tgid and pid, and - * created as such: - * *current_task*\ **->tgid << 32 \|** - * *current_task*\ **->pid**. - */ -static __u64 (*bpf_get_current_pid_tgid)(void) = (void *) 14; - -/* - * bpf_get_current_uid_gid - * - * - * Returns - * A 64-bit integer containing the current GID and UID, and - * created as such: *current_gid* **<< 32 \|** *current_uid*. - */ -static __u64 (*bpf_get_current_uid_gid)(void) = (void *) 15; - -/* - * bpf_get_current_comm - * - * Copy the **comm** attribute of the current task into *buf* of - * *size_of_buf*. The **comm** attribute contains the name of - * the executable (excluding the path) for the current task. The - * *size_of_buf* must be strictly positive. On success, the - * helper makes sure that the *buf* is NUL-terminated. On failure, - * it is filled with zeroes. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_get_current_comm)(void *buf, __u32 size_of_buf) = (void *) 16; - -/* - * bpf_get_cgroup_classid - * - * Retrieve the classid for the current task, i.e. for the net_cls - * cgroup to which *skb* belongs. - * - * This helper can be used on TC egress path, but not on ingress. - * - * The net_cls cgroup provides an interface to tag network packets - * based on a user-provided identifier for all traffic coming from - * the tasks belonging to the related cgroup. See also the related - * kernel documentation, available from the Linux sources in file - * *Documentation/admin-guide/cgroup-v1/net_cls.rst*. - * - * The Linux kernel has two versions for cgroups: there are - * cgroups v1 and cgroups v2. Both are available to users, who can - * use a mixture of them, but note that the net_cls cgroup is for - * cgroup v1 only. This makes it incompatible with BPF programs - * run on cgroups, which is a cgroup-v2-only feature (a socket can - * only hold data for one version of cgroups at a time). - * - * This helper is only available is the kernel was compiled with - * the **CONFIG_CGROUP_NET_CLASSID** configuration option set to - * "**y**" or to "**m**". - * - * Returns - * The classid, or 0 for the default unconfigured classid. - */ -static __u32 (*bpf_get_cgroup_classid)(struct __sk_buff *skb) = (void *) 17; - -/* - * bpf_skb_vlan_push - * - * Push a *vlan_tci* (VLAN tag control information) of protocol - * *vlan_proto* to the packet associated to *skb*, then update - * the checksum. Note that if *vlan_proto* is different from - * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to - * be **ETH_P_8021Q**. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_vlan_push)(struct __sk_buff *skb, __be16 vlan_proto, __u16 vlan_tci) = (void *) 18; - -/* - * bpf_skb_vlan_pop - * - * Pop a VLAN header from the packet associated to *skb*. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_vlan_pop)(struct __sk_buff *skb) = (void *) 19; - -/* - * bpf_skb_get_tunnel_key - * - * Get tunnel metadata. This helper takes a pointer *key* to an - * empty **struct bpf_tunnel_key** of **size**, that will be - * filled with tunnel metadata for the packet associated to *skb*. - * The *flags* can be set to **BPF_F_TUNINFO_IPV6**, which - * indicates that the tunnel is based on IPv6 protocol instead of - * IPv4. - * - * The **struct bpf_tunnel_key** is an object that generalizes the - * principal parameters used by various tunneling protocols into a - * single struct. This way, it can be used to easily make a - * decision based on the contents of the encapsulation header, - * "summarized" in this struct. In particular, it holds the IP - * address of the remote end (IPv4 or IPv6, depending on the case) - * in *key*\ **->remote_ipv4** or *key*\ **->remote_ipv6**. Also, - * this struct exposes the *key*\ **->tunnel_id**, which is - * generally mapped to a VNI (Virtual Network Identifier), making - * it programmable together with the **bpf_skb_set_tunnel_key**\ - * () helper. - * - * Let's imagine that the following code is part of a program - * attached to the TC ingress interface, on one end of a GRE - * tunnel, and is supposed to filter out all messages coming from - * remote ends with IPv4 address other than 10.0.0.1: - * - * :: - * - * int ret; - * struct bpf_tunnel_key key = {}; - * - * ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); - * if (ret < 0) - * return TC_ACT_SHOT; // drop packet - * - * if (key.remote_ipv4 != 0x0a000001) - * return TC_ACT_SHOT; // drop packet - * - * return TC_ACT_OK; // accept packet - * - * This interface can also be used with all encapsulation devices - * that can operate in "collect metadata" mode: instead of having - * one network device per specific configuration, the "collect - * metadata" mode only requires a single device where the - * configuration can be extracted from this helper. - * - * This can be used together with various tunnels such as VXLan, - * Geneve, GRE or IP in IP (IPIP). - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_get_tunnel_key)(struct __sk_buff *skb, struct bpf_tunnel_key *key, __u32 size, __u64 flags) = (void *) 20; - -/* - * bpf_skb_set_tunnel_key - * - * Populate tunnel metadata for packet associated to *skb.* The - * tunnel metadata is set to the contents of *key*, of *size*. The - * *flags* can be set to a combination of the following values: - * - * **BPF_F_TUNINFO_IPV6** - * Indicate that the tunnel is based on IPv6 protocol - * instead of IPv4. - * **BPF_F_ZERO_CSUM_TX** - * For IPv4 packets, add a flag to tunnel metadata - * indicating that checksum computation should be skipped - * and checksum set to zeroes. - * **BPF_F_DONT_FRAGMENT** - * Add a flag to tunnel metadata indicating that the - * packet should not be fragmented. - * **BPF_F_SEQ_NUMBER** - * Add a flag to tunnel metadata indicating that a - * sequence number should be added to tunnel header before - * sending the packet. This flag was added for GRE - * encapsulation, but might be used with other protocols - * as well in the future. - * - * Here is a typical usage on the transmit path: - * - * :: - * - * struct bpf_tunnel_key key; - * populate key ... - * bpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0); - * bpf_clone_redirect(skb, vxlan_dev_ifindex, 0); - * - * See also the description of the **bpf_skb_get_tunnel_key**\ () - * helper for additional information. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_set_tunnel_key)(struct __sk_buff *skb, struct bpf_tunnel_key *key, __u32 size, __u64 flags) = (void *) 21; - -/* - * bpf_perf_event_read - * - * Read the value of a perf event counter. This helper relies on a - * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. The nature of - * the perf event counter is selected when *map* is updated with - * perf event file descriptors. The *map* is an array whose size - * is the number of available CPUs, and each cell contains a value - * relative to one CPU. The value to retrieve is indicated by - * *flags*, that contains the index of the CPU to look up, masked - * with **BPF_F_INDEX_MASK**. Alternatively, *flags* can be set to - * **BPF_F_CURRENT_CPU** to indicate that the value for the - * current CPU should be retrieved. - * - * Note that before Linux 4.13, only hardware perf event can be - * retrieved. - * - * Also, be aware that the newer helper - * **bpf_perf_event_read_value**\ () is recommended over - * **bpf_perf_event_read**\ () in general. The latter has some ABI - * quirks where error and counter value are used as a return code - * (which is wrong to do since ranges may overlap). This issue is - * fixed with **bpf_perf_event_read_value**\ (), which at the same - * time provides more features over the **bpf_perf_event_read**\ - * () interface. Please refer to the description of - * **bpf_perf_event_read_value**\ () for details. - * - * Returns - * The value of the perf event counter read from the map, or a - * negative error code in case of failure. - */ -static __u64 (*bpf_perf_event_read)(void *map, __u64 flags) = (void *) 22; - -/* - * bpf_redirect - * - * Redirect the packet to another net device of index *ifindex*. - * This helper is somewhat similar to **bpf_clone_redirect**\ - * (), except that the packet is not cloned, which provides - * increased performance. - * - * Except for XDP, both ingress and egress interfaces can be used - * for redirection. The **BPF_F_INGRESS** value in *flags* is used - * to make the distinction (ingress path is selected if the flag - * is present, egress path otherwise). Currently, XDP only - * supports redirection to the egress interface, and accepts no - * flag at all. - * - * The same effect can also be attained with the more generic - * **bpf_redirect_map**\ (), which uses a BPF map to store the - * redirect target instead of providing it directly to the helper. - * - * Returns - * For XDP, the helper returns **XDP_REDIRECT** on success or - * **XDP_ABORTED** on error. For other program types, the values - * are **TC_ACT_REDIRECT** on success or **TC_ACT_SHOT** on - * error. - */ -static long (*bpf_redirect)(__u32 ifindex, __u64 flags) = (void *) 23; - -/* - * bpf_get_route_realm - * - * Retrieve the realm or the route, that is to say the - * **tclassid** field of the destination for the *skb*. The - * indentifier retrieved is a user-provided tag, similar to the - * one used with the net_cls cgroup (see description for - * **bpf_get_cgroup_classid**\ () helper), but here this tag is - * held by a route (a destination entry), not by a task. - * - * Retrieving this identifier works with the clsact TC egress hook - * (see also **tc-bpf(8)**), or alternatively on conventional - * classful egress qdiscs, but not on TC ingress path. In case of - * clsact TC egress hook, this has the advantage that, internally, - * the destination entry has not been dropped yet in the transmit - * path. Therefore, the destination entry does not need to be - * artificially held via **netif_keep_dst**\ () for a classful - * qdisc until the *skb* is freed. - * - * This helper is available only if the kernel was compiled with - * **CONFIG_IP_ROUTE_CLASSID** configuration option. - * - * Returns - * The realm of the route for the packet associated to *skb*, or 0 - * if none was found. - */ -static __u32 (*bpf_get_route_realm)(struct __sk_buff *skb) = (void *) 24; - -/* - * bpf_perf_event_output - * - * Write raw *data* blob into a special BPF perf event held by - * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf - * event must have the following attributes: **PERF_SAMPLE_RAW** - * as **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and - * **PERF_COUNT_SW_BPF_OUTPUT** as **config**. - * - * The *flags* are used to indicate the index in *map* for which - * the value must be put, masked with **BPF_F_INDEX_MASK**. - * Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU** - * to indicate that the index of the current CPU core should be - * used. - * - * The value to write, of *size*, is passed through eBPF stack and - * pointed by *data*. - * - * The context of the program *ctx* needs also be passed to the - * helper. - * - * On user space, a program willing to read the values needs to - * call **perf_event_open**\ () on the perf event (either for - * one or for all CPUs) and to store the file descriptor into the - * *map*. This must be done before the eBPF program can send data - * into it. An example is available in file - * *samples/bpf/trace_output_user.c* in the Linux kernel source - * tree (the eBPF program counterpart is in - * *samples/bpf/trace_output_kern.c*). - * - * **bpf_perf_event_output**\ () achieves better performance - * than **bpf_trace_printk**\ () for sharing data with user - * space, and is much better suitable for streaming data from eBPF - * programs. - * - * Note that this helper is not restricted to tracing use cases - * and can be used with programs attached to TC or XDP as well, - * where it allows for passing data to user space listeners. Data - * can be: - * - * * Only custom structs, - * * Only the packet payload, or - * * A combination of both. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_perf_event_output)(void *ctx, void *map, __u64 flags, void *data, __u64 size) = (void *) 25; - -/* - * bpf_skb_load_bytes - * - * This helper was provided as an easy way to load data from a - * packet. It can be used to load *len* bytes from *offset* from - * the packet associated to *skb*, into the buffer pointed by - * *to*. - * - * Since Linux 4.7, usage of this helper has mostly been replaced - * by "direct packet access", enabling packet data to be - * manipulated with *skb*\ **->data** and *skb*\ **->data_end** - * pointing respectively to the first byte of packet data and to - * the byte after the last byte of packet data. However, it - * remains useful if one wishes to read large quantities of data - * at once from a packet into the eBPF stack. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_load_bytes)(const void *skb, __u32 offset, void *to, __u32 len) = (void *) 26; - -/* - * bpf_get_stackid - * - * Walk a user or a kernel stack and return its id. To achieve - * this, the helper needs *ctx*, which is a pointer to the context - * on which the tracing program is executed, and a pointer to a - * *map* of type **BPF_MAP_TYPE_STACK_TRACE**. - * - * The last argument, *flags*, holds the number of stack frames to - * skip (from 0 to 255), masked with - * **BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set - * a combination of the following flags: - * - * **BPF_F_USER_STACK** - * Collect a user space stack instead of a kernel stack. - * **BPF_F_FAST_STACK_CMP** - * Compare stacks by hash only. - * **BPF_F_REUSE_STACKID** - * If two different stacks hash into the same *stackid*, - * discard the old one. - * - * The stack id retrieved is a 32 bit long integer handle which - * can be further combined with other data (including other stack - * ids) and used as a key into maps. This can be useful for - * generating a variety of graphs (such as flame graphs or off-cpu - * graphs). - * - * For walking a stack, this helper is an improvement over - * **bpf_probe_read**\ (), which can be used with unrolled loops - * but is not efficient and consumes a lot of eBPF instructions. - * Instead, **bpf_get_stackid**\ () can collect up to - * **PERF_MAX_STACK_DEPTH** both kernel and user frames. Note that - * this limit can be controlled with the **sysctl** program, and - * that it should be manually increased in order to profile long - * user stacks (such as stacks for Java programs). To do so, use: - * - * :: - * - * # sysctl kernel.perf_event_max_stack= - * - * Returns - * The positive or null stack id on success, or a negative error - * in case of failure. - */ -static long (*bpf_get_stackid)(void *ctx, void *map, __u64 flags) = (void *) 27; - -/* - * bpf_csum_diff - * - * Compute a checksum difference, from the raw buffer pointed by - * *from*, of length *from_size* (that must be a multiple of 4), - * towards the raw buffer pointed by *to*, of size *to_size* - * (same remark). An optional *seed* can be added to the value - * (this can be cascaded, the seed may come from a previous call - * to the helper). - * - * This is flexible enough to be used in several ways: - * - * * With *from_size* == 0, *to_size* > 0 and *seed* set to - * checksum, it can be used when pushing new data. - * * With *from_size* > 0, *to_size* == 0 and *seed* set to - * checksum, it can be used when removing data from a packet. - * * With *from_size* > 0, *to_size* > 0 and *seed* set to 0, it - * can be used to compute a diff. Note that *from_size* and - * *to_size* do not need to be equal. - * - * This helper can be used in combination with - * **bpf_l3_csum_replace**\ () and **bpf_l4_csum_replace**\ (), to - * which one can feed in the difference computed with - * **bpf_csum_diff**\ (). - * - * Returns - * The checksum result, or a negative error code in case of - * failure. - */ -static __s64 (*bpf_csum_diff)(__be32 *from, __u32 from_size, __be32 *to, __u32 to_size, __wsum seed) = (void *) 28; - -/* - * bpf_skb_get_tunnel_opt - * - * Retrieve tunnel options metadata for the packet associated to - * *skb*, and store the raw tunnel option data to the buffer *opt* - * of *size*. - * - * This helper can be used with encapsulation devices that can - * operate in "collect metadata" mode (please refer to the related - * note in the description of **bpf_skb_get_tunnel_key**\ () for - * more details). A particular example where this can be used is - * in combination with the Geneve encapsulation protocol, where it - * allows for pushing (with **bpf_skb_get_tunnel_opt**\ () helper) - * and retrieving arbitrary TLVs (Type-Length-Value headers) from - * the eBPF program. This allows for full customization of these - * headers. - * - * Returns - * The size of the option data retrieved. - */ -static long (*bpf_skb_get_tunnel_opt)(struct __sk_buff *skb, void *opt, __u32 size) = (void *) 29; - -/* - * bpf_skb_set_tunnel_opt - * - * Set tunnel options metadata for the packet associated to *skb* - * to the option data contained in the raw buffer *opt* of *size*. - * - * See also the description of the **bpf_skb_get_tunnel_opt**\ () - * helper for additional information. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_set_tunnel_opt)(struct __sk_buff *skb, void *opt, __u32 size) = (void *) 30; - -/* - * bpf_skb_change_proto - * - * Change the protocol of the *skb* to *proto*. Currently - * supported are transition from IPv4 to IPv6, and from IPv6 to - * IPv4. The helper takes care of the groundwork for the - * transition, including resizing the socket buffer. The eBPF - * program is expected to fill the new headers, if any, via - * **skb_store_bytes**\ () and to recompute the checksums with - * **bpf_l3_csum_replace**\ () and **bpf_l4_csum_replace**\ - * (). The main case for this helper is to perform NAT64 - * operations out of an eBPF program. - * - * Internally, the GSO type is marked as dodgy so that headers are - * checked and segments are recalculated by the GSO/GRO engine. - * The size for GSO target is adapted as well. - * - * All values for *flags* are reserved for future usage, and must - * be left at zero. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_change_proto)(struct __sk_buff *skb, __be16 proto, __u64 flags) = (void *) 31; - -/* - * bpf_skb_change_type - * - * Change the packet type for the packet associated to *skb*. This - * comes down to setting *skb*\ **->pkt_type** to *type*, except - * the eBPF program does not have a write access to *skb*\ - * **->pkt_type** beside this helper. Using a helper here allows - * for graceful handling of errors. - * - * The major use case is to change incoming *skb*s to - * **PACKET_HOST** in a programmatic way instead of having to - * recirculate via **redirect**\ (..., **BPF_F_INGRESS**), for - * example. - * - * Note that *type* only allows certain values. At this time, they - * are: - * - * **PACKET_HOST** - * Packet is for us. - * **PACKET_BROADCAST** - * Send packet to all. - * **PACKET_MULTICAST** - * Send packet to group. - * **PACKET_OTHERHOST** - * Send packet to someone else. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_change_type)(struct __sk_buff *skb, __u32 type) = (void *) 32; - -/* - * bpf_skb_under_cgroup - * - * Check whether *skb* is a descendant of the cgroup2 held by - * *map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*. - * - * Returns - * The return value depends on the result of the test, and can be: - * - * * 0, if the *skb* failed the cgroup2 descendant test. - * * 1, if the *skb* succeeded the cgroup2 descendant test. - * * A negative error code, if an error occurred. - */ -static long (*bpf_skb_under_cgroup)(struct __sk_buff *skb, void *map, __u32 index) = (void *) 33; - -/* - * bpf_get_hash_recalc - * - * Retrieve the hash of the packet, *skb*\ **->hash**. If it is - * not set, in particular if the hash was cleared due to mangling, - * recompute this hash. Later accesses to the hash can be done - * directly with *skb*\ **->hash**. - * - * Calling **bpf_set_hash_invalid**\ (), changing a packet - * prototype with **bpf_skb_change_proto**\ (), or calling - * **bpf_skb_store_bytes**\ () with the - * **BPF_F_INVALIDATE_HASH** are actions susceptible to clear - * the hash and to trigger a new computation for the next call to - * **bpf_get_hash_recalc**\ (). - * - * Returns - * The 32-bit hash. - */ -static __u32 (*bpf_get_hash_recalc)(struct __sk_buff *skb) = (void *) 34; - -/* - * bpf_get_current_task - * - * - * Returns - * A pointer to the current task struct. - */ -static __u64 (*bpf_get_current_task)(void) = (void *) 35; - -/* - * bpf_probe_write_user - * - * Attempt in a safe way to write *len* bytes from the buffer - * *src* to *dst* in memory. It only works for threads that are in - * user context, and *dst* must be a valid user space address. - * - * This helper should not be used to implement any kind of - * security mechanism because of TOC-TOU attacks, but rather to - * debug, divert, and manipulate execution of semi-cooperative - * processes. - * - * Keep in mind that this feature is meant for experiments, and it - * has a risk of crashing the system and running programs. - * Therefore, when an eBPF program using this helper is attached, - * a warning including PID and process name is printed to kernel - * logs. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_probe_write_user)(void *dst, const void *src, __u32 len) = (void *) 36; - -/* - * bpf_current_task_under_cgroup - * - * Check whether the probe is being run is the context of a given - * subset of the cgroup2 hierarchy. The cgroup2 to test is held by - * *map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*. - * - * Returns - * The return value depends on the result of the test, and can be: - * - * * 0, if the *skb* task belongs to the cgroup2. - * * 1, if the *skb* task does not belong to the cgroup2. - * * A negative error code, if an error occurred. - */ -static long (*bpf_current_task_under_cgroup)(void *map, __u32 index) = (void *) 37; - -/* - * bpf_skb_change_tail - * - * Resize (trim or grow) the packet associated to *skb* to the - * new *len*. The *flags* are reserved for future usage, and must - * be left at zero. - * - * The basic idea is that the helper performs the needed work to - * change the size of the packet, then the eBPF program rewrites - * the rest via helpers like **bpf_skb_store_bytes**\ (), - * **bpf_l3_csum_replace**\ (), **bpf_l3_csum_replace**\ () - * and others. This helper is a slow path utility intended for - * replies with control messages. And because it is targeted for - * slow path, the helper itself can afford to be slow: it - * implicitly linearizes, unclones and drops offloads from the - * *skb*. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_change_tail)(struct __sk_buff *skb, __u32 len, __u64 flags) = (void *) 38; - -/* - * bpf_skb_pull_data - * - * Pull in non-linear data in case the *skb* is non-linear and not - * all of *len* are part of the linear section. Make *len* bytes - * from *skb* readable and writable. If a zero value is passed for - * *len*, then the whole length of the *skb* is pulled. - * - * This helper is only needed for reading and writing with direct - * packet access. - * - * For direct packet access, testing that offsets to access - * are within packet boundaries (test on *skb*\ **->data_end**) is - * susceptible to fail if offsets are invalid, or if the requested - * data is in non-linear parts of the *skb*. On failure the - * program can just bail out, or in the case of a non-linear - * buffer, use a helper to make the data available. The - * **bpf_skb_load_bytes**\ () helper is a first solution to access - * the data. Another one consists in using **bpf_skb_pull_data** - * to pull in once the non-linear parts, then retesting and - * eventually access the data. - * - * At the same time, this also makes sure the *skb* is uncloned, - * which is a necessary condition for direct write. As this needs - * to be an invariant for the write part only, the verifier - * detects writes and adds a prologue that is calling - * **bpf_skb_pull_data()** to effectively unclone the *skb* from - * the very beginning in case it is indeed cloned. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_pull_data)(struct __sk_buff *skb, __u32 len) = (void *) 39; - -/* - * bpf_csum_update - * - * Add the checksum *csum* into *skb*\ **->csum** in case the - * driver has supplied a checksum for the entire packet into that - * field. Return an error otherwise. This helper is intended to be - * used in combination with **bpf_csum_diff**\ (), in particular - * when the checksum needs to be updated after data has been - * written into the packet through direct packet access. - * - * Returns - * The checksum on success, or a negative error code in case of - * failure. - */ -static __s64 (*bpf_csum_update)(struct __sk_buff *skb, __wsum csum) = (void *) 40; - -/* - * bpf_set_hash_invalid - * - * Invalidate the current *skb*\ **->hash**. It can be used after - * mangling on headers through direct packet access, in order to - * indicate that the hash is outdated and to trigger a - * recalculation the next time the kernel tries to access this - * hash or when the **bpf_get_hash_recalc**\ () helper is called. - * - */ -static void (*bpf_set_hash_invalid)(struct __sk_buff *skb) = (void *) 41; - -/* - * bpf_get_numa_node_id - * - * Return the id of the current NUMA node. The primary use case - * for this helper is the selection of sockets for the local NUMA - * node, when the program is attached to sockets using the - * **SO_ATTACH_REUSEPORT_EBPF** option (see also **socket(7)**), - * but the helper is also available to other eBPF program types, - * similarly to **bpf_get_smp_processor_id**\ (). - * - * Returns - * The id of current NUMA node. - */ -static long (*bpf_get_numa_node_id)(void) = (void *) 42; - -/* - * bpf_skb_change_head - * - * Grows headroom of packet associated to *skb* and adjusts the - * offset of the MAC header accordingly, adding *len* bytes of - * space. It automatically extends and reallocates memory as - * required. - * - * This helper can be used on a layer 3 *skb* to push a MAC header - * for redirection into a layer 2 device. - * - * All values for *flags* are reserved for future usage, and must - * be left at zero. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_change_head)(struct __sk_buff *skb, __u32 len, __u64 flags) = (void *) 43; - -/* - * bpf_xdp_adjust_head - * - * Adjust (move) *xdp_md*\ **->data** by *delta* bytes. Note that - * it is possible to use a negative value for *delta*. This helper - * can be used to prepare the packet for pushing or popping - * headers. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_xdp_adjust_head)(struct xdp_md *xdp_md, int delta) = (void *) 44; - -/* - * bpf_probe_read_str - * - * Copy a NUL terminated string from an unsafe kernel address - * *unsafe_ptr* to *dst*. See **bpf_probe_read_kernel_str**\ () for - * more details. - * - * Generally, use **bpf_probe_read_user_str**\ () or - * **bpf_probe_read_kernel_str**\ () instead. - * - * Returns - * On success, the strictly positive length of the string, - * including the trailing NUL character. On error, a negative - * value. - */ -static long (*bpf_probe_read_str)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 45; - -/* - * bpf_get_socket_cookie - * - * If the **struct sk_buff** pointed by *skb* has a known socket, - * retrieve the cookie (generated by the kernel) of this socket. - * If no cookie has been set yet, generate a new cookie. Once - * generated, the socket cookie remains stable for the life of the - * socket. This helper can be useful for monitoring per socket - * networking traffic statistics as it provides a global socket - * identifier that can be assumed unique. - * - * Returns - * A 8-byte long non-decreasing number on success, or 0 if the - * socket field is missing inside *skb*. - */ -static __u64 (*bpf_get_socket_cookie)(void *ctx) = (void *) 46; - -/* - * bpf_get_socket_uid - * - * - * Returns - * The owner UID of the socket associated to *skb*. If the socket - * is **NULL**, or if it is not a full socket (i.e. if it is a - * time-wait or a request socket instead), **overflowuid** value - * is returned (note that **overflowuid** might also be the actual - * UID value for the socket). - */ -static __u32 (*bpf_get_socket_uid)(struct __sk_buff *skb) = (void *) 47; - -/* - * bpf_set_hash - * - * Set the full hash for *skb* (set the field *skb*\ **->hash**) - * to value *hash*. - * - * Returns - * 0 - */ -static long (*bpf_set_hash)(struct __sk_buff *skb, __u32 hash) = (void *) 48; - -/* - * bpf_setsockopt - * - * Emulate a call to **setsockopt()** on the socket associated to - * *bpf_socket*, which must be a full socket. The *level* at - * which the option resides and the name *optname* of the option - * must be specified, see **setsockopt(2)** for more information. - * The option value of length *optlen* is pointed by *optval*. - * - * *bpf_socket* should be one of the following: - * - * * **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**. - * * **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT** - * and **BPF_CGROUP_INET6_CONNECT**. - * - * This helper actually implements a subset of **setsockopt()**. - * It supports the following *level*\ s: - * - * * **SOL_SOCKET**, which supports the following *optname*\ s: - * **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**, - * **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**, - * **SO_BINDTODEVICE**, **SO_KEEPALIVE**. - * * **IPPROTO_TCP**, which supports the following *optname*\ s: - * **TCP_CONGESTION**, **TCP_BPF_IW**, - * **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**, - * **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**, - * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**. - * * **IPPROTO_IP**, which supports *optname* **IP_TOS**. - * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_setsockopt)(void *bpf_socket, int level, int optname, void *optval, int optlen) = (void *) 49; - -/* - * bpf_skb_adjust_room - * - * Grow or shrink the room for data in the packet associated to - * *skb* by *len_diff*, and according to the selected *mode*. - * - * By default, the helper will reset any offloaded checksum - * indicator of the skb to CHECKSUM_NONE. This can be avoided - * by the following flag: - * - * * **BPF_F_ADJ_ROOM_NO_CSUM_RESET**: Do not reset offloaded - * checksum data of the skb to CHECKSUM_NONE. - * - * There are two supported modes at this time: - * - * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer - * (room space is added or removed below the layer 2 header). - * - * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer - * (room space is added or removed below the layer 3 header). - * - * The following flags are supported at this time: - * - * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size. - * Adjusting mss in this way is not allowed for datagrams. - * - * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4**, - * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6**: - * Any new space is reserved to hold a tunnel header. - * Configure skb offsets and other fields accordingly. - * - * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE**, - * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP**: - * Use with ENCAP_L3 flags to further specify the tunnel type. - * - * * **BPF_F_ADJ_ROOM_ENCAP_L2**\ (*len*): - * Use with ENCAP_L3/L4 flags to further specify the tunnel - * type; *len* is the length of the inner MAC header. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_adjust_room)(struct __sk_buff *skb, __s32 len_diff, __u32 mode, __u64 flags) = (void *) 50; - -/* - * bpf_redirect_map - * - * Redirect the packet to the endpoint referenced by *map* at - * index *key*. Depending on its type, this *map* can contain - * references to net devices (for forwarding packets through other - * ports), or to CPUs (for redirecting XDP frames to another CPU; - * but this is only implemented for native XDP (with driver - * support) as of this writing). - * - * The lower two bits of *flags* are used as the return code if - * the map lookup fails. This is so that the return value can be - * one of the XDP program return codes up to **XDP_TX**, as chosen - * by the caller. Any higher bits in the *flags* argument must be - * unset. - * - * See also **bpf_redirect**\ (), which only supports redirecting - * to an ifindex, but doesn't require a map to do so. - * - * Returns - * **XDP_REDIRECT** on success, or the value of the two lower bits - * of the *flags* argument on error. - */ -static long (*bpf_redirect_map)(void *map, __u32 key, __u64 flags) = (void *) 51; - -/* - * bpf_sk_redirect_map - * - * Redirect the packet to the socket referenced by *map* (of type - * **BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and - * egress interfaces can be used for redirection. The - * **BPF_F_INGRESS** value in *flags* is used to make the - * distinction (ingress path is selected if the flag is present, - * egress path otherwise). This is the only flag supported for now. - * - * Returns - * **SK_PASS** on success, or **SK_DROP** on error. - */ -static long (*bpf_sk_redirect_map)(struct __sk_buff *skb, void *map, __u32 key, __u64 flags) = (void *) 52; - -/* - * bpf_sock_map_update - * - * Add an entry to, or update a *map* referencing sockets. The - * *skops* is used as a new value for the entry associated to - * *key*. *flags* is one of: - * - * **BPF_NOEXIST** - * The entry for *key* must not exist in the map. - * **BPF_EXIST** - * The entry for *key* must already exist in the map. - * **BPF_ANY** - * No condition on the existence of the entry for *key*. - * - * If the *map* has eBPF programs (parser and verdict), those will - * be inherited by the socket being added. If the socket is - * already attached to eBPF programs, this results in an error. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_sock_map_update)(struct bpf_sock_ops *skops, void *map, void *key, __u64 flags) = (void *) 53; - -/* - * bpf_xdp_adjust_meta - * - * Adjust the address pointed by *xdp_md*\ **->data_meta** by - * *delta* (which can be positive or negative). Note that this - * operation modifies the address stored in *xdp_md*\ **->data**, - * so the latter must be loaded only after the helper has been - * called. - * - * The use of *xdp_md*\ **->data_meta** is optional and programs - * are not required to use it. The rationale is that when the - * packet is processed with XDP (e.g. as DoS filter), it is - * possible to push further meta data along with it before passing - * to the stack, and to give the guarantee that an ingress eBPF - * program attached as a TC classifier on the same device can pick - * this up for further post-processing. Since TC works with socket - * buffers, it remains possible to set from XDP the **mark** or - * **priority** pointers, or other pointers for the socket buffer. - * Having this scratch space generic and programmable allows for - * more flexibility as the user is free to store whatever meta - * data they need. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_xdp_adjust_meta)(struct xdp_md *xdp_md, int delta) = (void *) 54; - -/* - * bpf_perf_event_read_value - * - * Read the value of a perf event counter, and store it into *buf* - * of size *buf_size*. This helper relies on a *map* of type - * **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. The nature of the perf event - * counter is selected when *map* is updated with perf event file - * descriptors. The *map* is an array whose size is the number of - * available CPUs, and each cell contains a value relative to one - * CPU. The value to retrieve is indicated by *flags*, that - * contains the index of the CPU to look up, masked with - * **BPF_F_INDEX_MASK**. Alternatively, *flags* can be set to - * **BPF_F_CURRENT_CPU** to indicate that the value for the - * current CPU should be retrieved. - * - * This helper behaves in a way close to - * **bpf_perf_event_read**\ () helper, save that instead of - * just returning the value observed, it fills the *buf* - * structure. This allows for additional data to be retrieved: in - * particular, the enabled and running times (in *buf*\ - * **->enabled** and *buf*\ **->running**, respectively) are - * copied. In general, **bpf_perf_event_read_value**\ () is - * recommended over **bpf_perf_event_read**\ (), which has some - * ABI issues and provides fewer functionalities. - * - * These values are interesting, because hardware PMU (Performance - * Monitoring Unit) counters are limited resources. When there are - * more PMU based perf events opened than available counters, - * kernel will multiplex these events so each event gets certain - * percentage (but not all) of the PMU time. In case that - * multiplexing happens, the number of samples or counter value - * will not reflect the case compared to when no multiplexing - * occurs. This makes comparison between different runs difficult. - * Typically, the counter value should be normalized before - * comparing to other experiments. The usual normalization is done - * as follows. - * - * :: - * - * normalized_counter = counter * t_enabled / t_running - * - * Where t_enabled is the time enabled for event and t_running is - * the time running for event since last normalization. The - * enabled and running times are accumulated since the perf event - * open. To achieve scaling factor between two invocations of an - * eBPF program, users can use CPU id as the key (which is - * typical for perf array usage model) to remember the previous - * value and do the calculation inside the eBPF program. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_perf_event_read_value)(void *map, __u64 flags, struct bpf_perf_event_value *buf, __u32 buf_size) = (void *) 55; - -/* - * bpf_perf_prog_read_value - * - * For en eBPF program attached to a perf event, retrieve the - * value of the event counter associated to *ctx* and store it in - * the structure pointed by *buf* and of size *buf_size*. Enabled - * and running times are also stored in the structure (see - * description of helper **bpf_perf_event_read_value**\ () for - * more details). - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_perf_prog_read_value)(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, __u32 buf_size) = (void *) 56; - -/* - * bpf_getsockopt - * - * Emulate a call to **getsockopt()** on the socket associated to - * *bpf_socket*, which must be a full socket. The *level* at - * which the option resides and the name *optname* of the option - * must be specified, see **getsockopt(2)** for more information. - * The retrieved value is stored in the structure pointed by - * *opval* and of length *optlen*. - * - * *bpf_socket* should be one of the following: - * - * * **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**. - * * **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT** - * and **BPF_CGROUP_INET6_CONNECT**. - * - * This helper actually implements a subset of **getsockopt()**. - * It supports the following *level*\ s: - * - * * **IPPROTO_TCP**, which supports *optname* - * **TCP_CONGESTION**. - * * **IPPROTO_IP**, which supports *optname* **IP_TOS**. - * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_getsockopt)(void *bpf_socket, int level, int optname, void *optval, int optlen) = (void *) 57; - -/* - * bpf_override_return - * - * Used for error injection, this helper uses kprobes to override - * the return value of the probed function, and to set it to *rc*. - * The first argument is the context *regs* on which the kprobe - * works. - * - * This helper works by setting the PC (program counter) - * to an override function which is run in place of the original - * probed function. This means the probed function is not run at - * all. The replacement function just returns with the required - * value. - * - * This helper has security implications, and thus is subject to - * restrictions. It is only available if the kernel was compiled - * with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration - * option, and in this case it only works on functions tagged with - * **ALLOW_ERROR_INJECTION** in the kernel code. - * - * Also, the helper is only available for the architectures having - * the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing, - * x86 architecture is the only one to support this feature. - * - * Returns - * 0 - */ -static long (*bpf_override_return)(struct pt_regs *regs, __u64 rc) = (void *) 58; - -/* - * bpf_sock_ops_cb_flags_set - * - * Attempt to set the value of the **bpf_sock_ops_cb_flags** field - * for the full TCP socket associated to *bpf_sock_ops* to - * *argval*. - * - * The primary use of this field is to determine if there should - * be calls to eBPF programs of type - * **BPF_PROG_TYPE_SOCK_OPS** at various points in the TCP - * code. A program of the same type can change its value, per - * connection and as necessary, when the connection is - * established. This field is directly accessible for reading, but - * this helper must be used for updates in order to return an - * error if an eBPF program tries to set a callback that is not - * supported in the current kernel. - * - * *argval* is a flag array which can combine these flags: - * - * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) - * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) - * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) - * * **BPF_SOCK_OPS_RTT_CB_FLAG** (every RTT) - * - * Therefore, this function can be used to clear a callback flag by - * setting the appropriate bit to zero. e.g. to disable the RTO - * callback: - * - * **bpf_sock_ops_cb_flags_set(bpf_sock,** - * **bpf_sock->bpf_sock_ops_cb_flags & ~BPF_SOCK_OPS_RTO_CB_FLAG)** - * - * Here are some examples of where one could call such eBPF - * program: - * - * * When RTO fires. - * * When a packet is retransmitted. - * * When the connection terminates. - * * When a packet is sent. - * * When a packet is received. - * - * Returns - * Code **-EINVAL** if the socket is not a full TCP socket; - * otherwise, a positive number containing the bits that could not - * be set is returned (which comes down to 0 if all bits were set - * as required). - */ -static long (*bpf_sock_ops_cb_flags_set)(struct bpf_sock_ops *bpf_sock, int argval) = (void *) 59; - -/* - * bpf_msg_redirect_map - * - * This helper is used in programs implementing policies at the - * socket level. If the message *msg* is allowed to pass (i.e. if - * the verdict eBPF program returns **SK_PASS**), redirect it to - * the socket referenced by *map* (of type - * **BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and - * egress interfaces can be used for redirection. The - * **BPF_F_INGRESS** value in *flags* is used to make the - * distinction (ingress path is selected if the flag is present, - * egress path otherwise). This is the only flag supported for now. - * - * Returns - * **SK_PASS** on success, or **SK_DROP** on error. - */ -static long (*bpf_msg_redirect_map)(struct sk_msg_md *msg, void *map, __u32 key, __u64 flags) = (void *) 60; - -/* - * bpf_msg_apply_bytes - * - * For socket policies, apply the verdict of the eBPF program to - * the next *bytes* (number of bytes) of message *msg*. - * - * For example, this helper can be used in the following cases: - * - * * A single **sendmsg**\ () or **sendfile**\ () system call - * contains multiple logical messages that the eBPF program is - * supposed to read and for which it should apply a verdict. - * * An eBPF program only cares to read the first *bytes* of a - * *msg*. If the message has a large payload, then setting up - * and calling the eBPF program repeatedly for all bytes, even - * though the verdict is already known, would create unnecessary - * overhead. - * - * When called from within an eBPF program, the helper sets a - * counter internal to the BPF infrastructure, that is used to - * apply the last verdict to the next *bytes*. If *bytes* is - * smaller than the current data being processed from a - * **sendmsg**\ () or **sendfile**\ () system call, the first - * *bytes* will be sent and the eBPF program will be re-run with - * the pointer for start of data pointing to byte number *bytes* - * **+ 1**. If *bytes* is larger than the current data being - * processed, then the eBPF verdict will be applied to multiple - * **sendmsg**\ () or **sendfile**\ () calls until *bytes* are - * consumed. - * - * Note that if a socket closes with the internal counter holding - * a non-zero value, this is not a problem because data is not - * being buffered for *bytes* and is sent as it is received. - * - * Returns - * 0 - */ -static long (*bpf_msg_apply_bytes)(struct sk_msg_md *msg, __u32 bytes) = (void *) 61; - -/* - * bpf_msg_cork_bytes - * - * For socket policies, prevent the execution of the verdict eBPF - * program for message *msg* until *bytes* (byte number) have been - * accumulated. - * - * This can be used when one needs a specific number of bytes - * before a verdict can be assigned, even if the data spans - * multiple **sendmsg**\ () or **sendfile**\ () calls. The extreme - * case would be a user calling **sendmsg**\ () repeatedly with - * 1-byte long message segments. Obviously, this is bad for - * performance, but it is still valid. If the eBPF program needs - * *bytes* bytes to validate a header, this helper can be used to - * prevent the eBPF program to be called again until *bytes* have - * been accumulated. - * - * Returns - * 0 - */ -static long (*bpf_msg_cork_bytes)(struct sk_msg_md *msg, __u32 bytes) = (void *) 62; - -/* - * bpf_msg_pull_data - * - * For socket policies, pull in non-linear data from user space - * for *msg* and set pointers *msg*\ **->data** and *msg*\ - * **->data_end** to *start* and *end* bytes offsets into *msg*, - * respectively. - * - * If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a - * *msg* it can only parse data that the (**data**, **data_end**) - * pointers have already consumed. For **sendmsg**\ () hooks this - * is likely the first scatterlist element. But for calls relying - * on the **sendpage** handler (e.g. **sendfile**\ ()) this will - * be the range (**0**, **0**) because the data is shared with - * user space and by default the objective is to avoid allowing - * user space to modify data while (or after) eBPF verdict is - * being decided. This helper can be used to pull in data and to - * set the start and end pointer to given values. Data will be - * copied if necessary (i.e. if data was not linear and if start - * and end pointers do not point to the same chunk). - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * All values for *flags* are reserved for future usage, and must - * be left at zero. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_msg_pull_data)(struct sk_msg_md *msg, __u32 start, __u32 end, __u64 flags) = (void *) 63; - -/* - * bpf_bind - * - * Bind the socket associated to *ctx* to the address pointed by - * *addr*, of length *addr_len*. This allows for making outgoing - * connection from the desired IP address, which can be useful for - * example when all processes inside a cgroup should use one - * single IP address on a host that has multiple IP configured. - * - * This helper works for IPv4 and IPv6, TCP and UDP sockets. The - * domain (*addr*\ **->sa_family**) must be **AF_INET** (or - * **AF_INET6**). It's advised to pass zero port (**sin_port** - * or **sin6_port**) which triggers IP_BIND_ADDRESS_NO_PORT-like - * behavior and lets the kernel efficiently pick up an unused - * port as long as 4-tuple is unique. Passing non-zero port might - * lead to degraded performance. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_bind)(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len) = (void *) 64; - -/* - * bpf_xdp_adjust_tail - * - * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is - * possible to both shrink and grow the packet tail. - * Shrink done via *delta* being a negative integer. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_xdp_adjust_tail)(struct xdp_md *xdp_md, int delta) = (void *) 65; - -/* - * bpf_skb_get_xfrm_state - * - * Retrieve the XFRM state (IP transform framework, see also - * **ip-xfrm(8)**) at *index* in XFRM "security path" for *skb*. - * - * The retrieved value is stored in the **struct bpf_xfrm_state** - * pointed by *xfrm_state* and of length *size*. - * - * All values for *flags* are reserved for future usage, and must - * be left at zero. - * - * This helper is available only if the kernel was compiled with - * **CONFIG_XFRM** configuration option. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_get_xfrm_state)(struct __sk_buff *skb, __u32 index, struct bpf_xfrm_state *xfrm_state, __u32 size, __u64 flags) = (void *) 66; - -/* - * bpf_get_stack - * - * Return a user or a kernel stack in bpf program provided buffer. - * To achieve this, the helper needs *ctx*, which is a pointer - * to the context on which the tracing program is executed. - * To store the stacktrace, the bpf program provides *buf* with - * a nonnegative *size*. - * - * The last argument, *flags*, holds the number of stack frames to - * skip (from 0 to 255), masked with - * **BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set - * the following flags: - * - * **BPF_F_USER_STACK** - * Collect a user space stack instead of a kernel stack. - * **BPF_F_USER_BUILD_ID** - * Collect buildid+offset instead of ips for user stack, - * only valid if **BPF_F_USER_STACK** is also specified. - * - * **bpf_get_stack**\ () can collect up to - * **PERF_MAX_STACK_DEPTH** both kernel and user frames, subject - * to sufficient large buffer size. Note that - * this limit can be controlled with the **sysctl** program, and - * that it should be manually increased in order to profile long - * user stacks (such as stacks for Java programs). To do so, use: - * - * :: - * - * # sysctl kernel.perf_event_max_stack= - * - * Returns - * A non-negative value equal to or less than *size* on success, - * or a negative error in case of failure. - */ -static long (*bpf_get_stack)(void *ctx, void *buf, __u32 size, __u64 flags) = (void *) 67; - -/* - * bpf_skb_load_bytes_relative - * - * This helper is similar to **bpf_skb_load_bytes**\ () in that - * it provides an easy way to load *len* bytes from *offset* - * from the packet associated to *skb*, into the buffer pointed - * by *to*. The difference to **bpf_skb_load_bytes**\ () is that - * a fifth argument *start_header* exists in order to select a - * base offset to start from. *start_header* can be one of: - * - * **BPF_HDR_START_MAC** - * Base offset to load data from is *skb*'s mac header. - * **BPF_HDR_START_NET** - * Base offset to load data from is *skb*'s network header. - * - * In general, "direct packet access" is the preferred method to - * access packet data, however, this helper is in particular useful - * in socket filters where *skb*\ **->data** does not always point - * to the start of the mac header and where "direct packet access" - * is not available. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_load_bytes_relative)(const void *skb, __u32 offset, void *to, __u32 len, __u32 start_header) = (void *) 68; - -/* - * bpf_fib_lookup - * - * Do FIB lookup in kernel tables using parameters in *params*. - * If lookup is successful and result shows packet is to be - * forwarded, the neighbor tables are searched for the nexthop. - * If successful (ie., FIB lookup shows forwarding and nexthop - * is resolved), the nexthop address is returned in ipv4_dst - * or ipv6_dst based on family, smac is set to mac address of - * egress device, dmac is set to nexthop mac address, rt_metric - * is set to metric from route (IPv4/IPv6 only), and ifindex - * is set to the device index of the nexthop from the FIB lookup. - * - * *plen* argument is the size of the passed in struct. - * *flags* argument can be a combination of one or more of the - * following values: - * - * **BPF_FIB_LOOKUP_DIRECT** - * Do a direct table lookup vs full lookup using FIB - * rules. - * **BPF_FIB_LOOKUP_OUTPUT** - * Perform lookup from an egress perspective (default is - * ingress). - * - * *ctx* is either **struct xdp_md** for XDP programs or - * **struct sk_buff** tc cls_act programs. - * - * Returns - * * < 0 if any input argument is invalid - * * 0 on success (packet is forwarded, nexthop neighbor exists) - * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the - * packet is not forwarded or needs assist from full stack - */ -static long (*bpf_fib_lookup)(void *ctx, struct bpf_fib_lookup *params, int plen, __u32 flags) = (void *) 69; - -/* - * bpf_sock_hash_update - * - * Add an entry to, or update a sockhash *map* referencing sockets. - * The *skops* is used as a new value for the entry associated to - * *key*. *flags* is one of: - * - * **BPF_NOEXIST** - * The entry for *key* must not exist in the map. - * **BPF_EXIST** - * The entry for *key* must already exist in the map. - * **BPF_ANY** - * No condition on the existence of the entry for *key*. - * - * If the *map* has eBPF programs (parser and verdict), those will - * be inherited by the socket being added. If the socket is - * already attached to eBPF programs, this results in an error. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_sock_hash_update)(struct bpf_sock_ops *skops, void *map, void *key, __u64 flags) = (void *) 70; - -/* - * bpf_msg_redirect_hash - * - * This helper is used in programs implementing policies at the - * socket level. If the message *msg* is allowed to pass (i.e. if - * the verdict eBPF program returns **SK_PASS**), redirect it to - * the socket referenced by *map* (of type - * **BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and - * egress interfaces can be used for redirection. The - * **BPF_F_INGRESS** value in *flags* is used to make the - * distinction (ingress path is selected if the flag is present, - * egress path otherwise). This is the only flag supported for now. - * - * Returns - * **SK_PASS** on success, or **SK_DROP** on error. - */ -static long (*bpf_msg_redirect_hash)(struct sk_msg_md *msg, void *map, void *key, __u64 flags) = (void *) 71; - -/* - * bpf_sk_redirect_hash - * - * This helper is used in programs implementing policies at the - * skb socket level. If the sk_buff *skb* is allowed to pass (i.e. - * if the verdeict eBPF program returns **SK_PASS**), redirect it - * to the socket referenced by *map* (of type - * **BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and - * egress interfaces can be used for redirection. The - * **BPF_F_INGRESS** value in *flags* is used to make the - * distinction (ingress path is selected if the flag is present, - * egress otherwise). This is the only flag supported for now. - * - * Returns - * **SK_PASS** on success, or **SK_DROP** on error. - */ -static long (*bpf_sk_redirect_hash)(struct __sk_buff *skb, void *map, void *key, __u64 flags) = (void *) 72; - -/* - * bpf_lwt_push_encap - * - * Encapsulate the packet associated to *skb* within a Layer 3 - * protocol header. This header is provided in the buffer at - * address *hdr*, with *len* its size in bytes. *type* indicates - * the protocol of the header and can be one of: - * - * **BPF_LWT_ENCAP_SEG6** - * IPv6 encapsulation with Segment Routing Header - * (**struct ipv6_sr_hdr**). *hdr* only contains the SRH, - * the IPv6 header is computed by the kernel. - * **BPF_LWT_ENCAP_SEG6_INLINE** - * Only works if *skb* contains an IPv6 packet. Insert a - * Segment Routing Header (**struct ipv6_sr_hdr**) inside - * the IPv6 header. - * **BPF_LWT_ENCAP_IP** - * IP encapsulation (GRE/GUE/IPIP/etc). The outer header - * must be IPv4 or IPv6, followed by zero or more - * additional headers, up to **LWT_BPF_MAX_HEADROOM** - * total bytes in all prepended headers. Please note that - * if **skb_is_gso**\ (*skb*) is true, no more than two - * headers can be prepended, and the inner header, if - * present, should be either GRE or UDP/GUE. - * - * **BPF_LWT_ENCAP_SEG6**\ \* types can be called by BPF programs - * of type **BPF_PROG_TYPE_LWT_IN**; **BPF_LWT_ENCAP_IP** type can - * be called by bpf programs of types **BPF_PROG_TYPE_LWT_IN** and - * **BPF_PROG_TYPE_LWT_XMIT**. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_lwt_push_encap)(struct __sk_buff *skb, __u32 type, void *hdr, __u32 len) = (void *) 73; - -/* - * bpf_lwt_seg6_store_bytes - * - * Store *len* bytes from address *from* into the packet - * associated to *skb*, at *offset*. Only the flags, tag and TLVs - * inside the outermost IPv6 Segment Routing Header can be - * modified through this helper. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_lwt_seg6_store_bytes)(struct __sk_buff *skb, __u32 offset, const void *from, __u32 len) = (void *) 74; - -/* - * bpf_lwt_seg6_adjust_srh - * - * Adjust the size allocated to TLVs in the outermost IPv6 - * Segment Routing Header contained in the packet associated to - * *skb*, at position *offset* by *delta* bytes. Only offsets - * after the segments are accepted. *delta* can be as well - * positive (growing) as negative (shrinking). - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_lwt_seg6_adjust_srh)(struct __sk_buff *skb, __u32 offset, __s32 delta) = (void *) 75; - -/* - * bpf_lwt_seg6_action - * - * Apply an IPv6 Segment Routing action of type *action* to the - * packet associated to *skb*. Each action takes a parameter - * contained at address *param*, and of length *param_len* bytes. - * *action* can be one of: - * - * **SEG6_LOCAL_ACTION_END_X** - * End.X action: Endpoint with Layer-3 cross-connect. - * Type of *param*: **struct in6_addr**. - * **SEG6_LOCAL_ACTION_END_T** - * End.T action: Endpoint with specific IPv6 table lookup. - * Type of *param*: **int**. - * **SEG6_LOCAL_ACTION_END_B6** - * End.B6 action: Endpoint bound to an SRv6 policy. - * Type of *param*: **struct ipv6_sr_hdr**. - * **SEG6_LOCAL_ACTION_END_B6_ENCAP** - * End.B6.Encap action: Endpoint bound to an SRv6 - * encapsulation policy. - * Type of *param*: **struct ipv6_sr_hdr**. - * - * A call to this helper is susceptible to change the underlying - * packet buffer. Therefore, at load time, all checks on pointers - * previously done by the verifier are invalidated and must be - * performed again, if the helper is used in combination with - * direct packet access. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_lwt_seg6_action)(struct __sk_buff *skb, __u32 action, void *param, __u32 param_len) = (void *) 76; - -/* - * bpf_rc_repeat - * - * This helper is used in programs implementing IR decoding, to - * report a successfully decoded repeat key message. This delays - * the generation of a key up event for previously generated - * key down event. - * - * Some IR protocols like NEC have a special IR message for - * repeating last button, for when a button is held down. - * - * The *ctx* should point to the lirc sample as passed into - * the program. - * - * This helper is only available is the kernel was compiled with - * the **CONFIG_BPF_LIRC_MODE2** configuration option set to - * "**y**". - * - * Returns - * 0 - */ -static long (*bpf_rc_repeat)(void *ctx) = (void *) 77; - -/* - * bpf_rc_keydown - * - * This helper is used in programs implementing IR decoding, to - * report a successfully decoded key press with *scancode*, - * *toggle* value in the given *protocol*. The scancode will be - * translated to a keycode using the rc keymap, and reported as - * an input key down event. After a period a key up event is - * generated. This period can be extended by calling either - * **bpf_rc_keydown**\ () again with the same values, or calling - * **bpf_rc_repeat**\ (). - * - * Some protocols include a toggle bit, in case the button was - * released and pressed again between consecutive scancodes. - * - * The *ctx* should point to the lirc sample as passed into - * the program. - * - * The *protocol* is the decoded protocol number (see - * **enum rc_proto** for some predefined values). - * - * This helper is only available is the kernel was compiled with - * the **CONFIG_BPF_LIRC_MODE2** configuration option set to - * "**y**". - * - * Returns - * 0 - */ -static long (*bpf_rc_keydown)(void *ctx, __u32 protocol, __u64 scancode, __u32 toggle) = (void *) 78; - -/* - * bpf_skb_cgroup_id - * - * Return the cgroup v2 id of the socket associated with the *skb*. - * This is roughly similar to the **bpf_get_cgroup_classid**\ () - * helper for cgroup v1 by providing a tag resp. identifier that - * can be matched on or used for map lookups e.g. to implement - * policy. The cgroup v2 id of a given path in the hierarchy is - * exposed in user space through the f_handle API in order to get - * to the same 64-bit id. - * - * This helper can be used on TC egress path, but not on ingress, - * and is available only if the kernel was compiled with the - * **CONFIG_SOCK_CGROUP_DATA** configuration option. - * - * Returns - * The id is returned or 0 in case the id could not be retrieved. - */ -static __u64 (*bpf_skb_cgroup_id)(struct __sk_buff *skb) = (void *) 79; - -/* - * bpf_get_current_cgroup_id - * - * - * Returns - * A 64-bit integer containing the current cgroup id based - * on the cgroup within which the current task is running. - */ -static __u64 (*bpf_get_current_cgroup_id)(void) = (void *) 80; - -/* - * bpf_get_local_storage - * - * Get the pointer to the local storage area. - * The type and the size of the local storage is defined - * by the *map* argument. - * The *flags* meaning is specific for each map type, - * and has to be 0 for cgroup local storage. - * - * Depending on the BPF program type, a local storage area - * can be shared between multiple instances of the BPF program, - * running simultaneously. - * - * A user should care about the synchronization by himself. - * For example, by using the **BPF_STX_XADD** instruction to alter - * the shared data. - * - * Returns - * A pointer to the local storage area. - */ -static void *(*bpf_get_local_storage)(void *map, __u64 flags) = (void *) 81; - -/* - * bpf_sk_select_reuseport - * - * Select a **SO_REUSEPORT** socket from a - * **BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*. - * It checks the selected socket is matching the incoming - * request in the socket buffer. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_sk_select_reuseport)(struct sk_reuseport_md *reuse, void *map, void *key, __u64 flags) = (void *) 82; - -/* - * bpf_skb_ancestor_cgroup_id - * - * Return id of cgroup v2 that is ancestor of cgroup associated - * with the *skb* at the *ancestor_level*. The root cgroup is at - * *ancestor_level* zero and each step down the hierarchy - * increments the level. If *ancestor_level* == level of cgroup - * associated with *skb*, then return value will be same as that - * of **bpf_skb_cgroup_id**\ (). - * - * The helper is useful to implement policies based on cgroups - * that are upper in hierarchy than immediate cgroup associated - * with *skb*. - * - * The format of returned id and helper limitations are same as in - * **bpf_skb_cgroup_id**\ (). - * - * Returns - * The id is returned or 0 in case the id could not be retrieved. - */ -static __u64 (*bpf_skb_ancestor_cgroup_id)(struct __sk_buff *skb, int ancestor_level) = (void *) 83; - -/* - * bpf_sk_lookup_tcp - * - * Look for TCP socket matching *tuple*, optionally in a child - * network namespace *netns*. The return value must be checked, - * and if non-**NULL**, released via **bpf_sk_release**\ (). - * - * The *ctx* should point to the context of the program, such as - * the skb or socket (depending on the hook in use). This is used - * to determine the base network namespace for the lookup. - * - * *tuple_size* must be one of: - * - * **sizeof**\ (*tuple*\ **->ipv4**) - * Look for an IPv4 socket. - * **sizeof**\ (*tuple*\ **->ipv6**) - * Look for an IPv6 socket. - * - * If the *netns* is a negative signed 32-bit integer, then the - * socket lookup table in the netns associated with the *ctx* - * will be used. For the TC hooks, this is the netns of the device - * in the skb. For socket hooks, this is the netns of the socket. - * If *netns* is any other signed 32-bit value greater than or - * equal to zero then it specifies the ID of the netns relative to - * the netns associated with the *ctx*. *netns* values beyond the - * range of 32-bit integers are reserved for future use. - * - * All values for *flags* are reserved for future usage, and must - * be left at zero. - * - * This helper is available only if the kernel was compiled with - * **CONFIG_NET** configuration option. - * - * Returns - * Pointer to **struct bpf_sock**, or **NULL** in case of failure. - * For sockets with reuseport option, the **struct bpf_sock** - * result is from *reuse*\ **->socks**\ [] using the hash of the - * tuple. - */ -static struct bpf_sock *(*bpf_sk_lookup_tcp)(void *ctx, struct bpf_sock_tuple *tuple, __u32 tuple_size, __u64 netns, __u64 flags) = (void *) 84; - -/* - * bpf_sk_lookup_udp - * - * Look for UDP socket matching *tuple*, optionally in a child - * network namespace *netns*. The return value must be checked, - * and if non-**NULL**, released via **bpf_sk_release**\ (). - * - * The *ctx* should point to the context of the program, such as - * the skb or socket (depending on the hook in use). This is used - * to determine the base network namespace for the lookup. - * - * *tuple_size* must be one of: - * - * **sizeof**\ (*tuple*\ **->ipv4**) - * Look for an IPv4 socket. - * **sizeof**\ (*tuple*\ **->ipv6**) - * Look for an IPv6 socket. - * - * If the *netns* is a negative signed 32-bit integer, then the - * socket lookup table in the netns associated with the *ctx* - * will be used. For the TC hooks, this is the netns of the device - * in the skb. For socket hooks, this is the netns of the socket. - * If *netns* is any other signed 32-bit value greater than or - * equal to zero then it specifies the ID of the netns relative to - * the netns associated with the *ctx*. *netns* values beyond the - * range of 32-bit integers are reserved for future use. - * - * All values for *flags* are reserved for future usage, and must - * be left at zero. - * - * This helper is available only if the kernel was compiled with - * **CONFIG_NET** configuration option. - * - * Returns - * Pointer to **struct bpf_sock**, or **NULL** in case of failure. - * For sockets with reuseport option, the **struct bpf_sock** - * result is from *reuse*\ **->socks**\ [] using the hash of the - * tuple. - */ -static struct bpf_sock *(*bpf_sk_lookup_udp)(void *ctx, struct bpf_sock_tuple *tuple, __u32 tuple_size, __u64 netns, __u64 flags) = (void *) 85; - -/* - * bpf_sk_release - * - * Release the reference held by *sock*. *sock* must be a - * non-**NULL** pointer that was returned from - * **bpf_sk_lookup_xxx**\ (). - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_sk_release)(struct bpf_sock *sock) = (void *) 86; - -/* - * bpf_map_push_elem - * - * Push an element *value* in *map*. *flags* is one of: - * - * **BPF_EXIST** - * If the queue/stack is full, the oldest element is - * removed to make room for this. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_map_push_elem)(void *map, const void *value, __u64 flags) = (void *) 87; - -/* - * bpf_map_pop_elem - * - * Pop an element from *map*. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_map_pop_elem)(void *map, void *value) = (void *) 88; - -/* - * bpf_map_peek_elem - * - * Get an element from *map* without removing it. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_map_peek_elem)(void *map, void *value) = (void *) 89; - -/* - * bpf_msg_push_data - * - * For socket policies, insert *len* bytes into *msg* at offset - * *start*. - * - * If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a - * *msg* it may want to insert metadata or options into the *msg*. - * This can later be read and used by any of the lower layer BPF - * hooks. - * - * This helper may fail if under memory pressure (a malloc - * fails) in these cases BPF programs will get an appropriate - * error and BPF programs will need to handle them. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_msg_push_data)(struct sk_msg_md *msg, __u32 start, __u32 len, __u64 flags) = (void *) 90; - -/* - * bpf_msg_pop_data - * - * Will remove *len* bytes from a *msg* starting at byte *start*. - * This may result in **ENOMEM** errors under certain situations if - * an allocation and copy are required due to a full ring buffer. - * However, the helper will try to avoid doing the allocation - * if possible. Other errors can occur if input parameters are - * invalid either due to *start* byte not being valid part of *msg* - * payload and/or *pop* value being to large. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_msg_pop_data)(struct sk_msg_md *msg, __u32 start, __u32 len, __u64 flags) = (void *) 91; - -/* - * bpf_rc_pointer_rel - * - * This helper is used in programs implementing IR decoding, to - * report a successfully decoded pointer movement. - * - * The *ctx* should point to the lirc sample as passed into - * the program. - * - * This helper is only available is the kernel was compiled with - * the **CONFIG_BPF_LIRC_MODE2** configuration option set to - * "**y**". - * - * Returns - * 0 - */ -static long (*bpf_rc_pointer_rel)(void *ctx, __s32 rel_x, __s32 rel_y) = (void *) 92; - -/* - * bpf_spin_lock - * - * Acquire a spinlock represented by the pointer *lock*, which is - * stored as part of a value of a map. Taking the lock allows to - * safely update the rest of the fields in that value. The - * spinlock can (and must) later be released with a call to - * **bpf_spin_unlock**\ (\ *lock*\ ). - * - * Spinlocks in BPF programs come with a number of restrictions - * and constraints: - * - * * **bpf_spin_lock** objects are only allowed inside maps of - * types **BPF_MAP_TYPE_HASH** and **BPF_MAP_TYPE_ARRAY** (this - * list could be extended in the future). - * * BTF description of the map is mandatory. - * * The BPF program can take ONE lock at a time, since taking two - * or more could cause dead locks. - * * Only one **struct bpf_spin_lock** is allowed per map element. - * * When the lock is taken, calls (either BPF to BPF or helpers) - * are not allowed. - * * The **BPF_LD_ABS** and **BPF_LD_IND** instructions are not - * allowed inside a spinlock-ed region. - * * The BPF program MUST call **bpf_spin_unlock**\ () to release - * the lock, on all execution paths, before it returns. - * * The BPF program can access **struct bpf_spin_lock** only via - * the **bpf_spin_lock**\ () and **bpf_spin_unlock**\ () - * helpers. Loading or storing data into the **struct - * bpf_spin_lock** *lock*\ **;** field of a map is not allowed. - * * To use the **bpf_spin_lock**\ () helper, the BTF description - * of the map value must be a struct and have **struct - * bpf_spin_lock** *anyname*\ **;** field at the top level. - * Nested lock inside another struct is not allowed. - * * The **struct bpf_spin_lock** *lock* field in a map value must - * be aligned on a multiple of 4 bytes in that value. - * * Syscall with command **BPF_MAP_LOOKUP_ELEM** does not copy - * the **bpf_spin_lock** field to user space. - * * Syscall with command **BPF_MAP_UPDATE_ELEM**, or update from - * a BPF program, do not update the **bpf_spin_lock** field. - * * **bpf_spin_lock** cannot be on the stack or inside a - * networking packet (it can only be inside of a map values). - * * **bpf_spin_lock** is available to root only. - * * Tracing programs and socket filter programs cannot use - * **bpf_spin_lock**\ () due to insufficient preemption checks - * (but this may change in the future). - * * **bpf_spin_lock** is not allowed in inner maps of map-in-map. - * - * Returns - * 0 - */ -static long (*bpf_spin_lock)(struct bpf_spin_lock *lock) = (void *) 93; - -/* - * bpf_spin_unlock - * - * Release the *lock* previously locked by a call to - * **bpf_spin_lock**\ (\ *lock*\ ). - * - * Returns - * 0 - */ -static long (*bpf_spin_unlock)(struct bpf_spin_lock *lock) = (void *) 94; - -/* - * bpf_sk_fullsock - * - * This helper gets a **struct bpf_sock** pointer such - * that all the fields in this **bpf_sock** can be accessed. - * - * Returns - * A **struct bpf_sock** pointer on success, or **NULL** in - * case of failure. - */ -static struct bpf_sock *(*bpf_sk_fullsock)(struct bpf_sock *sk) = (void *) 95; - -/* - * bpf_tcp_sock - * - * This helper gets a **struct bpf_tcp_sock** pointer from a - * **struct bpf_sock** pointer. - * - * Returns - * A **struct bpf_tcp_sock** pointer on success, or **NULL** in - * case of failure. - */ -static struct bpf_tcp_sock *(*bpf_tcp_sock)(struct bpf_sock *sk) = (void *) 96; - -/* - * bpf_skb_ecn_set_ce - * - * Set ECN (Explicit Congestion Notification) field of IP header - * to **CE** (Congestion Encountered) if current value is **ECT** - * (ECN Capable Transport). Otherwise, do nothing. Works with IPv6 - * and IPv4. - * - * Returns - * 1 if the **CE** flag is set (either by the current helper call - * or because it was already present), 0 if it is not set. - */ -static long (*bpf_skb_ecn_set_ce)(struct __sk_buff *skb) = (void *) 97; - -/* - * bpf_get_listener_sock - * - * Return a **struct bpf_sock** pointer in **TCP_LISTEN** state. - * **bpf_sk_release**\ () is unnecessary and not allowed. - * - * Returns - * A **struct bpf_sock** pointer on success, or **NULL** in - * case of failure. - */ -static struct bpf_sock *(*bpf_get_listener_sock)(struct bpf_sock *sk) = (void *) 98; - -/* - * bpf_skc_lookup_tcp - * - * Look for TCP socket matching *tuple*, optionally in a child - * network namespace *netns*. The return value must be checked, - * and if non-**NULL**, released via **bpf_sk_release**\ (). - * - * This function is identical to **bpf_sk_lookup_tcp**\ (), except - * that it also returns timewait or request sockets. Use - * **bpf_sk_fullsock**\ () or **bpf_tcp_sock**\ () to access the - * full structure. - * - * This helper is available only if the kernel was compiled with - * **CONFIG_NET** configuration option. - * - * Returns - * Pointer to **struct bpf_sock**, or **NULL** in case of failure. - * For sockets with reuseport option, the **struct bpf_sock** - * result is from *reuse*\ **->socks**\ [] using the hash of the - * tuple. - */ -static struct bpf_sock *(*bpf_skc_lookup_tcp)(void *ctx, struct bpf_sock_tuple *tuple, __u32 tuple_size, __u64 netns, __u64 flags) = (void *) 99; - -/* - * bpf_tcp_check_syncookie - * - * Check whether *iph* and *th* contain a valid SYN cookie ACK for - * the listening socket in *sk*. - * - * *iph* points to the start of the IPv4 or IPv6 header, while - * *iph_len* contains **sizeof**\ (**struct iphdr**) or - * **sizeof**\ (**struct ip6hdr**). - * - * *th* points to the start of the TCP header, while *th_len* - * contains **sizeof**\ (**struct tcphdr**). - * - * Returns - * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative - * error otherwise. - */ -static long (*bpf_tcp_check_syncookie)(struct bpf_sock *sk, void *iph, __u32 iph_len, struct tcphdr *th, __u32 th_len) = (void *) 100; - -/* - * bpf_sysctl_get_name - * - * Get name of sysctl in /proc/sys/ and copy it into provided by - * program buffer *buf* of size *buf_len*. - * - * The buffer is always NUL terminated, unless it's zero-sized. - * - * If *flags* is zero, full name (e.g. "net/ipv4/tcp_mem") is - * copied. Use **BPF_F_SYSCTL_BASE_NAME** flag to copy base name - * only (e.g. "tcp_mem"). - * - * Returns - * Number of character copied (not including the trailing NUL). - * - * **-E2BIG** if the buffer wasn't big enough (*buf* will contain - * truncated name in this case). - */ -static long (*bpf_sysctl_get_name)(struct bpf_sysctl *ctx, char *buf, unsigned long buf_len, __u64 flags) = (void *) 101; - -/* - * bpf_sysctl_get_current_value - * - * Get current value of sysctl as it is presented in /proc/sys - * (incl. newline, etc), and copy it as a string into provided - * by program buffer *buf* of size *buf_len*. - * - * The whole value is copied, no matter what file position user - * space issued e.g. sys_read at. - * - * The buffer is always NUL terminated, unless it's zero-sized. - * - * Returns - * Number of character copied (not including the trailing NUL). - * - * **-E2BIG** if the buffer wasn't big enough (*buf* will contain - * truncated name in this case). - * - * **-EINVAL** if current value was unavailable, e.g. because - * sysctl is uninitialized and read returns -EIO for it. - */ -static long (*bpf_sysctl_get_current_value)(struct bpf_sysctl *ctx, char *buf, unsigned long buf_len) = (void *) 102; - -/* - * bpf_sysctl_get_new_value - * - * Get new value being written by user space to sysctl (before - * the actual write happens) and copy it as a string into - * provided by program buffer *buf* of size *buf_len*. - * - * User space may write new value at file position > 0. - * - * The buffer is always NUL terminated, unless it's zero-sized. - * - * Returns - * Number of character copied (not including the trailing NUL). - * - * **-E2BIG** if the buffer wasn't big enough (*buf* will contain - * truncated name in this case). - * - * **-EINVAL** if sysctl is being read. - */ -static long (*bpf_sysctl_get_new_value)(struct bpf_sysctl *ctx, char *buf, unsigned long buf_len) = (void *) 103; - -/* - * bpf_sysctl_set_new_value - * - * Override new value being written by user space to sysctl with - * value provided by program in buffer *buf* of size *buf_len*. - * - * *buf* should contain a string in same form as provided by user - * space on sysctl write. - * - * User space may write new value at file position > 0. To override - * the whole sysctl value file position should be set to zero. - * - * Returns - * 0 on success. - * - * **-E2BIG** if the *buf_len* is too big. - * - * **-EINVAL** if sysctl is being read. - */ -static long (*bpf_sysctl_set_new_value)(struct bpf_sysctl *ctx, const char *buf, unsigned long buf_len) = (void *) 104; - -/* - * bpf_strtol - * - * Convert the initial part of the string from buffer *buf* of - * size *buf_len* to a long integer according to the given base - * and save the result in *res*. - * - * The string may begin with an arbitrary amount of white space - * (as determined by **isspace**\ (3)) followed by a single - * optional '**-**' sign. - * - * Five least significant bits of *flags* encode base, other bits - * are currently unused. - * - * Base must be either 8, 10, 16 or 0 to detect it automatically - * similar to user space **strtol**\ (3). - * - * Returns - * Number of characters consumed on success. Must be positive but - * no more than *buf_len*. - * - * **-EINVAL** if no valid digits were found or unsupported base - * was provided. - * - * **-ERANGE** if resulting value was out of range. - */ -static long (*bpf_strtol)(const char *buf, unsigned long buf_len, __u64 flags, long *res) = (void *) 105; - -/* - * bpf_strtoul - * - * Convert the initial part of the string from buffer *buf* of - * size *buf_len* to an unsigned long integer according to the - * given base and save the result in *res*. - * - * The string may begin with an arbitrary amount of white space - * (as determined by **isspace**\ (3)). - * - * Five least significant bits of *flags* encode base, other bits - * are currently unused. - * - * Base must be either 8, 10, 16 or 0 to detect it automatically - * similar to user space **strtoul**\ (3). - * - * Returns - * Number of characters consumed on success. Must be positive but - * no more than *buf_len*. - * - * **-EINVAL** if no valid digits were found or unsupported base - * was provided. - * - * **-ERANGE** if resulting value was out of range. - */ -static long (*bpf_strtoul)(const char *buf, unsigned long buf_len, __u64 flags, unsigned long *res) = (void *) 106; - -/* - * bpf_sk_storage_get - * - * Get a bpf-local-storage from a *sk*. - * - * Logically, it could be thought of getting the value from - * a *map* with *sk* as the **key**. From this - * perspective, the usage is not much different from - * **bpf_map_lookup_elem**\ (*map*, **&**\ *sk*) except this - * helper enforces the key must be a full socket and the map must - * be a **BPF_MAP_TYPE_SK_STORAGE** also. - * - * Underneath, the value is stored locally at *sk* instead of - * the *map*. The *map* is used as the bpf-local-storage - * "type". The bpf-local-storage "type" (i.e. the *map*) is - * searched against all bpf-local-storages residing at *sk*. - * - * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be - * used such that a new bpf-local-storage will be - * created if one does not exist. *value* can be used - * together with **BPF_SK_STORAGE_GET_F_CREATE** to specify - * the initial value of a bpf-local-storage. If *value* is - * **NULL**, the new bpf-local-storage will be zero initialized. - * - * Returns - * A bpf-local-storage pointer is returned on success. - * - * **NULL** if not found or there was an error in adding - * a new bpf-local-storage. - */ -static void *(*bpf_sk_storage_get)(void *map, struct bpf_sock *sk, void *value, __u64 flags) = (void *) 107; - -/* - * bpf_sk_storage_delete - * - * Delete a bpf-local-storage from a *sk*. - * - * Returns - * 0 on success. - * - * **-ENOENT** if the bpf-local-storage cannot be found. - */ -static long (*bpf_sk_storage_delete)(void *map, struct bpf_sock *sk) = (void *) 108; - -/* - * bpf_send_signal - * - * Send signal *sig* to the process of the current task. - * The signal may be delivered to any of this process's threads. - * - * Returns - * 0 on success or successfully queued. - * - * **-EBUSY** if work queue under nmi is full. - * - * **-EINVAL** if *sig* is invalid. - * - * **-EPERM** if no permission to send the *sig*. - * - * **-EAGAIN** if bpf program can try again. - */ -static long (*bpf_send_signal)(__u32 sig) = (void *) 109; - -/* - * bpf_tcp_gen_syncookie - * - * Try to issue a SYN cookie for the packet with corresponding - * IP/TCP headers, *iph* and *th*, on the listening socket in *sk*. - * - * *iph* points to the start of the IPv4 or IPv6 header, while - * *iph_len* contains **sizeof**\ (**struct iphdr**) or - * **sizeof**\ (**struct ip6hdr**). - * - * *th* points to the start of the TCP header, while *th_len* - * contains the length of the TCP header. - * - * Returns - * On success, lower 32 bits hold the generated SYN cookie in - * followed by 16 bits which hold the MSS value for that cookie, - * and the top 16 bits are unused. - * - * On failure, the returned value is one of the following: - * - * **-EINVAL** SYN cookie cannot be issued due to error - * - * **-ENOENT** SYN cookie should not be issued (no SYN flood) - * - * **-EOPNOTSUPP** kernel configuration does not enable SYN cookies - * - * **-EPROTONOSUPPORT** IP packet version is not 4 or 6 - */ -static __s64 (*bpf_tcp_gen_syncookie)(struct bpf_sock *sk, void *iph, __u32 iph_len, struct tcphdr *th, __u32 th_len) = (void *) 110; - -/* - * bpf_skb_output - * - * Write raw *data* blob into a special BPF perf event held by - * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf - * event must have the following attributes: **PERF_SAMPLE_RAW** - * as **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and - * **PERF_COUNT_SW_BPF_OUTPUT** as **config**. - * - * The *flags* are used to indicate the index in *map* for which - * the value must be put, masked with **BPF_F_INDEX_MASK**. - * Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU** - * to indicate that the index of the current CPU core should be - * used. - * - * The value to write, of *size*, is passed through eBPF stack and - * pointed by *data*. - * - * *ctx* is a pointer to in-kernel struct sk_buff. - * - * This helper is similar to **bpf_perf_event_output**\ () but - * restricted to raw_tracepoint bpf programs. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_skb_output)(void *ctx, void *map, __u64 flags, void *data, __u64 size) = (void *) 111; - -/* - * bpf_probe_read_user - * - * Safely attempt to read *size* bytes from user space address - * *unsafe_ptr* and store the data in *dst*. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_probe_read_user)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 112; - -/* - * bpf_probe_read_kernel - * - * Safely attempt to read *size* bytes from kernel space address - * *unsafe_ptr* and store the data in *dst*. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_probe_read_kernel)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 113; - -/* - * bpf_probe_read_user_str - * - * Copy a NUL terminated string from an unsafe user address - * *unsafe_ptr* to *dst*. The *size* should include the - * terminating NUL byte. In case the string length is smaller than - * *size*, the target is not padded with further NUL bytes. If the - * string length is larger than *size*, just *size*-1 bytes are - * copied and the last byte is set to NUL. - * - * On success, the length of the copied string is returned. This - * makes this helper useful in tracing programs for reading - * strings, and more importantly to get its length at runtime. See - * the following snippet: - * - * :: - * - * SEC("kprobe/sys_open") - * void bpf_sys_open(struct pt_regs *ctx) - * { - * char buf[PATHLEN]; // PATHLEN is defined to 256 - * int res = bpf_probe_read_user_str(buf, sizeof(buf), - * ctx->di); - * - * // Consume buf, for example push it to - * // userspace via bpf_perf_event_output(); we - * // can use res (the string length) as event - * // size, after checking its boundaries. - * } - * - * In comparison, using **bpf_probe_read_user**\ () helper here - * instead to read the string would require to estimate the length - * at compile time, and would often result in copying more memory - * than necessary. - * - * Another useful use case is when parsing individual process - * arguments or individual environment variables navigating - * *current*\ **->mm->arg_start** and *current*\ - * **->mm->env_start**: using this helper and the return value, - * one can quickly iterate at the right offset of the memory area. - * - * Returns - * On success, the strictly positive length of the string, - * including the trailing NUL character. On error, a negative - * value. - */ -static long (*bpf_probe_read_user_str)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 114; - -/* - * bpf_probe_read_kernel_str - * - * Copy a NUL terminated string from an unsafe kernel address *unsafe_ptr* - * to *dst*. Same semantics as with **bpf_probe_read_user_str**\ () apply. - * - * Returns - * On success, the strictly positive length of the string, including - * the trailing NUL character. On error, a negative value. - */ -static long (*bpf_probe_read_kernel_str)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 115; - -/* - * bpf_tcp_send_ack - * - * Send out a tcp-ack. *tp* is the in-kernel struct **tcp_sock**. - * *rcv_nxt* is the ack_seq to be sent out. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_tcp_send_ack)(void *tp, __u32 rcv_nxt) = (void *) 116; - -/* - * bpf_send_signal_thread - * - * Send signal *sig* to the thread corresponding to the current task. - * - * Returns - * 0 on success or successfully queued. - * - * **-EBUSY** if work queue under nmi is full. - * - * **-EINVAL** if *sig* is invalid. - * - * **-EPERM** if no permission to send the *sig*. - * - * **-EAGAIN** if bpf program can try again. - */ -static long (*bpf_send_signal_thread)(__u32 sig) = (void *) 117; - -/* - * bpf_jiffies64 - * - * Obtain the 64bit jiffies - * - * Returns - * The 64 bit jiffies - */ -static __u64 (*bpf_jiffies64)(void) = (void *) 118; - -/* - * bpf_read_branch_records - * - * For an eBPF program attached to a perf event, retrieve the - * branch records (**struct perf_branch_entry**) associated to *ctx* - * and store it in the buffer pointed by *buf* up to size - * *size* bytes. - * - * Returns - * On success, number of bytes written to *buf*. On error, a - * negative value. - * - * The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to - * instead return the number of bytes required to store all the - * branch entries. If this flag is set, *buf* may be NULL. - * - * **-EINVAL** if arguments invalid or **size** not a multiple - * of **sizeof**\ (**struct perf_branch_entry**\ ). - * - * **-ENOENT** if architecture does not support branch records. - */ -static long (*bpf_read_branch_records)(struct bpf_perf_event_data *ctx, void *buf, __u32 size, __u64 flags) = (void *) 119; - -/* - * bpf_get_ns_current_pid_tgid - * - * Returns 0 on success, values for *pid* and *tgid* as seen from the current - * *namespace* will be returned in *nsdata*. - * - * Returns - * 0 on success, or one of the following in case of failure: - * - * **-EINVAL** if dev and inum supplied don't match dev_t and inode number - * with nsfs of current task, or if dev conversion to dev_t lost high bits. - * - * **-ENOENT** if pidns does not exists for the current task. - */ -static long (*bpf_get_ns_current_pid_tgid)(__u64 dev, __u64 ino, struct bpf_pidns_info *nsdata, __u32 size) = (void *) 120; - -/* - * bpf_xdp_output - * - * Write raw *data* blob into a special BPF perf event held by - * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf - * event must have the following attributes: **PERF_SAMPLE_RAW** - * as **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and - * **PERF_COUNT_SW_BPF_OUTPUT** as **config**. - * - * The *flags* are used to indicate the index in *map* for which - * the value must be put, masked with **BPF_F_INDEX_MASK**. - * Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU** - * to indicate that the index of the current CPU core should be - * used. - * - * The value to write, of *size*, is passed through eBPF stack and - * pointed by *data*. - * - * *ctx* is a pointer to in-kernel struct xdp_buff. - * - * This helper is similar to **bpf_perf_eventoutput**\ () but - * restricted to raw_tracepoint bpf programs. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_xdp_output)(void *ctx, void *map, __u64 flags, void *data, __u64 size) = (void *) 121; - -/* - * bpf_get_netns_cookie - * - * Retrieve the cookie (generated by the kernel) of the network - * namespace the input *ctx* is associated with. The network - * namespace cookie remains stable for its lifetime and provides - * a global identifier that can be assumed unique. If *ctx* is - * NULL, then the helper returns the cookie for the initial - * network namespace. The cookie itself is very similar to that - * of **bpf_get_socket_cookie**\ () helper, but for network - * namespaces instead of sockets. - * - * Returns - * A 8-byte long opaque number. - */ -static __u64 (*bpf_get_netns_cookie)(void *ctx) = (void *) 122; - -/* - * bpf_get_current_ancestor_cgroup_id - * - * Return id of cgroup v2 that is ancestor of the cgroup associated - * with the current task at the *ancestor_level*. The root cgroup - * is at *ancestor_level* zero and each step down the hierarchy - * increments the level. If *ancestor_level* == level of cgroup - * associated with the current task, then return value will be the - * same as that of **bpf_get_current_cgroup_id**\ (). - * - * The helper is useful to implement policies based on cgroups - * that are upper in hierarchy than immediate cgroup associated - * with the current task. - * - * The format of returned id and helper limitations are same as in - * **bpf_get_current_cgroup_id**\ (). - * - * Returns - * The id is returned or 0 in case the id could not be retrieved. - */ -static __u64 (*bpf_get_current_ancestor_cgroup_id)(int ancestor_level) = (void *) 123; - -/* - * bpf_sk_assign - * - * Helper is overloaded depending on BPF program type. This - * description applies to **BPF_PROG_TYPE_SCHED_CLS** and - * **BPF_PROG_TYPE_SCHED_ACT** programs. - * - * Assign the *sk* to the *skb*. When combined with appropriate - * routing configuration to receive the packet towards the socket, - * will cause *skb* to be delivered to the specified socket. - * Subsequent redirection of *skb* via **bpf_redirect**\ (), - * **bpf_clone_redirect**\ () or other methods outside of BPF may - * interfere with successful delivery to the socket. - * - * This operation is only valid from TC ingress path. - * - * The *flags* argument must be zero. - * - * Returns - * 0 on success, or a negative error in case of failure: - * - * **-EINVAL** if specified *flags* are not supported. - * - * **-ENOENT** if the socket is unavailable for assignment. - * - * **-ENETUNREACH** if the socket is unreachable (wrong netns). - * - * **-EOPNOTSUPP** if the operation is not supported, for example - * a call from outside of TC ingress. - * - * **-ESOCKTNOSUPPORT** if the socket type is not supported - * (reuseport). - */ -static long (*bpf_sk_assign)(void *ctx, struct bpf_sock *sk, __u64 flags) = (void *) 124; - -/* - * bpf_ktime_get_boot_ns - * - * Return the time elapsed since system boot, in nanoseconds. - * Does include the time the system was suspended. - * See: **clock_gettime**\ (**CLOCK_BOOTTIME**) - * - * Returns - * Current *ktime*. - */ -static __u64 (*bpf_ktime_get_boot_ns)(void) = (void *) 125; - -/* - * bpf_seq_printf - * - * **bpf_seq_printf**\ () uses seq_file **seq_printf**\ () to print - * out the format string. - * The *m* represents the seq_file. The *fmt* and *fmt_size* are for - * the format string itself. The *data* and *data_len* are format string - * arguments. The *data* are a **u64** array and corresponding format string - * values are stored in the array. For strings and pointers where pointees - * are accessed, only the pointer values are stored in the *data* array. - * The *data_len* is the size of *data* in bytes. - * - * Formats **%s**, **%p{i,I}{4,6}** requires to read kernel memory. - * Reading kernel memory may fail due to either invalid address or - * valid address but requiring a major memory fault. If reading kernel memory - * fails, the string for **%s** will be an empty string, and the ip - * address for **%p{i,I}{4,6}** will be 0. Not returning error to - * bpf program is consistent with what **bpf_trace_printk**\ () does for now. - * - * Returns - * 0 on success, or a negative error in case of failure: - * - * **-EBUSY** if per-CPU memory copy buffer is busy, can try again - * by returning 1 from bpf program. - * - * **-EINVAL** if arguments are invalid, or if *fmt* is invalid/unsupported. - * - * **-E2BIG** if *fmt* contains too many format specifiers. - * - * **-EOVERFLOW** if an overflow happened: The same object will be tried again. - */ -static long (*bpf_seq_printf)(struct seq_file *m, const char *fmt, __u32 fmt_size, const void *data, __u32 data_len) = (void *) 126; - -/* - * bpf_seq_write - * - * **bpf_seq_write**\ () uses seq_file **seq_write**\ () to write the data. - * The *m* represents the seq_file. The *data* and *len* represent the - * data to write in bytes. - * - * Returns - * 0 on success, or a negative error in case of failure: - * - * **-EOVERFLOW** if an overflow happened: The same object will be tried again. - */ -static long (*bpf_seq_write)(struct seq_file *m, const void *data, __u32 len) = (void *) 127; - -/* - * bpf_sk_cgroup_id - * - * Return the cgroup v2 id of the socket *sk*. - * - * *sk* must be a non-**NULL** pointer to a full socket, e.g. one - * returned from **bpf_sk_lookup_xxx**\ (), - * **bpf_sk_fullsock**\ (), etc. The format of returned id is - * same as in **bpf_skb_cgroup_id**\ (). - * - * This helper is available only if the kernel was compiled with - * the **CONFIG_SOCK_CGROUP_DATA** configuration option. - * - * Returns - * The id is returned or 0 in case the id could not be retrieved. - */ -static __u64 (*bpf_sk_cgroup_id)(struct bpf_sock *sk) = (void *) 128; - -/* - * bpf_sk_ancestor_cgroup_id - * - * Return id of cgroup v2 that is ancestor of cgroup associated - * with the *sk* at the *ancestor_level*. The root cgroup is at - * *ancestor_level* zero and each step down the hierarchy - * increments the level. If *ancestor_level* == level of cgroup - * associated with *sk*, then return value will be same as that - * of **bpf_sk_cgroup_id**\ (). - * - * The helper is useful to implement policies based on cgroups - * that are upper in hierarchy than immediate cgroup associated - * with *sk*. - * - * The format of returned id and helper limitations are same as in - * **bpf_sk_cgroup_id**\ (). - * - * Returns - * The id is returned or 0 in case the id could not be retrieved. - */ -static __u64 (*bpf_sk_ancestor_cgroup_id)(struct bpf_sock *sk, int ancestor_level) = (void *) 129; - -/* - * bpf_ringbuf_output - * - * Copy *size* bytes from *data* into a ring buffer *ringbuf*. - * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification - * of new data availability is sent. - * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification - * of new data availability is sent unconditionally. - * - * Returns - * 0 on success, or a negative error in case of failure. - */ -static long (*bpf_ringbuf_output)(void *ringbuf, void *data, __u64 size, __u64 flags) = (void *) 130; - -/* - * bpf_ringbuf_reserve - * - * Reserve *size* bytes of payload in a ring buffer *ringbuf*. - * - * Returns - * Valid pointer with *size* bytes of memory available; NULL, - * otherwise. - */ -static void *(*bpf_ringbuf_reserve)(void *ringbuf, __u64 size, __u64 flags) = (void *) 131; - -/* - * bpf_ringbuf_submit - * - * Submit reserved ring buffer sample, pointed to by *data*. - * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification - * of new data availability is sent. - * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification - * of new data availability is sent unconditionally. - * - * Returns - * Nothing. Always succeeds. - */ -static void (*bpf_ringbuf_submit)(void *data, __u64 flags) = (void *) 132; - -/* - * bpf_ringbuf_discard - * - * Discard reserved ring buffer sample, pointed to by *data*. - * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification - * of new data availability is sent. - * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification - * of new data availability is sent unconditionally. - * - * Returns - * Nothing. Always succeeds. - */ -static void (*bpf_ringbuf_discard)(void *data, __u64 flags) = (void *) 133; - -/* - * bpf_ringbuf_query - * - * Query various characteristics of provided ring buffer. What - * exactly is queries is determined by *flags*: - * - * * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed. - * * **BPF_RB_RING_SIZE**: The size of ring buffer. - * * **BPF_RB_CONS_POS**: Consumer position (can wrap around). - * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around). - * - * Data returned is just a momentary snapshot of actual values - * and could be inaccurate, so this facility should be used to - * power heuristics and for reporting, not to make 100% correct - * calculation. - * - * Returns - * Requested value, or 0, if *flags* are not recognized. - */ -static __u64 (*bpf_ringbuf_query)(void *ringbuf, __u64 flags) = (void *) 134; - -/* - * bpf_csum_level - * - * Change the skbs checksum level by one layer up or down, or - * reset it entirely to none in order to have the stack perform - * checksum validation. The level is applicable to the following - * protocols: TCP, UDP, GRE, SCTP, FCOE. For example, a decap of - * | ETH | IP | UDP | GUE | IP | TCP | into | ETH | IP | TCP | - * through **bpf_skb_adjust_room**\ () helper with passing in - * **BPF_F_ADJ_ROOM_NO_CSUM_RESET** flag would require one call - * to **bpf_csum_level**\ () with **BPF_CSUM_LEVEL_DEC** since - * the UDP header is removed. Similarly, an encap of the latter - * into the former could be accompanied by a helper call to - * **bpf_csum_level**\ () with **BPF_CSUM_LEVEL_INC** if the - * skb is still intended to be processed in higher layers of the - * stack instead of just egressing at tc. - * - * There are three supported level settings at this time: - * - * * **BPF_CSUM_LEVEL_INC**: Increases skb->csum_level for skbs - * with CHECKSUM_UNNECESSARY. - * * **BPF_CSUM_LEVEL_DEC**: Decreases skb->csum_level for skbs - * with CHECKSUM_UNNECESSARY. - * * **BPF_CSUM_LEVEL_RESET**: Resets skb->csum_level to 0 and - * sets CHECKSUM_NONE to force checksum validation by the stack. - * * **BPF_CSUM_LEVEL_QUERY**: No-op, returns the current - * skb->csum_level. - * - * Returns - * 0 on success, or a negative error in case of failure. In the - * case of **BPF_CSUM_LEVEL_QUERY**, the current skb->csum_level - * is returned or the error code -EACCES in case the skb is not - * subject to CHECKSUM_UNNECESSARY. - */ -static long (*bpf_csum_level)(struct __sk_buff *skb, __u64 level) = (void *) 135; - -/* - * bpf_skc_to_tcp6_sock - * - * Dynamically cast a *sk* pointer to a *tcp6_sock* pointer. - * - * Returns - * *sk* if casting is valid, or NULL otherwise. - */ -static struct tcp6_sock *(*bpf_skc_to_tcp6_sock)(void *sk) = (void *) 136; - -/* - * bpf_skc_to_tcp_sock - * - * Dynamically cast a *sk* pointer to a *tcp_sock* pointer. - * - * Returns - * *sk* if casting is valid, or NULL otherwise. - */ -static struct tcp_sock *(*bpf_skc_to_tcp_sock)(void *sk) = (void *) 137; - -/* - * bpf_skc_to_tcp_timewait_sock - * - * Dynamically cast a *sk* pointer to a *tcp_timewait_sock* pointer. - * - * Returns - * *sk* if casting is valid, or NULL otherwise. - */ -static struct tcp_timewait_sock *(*bpf_skc_to_tcp_timewait_sock)(void *sk) = (void *) 138; - -/* - * bpf_skc_to_tcp_request_sock - * - * Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer. - * - * Returns - * *sk* if casting is valid, or NULL otherwise. - */ -static struct tcp_request_sock *(*bpf_skc_to_tcp_request_sock)(void *sk) = (void *) 139; - -/* - * bpf_skc_to_udp6_sock - * - * Dynamically cast a *sk* pointer to a *udp6_sock* pointer. - * - * Returns - * *sk* if casting is valid, or NULL otherwise. - */ -static struct udp6_sock *(*bpf_skc_to_udp6_sock)(void *sk) = (void *) 140; - -/* - * bpf_get_task_stack - * - * Return a user or a kernel stack in bpf program provided buffer. - * To achieve this, the helper needs *task*, which is a valid - * pointer to struct task_struct. To store the stacktrace, the - * bpf program provides *buf* with a nonnegative *size*. - * - * The last argument, *flags*, holds the number of stack frames to - * skip (from 0 to 255), masked with - * **BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set - * the following flags: - * - * **BPF_F_USER_STACK** - * Collect a user space stack instead of a kernel stack. - * **BPF_F_USER_BUILD_ID** - * Collect buildid+offset instead of ips for user stack, - * only valid if **BPF_F_USER_STACK** is also specified. - * - * **bpf_get_task_stack**\ () can collect up to - * **PERF_MAX_STACK_DEPTH** both kernel and user frames, subject - * to sufficient large buffer size. Note that - * this limit can be controlled with the **sysctl** program, and - * that it should be manually increased in order to profile long - * user stacks (such as stacks for Java programs). To do so, use: - * - * :: - * - * # sysctl kernel.perf_event_max_stack= - * - * Returns - * A non-negative value equal to or less than *size* on success, - * or a negative error in case of failure. - */ -static long (*bpf_get_task_stack)(struct task_struct *task, void *buf, __u32 size, __u64 flags) = (void *) 141; - - diff --git a/vendor/github.com/cilium/ebpf/examples/headers/bpf_helpers.h b/vendor/github.com/cilium/ebpf/examples/headers/bpf_helpers.h deleted file mode 100644 index bc14db706b..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/headers/bpf_helpers.h +++ /dev/null @@ -1,80 +0,0 @@ -/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ -#ifndef __BPF_HELPERS__ -#define __BPF_HELPERS__ - -/* - * Note that bpf programs need to include either - * vmlinux.h (auto-generated from BTF) or linux/types.h - * in advance since bpf_helper_defs.h uses such types - * as __u64. - */ -#include "bpf_helper_defs.h" - -#define __uint(name, val) int (*name)[val] -#define __type(name, val) typeof(val) *name -#define __array(name, val) typeof(val) *name[] - -/* Helper macro to print out debug messages */ -#define bpf_printk(fmt, ...) \ -({ \ - char ____fmt[] = fmt; \ - bpf_trace_printk(____fmt, sizeof(____fmt), \ - ##__VA_ARGS__); \ -}) - -/* - * Helper macro to place programs, maps, license in - * different sections in elf_bpf file. Section names - * are interpreted by elf_bpf loader - */ -#define SEC(NAME) __attribute__((section(NAME), used)) - -#ifndef __always_inline -#define __always_inline __attribute__((always_inline)) -#endif -#ifndef __weak -#define __weak __attribute__((weak)) -#endif - -/* - * Helper macro to manipulate data structures - */ -#ifndef offsetof -#define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) -#endif -#ifndef container_of -#define container_of(ptr, type, member) \ - ({ \ - void *__mptr = (void *)(ptr); \ - ((type *)(__mptr - offsetof(type, member))); \ - }) -#endif - -/* - * Helper structure used by eBPF C program - * to describe BPF map attributes to libbpf loader - */ -struct bpf_map_def { - unsigned int type; - unsigned int key_size; - unsigned int value_size; - unsigned int max_entries; - unsigned int map_flags; -}; - -enum libbpf_pin_type { - LIBBPF_PIN_NONE, - /* PIN_BY_NAME: pin maps by name (in /sys/fs/bpf by default) */ - LIBBPF_PIN_BY_NAME, -}; - -enum libbpf_tristate { - TRI_NO = 0, - TRI_YES = 1, - TRI_MODULE = 2, -}; - -#define __kconfig __attribute__((section(".kconfig"))) -#define __ksym __attribute__((section(".ksyms"))) - -#endif diff --git a/vendor/github.com/cilium/ebpf/examples/headers/common.h b/vendor/github.com/cilium/ebpf/examples/headers/common.h deleted file mode 100644 index 1a3d58a13c..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/headers/common.h +++ /dev/null @@ -1,107 +0,0 @@ -// This is a compact version of `vmlinux.h` to be used in the examples using C code. - -#ifndef __VMLINUX_H__ -#define __VMLINUX_H__ - -typedef unsigned char __u8; -typedef short int __s16; -typedef short unsigned int __u16; -typedef int __s32; -typedef unsigned int __u32; -typedef long long int __s64; -typedef long long unsigned int __u64; -typedef __u8 u8; -typedef __s16 s16; -typedef __u16 u16; -typedef __s32 s32; -typedef __u32 u32; -typedef __s64 s64; -typedef __u64 u64; -typedef __u16 __le16; -typedef __u16 __be16; -typedef __u32 __be32; -typedef __u64 __be64; -typedef __u32 __wsum; - -enum bpf_map_type { - BPF_MAP_TYPE_UNSPEC = 0, - BPF_MAP_TYPE_HASH = 1, - BPF_MAP_TYPE_ARRAY = 2, - BPF_MAP_TYPE_PROG_ARRAY = 3, - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, - BPF_MAP_TYPE_PERCPU_HASH = 5, - BPF_MAP_TYPE_PERCPU_ARRAY = 6, - BPF_MAP_TYPE_STACK_TRACE = 7, - BPF_MAP_TYPE_CGROUP_ARRAY = 8, - BPF_MAP_TYPE_LRU_HASH = 9, - BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, - BPF_MAP_TYPE_LPM_TRIE = 11, - BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, - BPF_MAP_TYPE_HASH_OF_MAPS = 13, - BPF_MAP_TYPE_DEVMAP = 14, - BPF_MAP_TYPE_SOCKMAP = 15, - BPF_MAP_TYPE_CPUMAP = 16, - BPF_MAP_TYPE_XSKMAP = 17, - BPF_MAP_TYPE_SOCKHASH = 18, - BPF_MAP_TYPE_CGROUP_STORAGE = 19, - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 21, - BPF_MAP_TYPE_QUEUE = 22, - BPF_MAP_TYPE_STACK = 23, - BPF_MAP_TYPE_SK_STORAGE = 24, - BPF_MAP_TYPE_DEVMAP_HASH = 25, - BPF_MAP_TYPE_STRUCT_OPS = 26, - BPF_MAP_TYPE_RINGBUF = 27, - BPF_MAP_TYPE_INODE_STORAGE = 28, -}; - -enum { - BPF_ANY = 0, - BPF_NOEXIST = 1, - BPF_EXIST = 2, - BPF_F_LOCK = 4, -}; - -/* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and - * BPF_FUNC_perf_event_read_value flags. - */ -#define BPF_F_INDEX_MASK 0xffffffffULL -#define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK - -#define PT_REGS_RC(x) ((x)->rax) -struct pt_regs { -/* - * C ABI says these regs are callee-preserved. They aren't saved on kernel entry - * unless syscall needs a complete, fully filled "struct pt_regs". - */ - unsigned long r15; - unsigned long r14; - unsigned long r13; - unsigned long r12; - unsigned long rbp; - unsigned long rbx; -/* These regs are callee-clobbered. Always saved on kernel entry. */ - unsigned long r11; - unsigned long r10; - unsigned long r9; - unsigned long r8; - unsigned long rax; - unsigned long rcx; - unsigned long rdx; - unsigned long rsi; - unsigned long rdi; -/* - * On syscall entry, this is syscall#. On CPU exception, this is error code. - * On hw interrupt, it's IRQ number: - */ - unsigned long orig_rax; -/* Return frame for iretq */ - unsigned long rip; - unsigned long cs; - unsigned long eflags; - unsigned long rsp; - unsigned long ss; -/* top of stack page */ -}; - -#endif /* __VMLINUX_H__ */ diff --git a/vendor/github.com/cilium/ebpf/examples/kprobe/bpf/kprobe_example.c b/vendor/github.com/cilium/ebpf/examples/kprobe/bpf/kprobe_example.c deleted file mode 100644 index 04f7a33dcc..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/kprobe/bpf/kprobe_example.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "common.h" -#include "bpf_helpers.h" - -char __license[] SEC("license") = "Dual MIT/GPL"; - -struct bpf_map_def SEC("maps") kprobe_map = { - .type = BPF_MAP_TYPE_ARRAY, - .key_size = sizeof(u32), - .value_size = sizeof(u64), - .max_entries = 1, -}; - -SEC("kprobe/sys_execve") -int kprobe_execve() { - u32 key = 0; - u64 initval = 1, *valp; - - valp = bpf_map_lookup_elem(&kprobe_map, &key); - if (!valp) { - bpf_map_update_elem(&kprobe_map, &key, &initval, BPF_ANY); - return 0; - } - __sync_fetch_and_add(valp, 1); - - return 0; -} diff --git a/vendor/github.com/cilium/ebpf/examples/uretprobe/bpf/uretprobe_example.c b/vendor/github.com/cilium/ebpf/examples/uretprobe/bpf/uretprobe_example.c deleted file mode 100644 index 94766ea413..0000000000 --- a/vendor/github.com/cilium/ebpf/examples/uretprobe/bpf/uretprobe_example.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "common.h" -#include "bpf_helpers.h" - -char __license[] SEC("license") = "Dual MIT/GPL"; - -struct event_t { - u32 pid; - char str[80]; -}; - -struct { - __uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY); -} events SEC(".maps"); - -SEC("uretprobe/bash_readline") -int uretprobe_bash_readline(struct pt_regs *ctx) { - struct event_t event; - - event.pid = bpf_get_current_pid_tgid(); - bpf_probe_read(&event.str, sizeof(event.str), (void *)PT_REGS_RC(ctx)); - - bpf_perf_event_output(ctx, &events, BPF_F_CURRENT_CPU, &event, sizeof(event)); - - return 0; -} diff --git a/vendor/github.com/cilium/ebpf/go.mod b/vendor/github.com/cilium/ebpf/go.mod deleted file mode 100644 index df8139621c..0000000000 --- a/vendor/github.com/cilium/ebpf/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -module github.com/cilium/ebpf - -go 1.15 - -require ( - github.com/frankban/quicktest v1.11.3 - github.com/google/go-cmp v0.5.4 - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c -) diff --git a/vendor/github.com/cilium/ebpf/run-tests.sh b/vendor/github.com/cilium/ebpf/run-tests.sh new file mode 100644 index 0000000000..e2437beed2 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/run-tests.sh @@ -0,0 +1,123 @@ +#!/bin/bash +# Test the current package under a different kernel. +# Requires virtme and qemu to be installed. +# Examples: +# Run all tests on a 5.4 kernel +# $ ./run-tests.sh 5.4 +# Run a subset of tests: +# $ ./run-tests.sh 5.4 go test ./link + +set -euo pipefail + +script="$(realpath "$0")" +readonly script + +# This script is a bit like a Matryoshka doll since it keeps re-executing itself +# in various different contexts: +# +# 1. invoked by the user like run-tests.sh 5.4 +# 2. invoked by go test like run-tests.sh --exec-vm +# 3. invoked by init in the vm like run-tests.sh --exec-test +# +# This allows us to use all available CPU on the host machine to compile our +# code, and then only use the VM to execute the test. This is because the VM +# is usually slower at compiling than the host. +if [[ "${1:-}" = "--exec-vm" ]]; then + shift + + input="$1" + shift + + # Use sudo if /dev/kvm isn't accessible by the current user. + sudo="" + if [[ ! -r /dev/kvm || ! -w /dev/kvm ]]; then + sudo="sudo" + fi + readonly sudo + + testdir="$(dirname "$1")" + output="$(mktemp -d)" + printf -v cmd "%q " "$@" + + if [[ "$(stat -c '%t:%T' -L /proc/$$/fd/0)" == "1:3" ]]; then + # stdin is /dev/null, which doesn't play well with qemu. Use a fifo as a + # blocking substitute. + mkfifo "${output}/fake-stdin" + # Open for reading and writing to avoid blocking. + exec 0<> "${output}/fake-stdin" + rm "${output}/fake-stdin" + fi + + $sudo virtme-run --kimg "${input}/bzImage" --memory 768M --pwd \ + --rwdir="${testdir}=${testdir}" \ + --rodir=/run/input="${input}" \ + --rwdir=/run/output="${output}" \ + --script-sh "PATH=\"$PATH\" \"$script\" --exec-test $cmd" \ + --qemu-opts -smp 2 # need at least two CPUs for some tests + + if [[ ! -e "${output}/success" ]]; then + exit 1 + fi + + $sudo rm -r "$output" + exit 0 +elif [[ "${1:-}" = "--exec-test" ]]; then + shift + + mount -t bpf bpf /sys/fs/bpf + mount -t tracefs tracefs /sys/kernel/debug/tracing + + if [[ -d "/run/input/bpf" ]]; then + export KERNEL_SELFTESTS="/run/input/bpf" + fi + + dmesg -C + if ! "$@"; then + dmesg + exit 1 + fi + touch "/run/output/success" + exit 0 +fi + +readonly kernel_version="${1:-}" +if [[ -z "${kernel_version}" ]]; then + echo "Expecting kernel version as first argument" + exit 1 +fi +shift + +readonly kernel="linux-${kernel_version}.bz" +readonly selftests="linux-${kernel_version}-selftests-bpf.bz" +readonly input="$(mktemp -d)" +readonly tmp_dir="${TMPDIR:-/tmp}" +readonly branch="${BRANCH:-master}" + +fetch() { + echo Fetching "${1}" + wget -nv -N -P "${tmp_dir}" "https://github.com/cilium/ci-kernels/raw/${branch}/${1}" +} + +fetch "${kernel}" +cp "${tmp_dir}/${kernel}" "${input}/bzImage" + +if fetch "${selftests}"; then + mkdir "${input}/bpf" + tar --strip-components=4 -xjf "${tmp_dir}/${selftests}" -C "${input}/bpf" +else + echo "No selftests found, disabling" +fi + +args=(-v -short -coverpkg=./... -coverprofile=coverage.out -count 1 ./...) +if (( $# > 0 )); then + args=("$@") +fi + +export GOFLAGS=-mod=readonly +export CGO_ENABLED=0 + +echo Testing on "${kernel_version}" +go test -exec "$script --exec-vm $input" "${args[@]}" +echo "Test successful on ${kernel_version}" + +rm -r "${input}" diff --git a/vendor/github.com/cloudflare/cfssl/README.md b/vendor/github.com/cloudflare/cfssl/README.md deleted file mode 100644 index a7f34698c6..0000000000 --- a/vendor/github.com/cloudflare/cfssl/README.md +++ /dev/null @@ -1,436 +0,0 @@ -# CFSSL - -[![Build Status](https://travis-ci.org/cloudflare/cfssl.svg?branch=master)](https://travis-ci.org/cloudflare/cfssl) -[![Coverage Status](http://codecov.io/github/cloudflare/cfssl/coverage.svg?branch=master)](http://codecov.io/github/cloudflare/cfssl?branch=master) -[![GoDoc](https://godoc.org/github.com/cloudflare/cfssl?status.svg)](https://godoc.org/github.com/cloudflare/cfssl) - -## CloudFlare's PKI/TLS toolkit - -CFSSL is CloudFlare's PKI/TLS swiss army knife. It is both a command line -tool and an HTTP API server for signing, verifying, and bundling TLS -certificates. It requires Go 1.8+ to build. - -Note that certain linux distributions have certain algorithms removed -(RHEL-based distributions in particular), so the golang from the -official repositories will not work. Users of these distributions should -[install go manually](//golang.org/dl) to install CFSSL. - -CFSSL consists of: - -* a set of packages useful for building custom TLS PKI tools -* the `cfssl` program, which is the canonical command line utility - using the CFSSL packages. -* the `multirootca` program, which is a certificate authority server - that can use multiple signing keys. -* the `mkbundle` program is used to build certificate pool bundles. -* the `cfssljson` program, which takes the JSON output from the - `cfssl` and `multirootca` programs and writes certificates, keys, - CSRs, and bundles to disk. - -### Building - -See [BUILDING](BUILDING.md) - -### Installation - -Installation requires a -[working Go 1.8+ installation](http://golang.org/doc/install) and a -properly set `GOPATH`. - -``` -$ go get -u github.com/cloudflare/cfssl/cmd/cfssl -``` - -will download and build the CFSSL tool, installing it in -`$GOPATH/bin/cfssl`. - -To install any of the other utility programs that are -in this repo (for instance `cffsljson` in this case): - -``` -$ go get -u github.com/cloudflare/cfssl/cmd/cfssljson -``` - -This will download and build the CFSSLJSON tool, installing it in -`$GOPATH/bin/`. - -And to simply install __all__ of the programs in this repo: - -``` -$ go get -u github.com/cloudflare/cfssl/cmd/... -``` - -This will download, build, and install all of the utility programs -(including `cfssl`, `cfssljson`, and `mkbundle` among others) into the -`$GOPATH/bin/` directory. - -### Using the Command Line Tool - -The `cfssl` command line tool takes a command to specify what -operation it should carry out: - - sign signs a certificate - bundle build a certificate bundle - genkey generate a private key and a certificate request - gencert generate a private key and a certificate - serve start the API server - version prints out the current version - selfsign generates a self-signed certificate - print-defaults print default configurations - -Use `cfssl [command] -help` to find out more about a command. -The `version` command takes no arguments. - -#### Signing - -``` -cfssl sign [-ca cert] [-ca-key key] [-hostname comma,separated,hostnames] csr [subject] -``` - -The `csr` is the client's certificate request. The `-ca` and `-ca-key` -flags are the CA's certificate and private key, respectively. By -default, they are `ca.pem` and `ca_key.pem`. The `-hostname` is -a comma separated hostname list that overrides the DNS names and -IP address in the certificate SAN extension. -For example, assuming the CA's private key is in -`/etc/ssl/private/cfssl_key.pem` and the CA's certificate is in -`/etc/ssl/certs/cfssl.pem`, to sign the `cloudflare.pem` certificate -for cloudflare.com: - -``` -cfssl sign -ca /etc/ssl/certs/cfssl.pem \ - -ca-key /etc/ssl/private/cfssl_key.pem \ - -hostname cloudflare.com \ - ./cloudflare.pem -``` - -It is also possible to specify CSR with the `-csr` flag. By doing so, -flag values take precedence and will overwrite the argument. - -The subject is an optional file that contains subject information that -should be used in place of the information from the CSR. It should be -a JSON file as follows: - -```json -{ - "CN": "example.com", - "names": [ - { - "C": "US", - "L": "San Francisco", - "O": "Internet Widgets, Inc.", - "OU": "WWW", - "ST": "California" - } - ] -} -``` - -**N.B.** As of Go 1.7, self-signed certificates will not include -[the AKI](https://go.googlesource.com/go/+/b623b71509b2d24df915d5bc68602e1c6edf38ca). - -#### Bundling - -``` -cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \ - [-metadata metadata_file] [-flavor bundle_flavor] \ - -cert certificate_file [-key key_file] -``` - -The bundles are used for the root and intermediate certificate -pools. In addition, platform metadata is specified through `-metadata`. -The bundle files, metadata file (and auxiliary files) can be -found at: - - https://github.com/cloudflare/cfssl_trust - -Specify PEM-encoded client certificate and key through `-cert` and -`-key` respectively. If key is specified, the bundle will be built -and verified with the key. Otherwise the bundle will be built -without a private key. Instead of file path, use `-` for reading -certificate PEM from stdin. It is also acceptable that the certificate -file should contain a (partial) certificate bundle. - -Specify bundling flavor through `-flavor`. There are three flavors: -`optimal` to generate a bundle of shortest chain and most advanced -cryptographic algorithms, `ubiquitous` to generate a bundle of most -widely acceptance across different browsers and OS platforms, and -`force` to find an acceptable bundle which is identical to the -content of the input certificate file. - -Alternatively, the client certificate can be pulled directly from -a domain. It is also possible to connect to the remote address -through `-ip`. - -``` -cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \ - [-metadata metadata_file] [-flavor bundle_flavor] \ - -domain domain_name [-ip ip_address] -``` - -The bundle output form should follow the example: - -```json -{ - "bundle": "CERT_BUNDLE_IN_PEM", - "crt": "LEAF_CERT_IN_PEM", - "crl_support": true, - "expires": "2015-12-31T23:59:59Z", - "hostnames": ["example.com"], - "issuer": "ISSUER CERT SUBJECT", - "key": "KEY_IN_PEM", - "key_size": 2048, - "key_type": "2048-bit RSA", - "ocsp": ["http://ocsp.example-ca.com"], - "ocsp_support": true, - "root": "ROOT_CA_CERT_IN_PEM", - "signature": "SHA1WithRSA", - "subject": "LEAF CERT SUBJECT", - "status": { - "rebundled": false, - "expiring_SKIs": [], - "untrusted_root_stores": [], - "messages": [], - "code": 0 - } -} -``` - - -#### Generating certificate signing request and private key - -``` -cfssl genkey csr.json -``` - -To generate a private key and corresponding certificate request, specify -the key request as a JSON file. This file should follow the form: - -```json -{ - "hosts": [ - "example.com", - "www.example.com" - ], - "key": { - "algo": "rsa", - "size": 2048 - }, - "names": [ - { - "C": "US", - "L": "San Francisco", - "O": "Internet Widgets, Inc.", - "OU": "WWW", - "ST": "California" - } - ] -} -``` - -#### Generating self-signed root CA certificate and private key - -``` -cfssl genkey -initca csr.json | cfssljson -bare ca -``` - -To generate a self-signed root CA certificate, specify the key request as -a JSON file in the same format as in 'genkey'. Three PEM-encoded entities -will appear in the output: the private key, the csr, and the self-signed -certificate. - -#### Generating a remote-issued certificate and private key. - -``` -cfssl gencert -remote=remote_server [-hostname=comma,separated,hostnames] csr.json -``` - -This calls `genkey` but has a remote CFSSL server sign and issue -the certificate. You may use `-hostname` to override certificate SANs. - -#### Generating a local-issued certificate and private key. - -``` -cfssl gencert -ca cert -ca-key key [-hostname=comma,separated,hostnames] csr.json -``` - -This generates and issues a certificate and private key from a local CA -via a JSON request. You may use `-hostname` to override certificate SANs. - - -#### Updating an OCSP responses file with a newly issued certificate - -``` -cfssl ocspsign -ca cert -responder key -responder-key key -cert cert \ - | cfssljson -bare -stdout >> responses -``` - -This will generate an OCSP response for the `cert` and add it to the -`responses` file. You can then pass `responses` to `ocspserve` to start an -OCSP server. - -### Starting the API Server - -CFSSL comes with an HTTP-based API server; the endpoints are -documented in `doc/api/intro.txt`. The server is started with the `serve` -command: - -``` -cfssl serve [-address address] [-ca cert] [-ca-bundle bundle] \ - [-ca-key key] [-int-bundle bundle] [-int-dir dir] [-port port] \ - [-metadata file] [-remote remote_host] [-config config] \ - [-responder cert] [-responder-key key] [-db-config db-config] -``` - -Address and port default to "127.0.0.1:8888". The `-ca` and `-ca-key` -arguments should be the PEM-encoded certificate and private key to use -for signing; by default, they are `ca.pem` and `ca_key.pem`. The -`-ca-bundle` and `-int-bundle` should be the certificate bundles used -for the root and intermediate certificate pools, respectively. These -default to `ca-bundle.crt` and `int-bundle.crt` respectively. If the -`-remote` option is specified, all signature operations will be forwarded -to the remote CFSSL. - -`-int-dir` specifies an intermediates directory. `-metadata` is a file for -root certificate presence. The content of the file is a json dictionary -(k,v) such that each key k is an SHA-1 digest of a root certificate while value v -is a list of key store filenames. `-config` specifies a path to a configuration -file. `-responder` and `-responder-key` are the certificate and the -private key for the OCSP responder, respectively. - -The amount of logging can be controlled with the `-loglevel` option. This -comes *after* the serve command: - -``` -cfssl serve -loglevel 2 -``` - -The levels are: - -* 0 - DEBUG -* 1 - INFO (this is the default level) -* 2 - WARNING -* 3 - ERROR -* 4 - CRITICAL - -### The multirootca - -The `cfssl` program can act as an online certificate authority, but it -only uses a single key. If multiple signing keys are needed, the -`multirootca` program can be used. It only provides the `sign`, -`authsign` and `info` endpoints. The documentation contains instructions -for configuring and running the CA. - -### The mkbundle Utility - -`mkbundle` is used to build the root and intermediate bundles used in -verifying certificates. It can be installed with - -``` -go get -u github.com/cloudflare/cfssl/cmd/mkbundle -``` - -It takes a collection of certificates, checks for CRL revocation (OCSP -support is planned for the next release) and expired certificates, and -bundles them into one file. It takes directories of certificates and -certificate files (which may contain multiple certificates). For example, -if the directory `intermediates` contains a number of intermediate -certificates: - -``` -mkbundle -f int-bundle.crt intermediates -``` - -will check those certificates and combine valid certificates into a single -`int-bundle.crt` file. - -The `-f` flag specifies an output name; `-loglevel` specifies the verbosity -of the logging (using the same loglevels as above), and `-nw` controls the -number of revocation-checking workers. - -### The cfssljson Utility - -Most of the output from `cfssl` is in JSON. The `cfssljson` utility can take -this output and split it out into separate `key`, `certificate`, `CSR`, and -`bundle` files as appropriate. The tool takes a single flag, `-f`, that -specifies the input file, and an argument that specifies the base name for -the files produced. If the input filename is `-` (which is the default), -cfssljson reads from standard input. It maps keys in the JSON file to -filenames in the following way: - -* if __cert__ or __certificate__ is specified, __basename.pem__ will be produced. -* if __key__ or __private_key__ is specified, __basename-key.pem__ will be produced. -* if __csr__ or __certificate_request__ is specified, __basename.csr__ will be produced. -* if __bundle__ is specified, __basename-bundle.pem__ will be produced. -* if __ocspResponse__ is specified, __basename-response.der__ will be produced. - -Instead of saving to a file, you can pass `-stdout` to output the encoded -contents to standard output. - -### Static Builds - -By default, the web assets are accessed from disk, based on their -relative locations. If you wish to distribute a single, -statically-linked, `cfssl` binary, you’ll want to embed these resources -before building. This can by done with the -[go.rice](https://github.com/GeertJohan/go.rice) tool. - -``` -pushd cli/serve && rice embed-go && popd -``` - -Then building with `go build` will use the embedded resources. - -### Using a PKCS#11 hardware token / HSM - -For better security, you may wish to store your private key in an HSM or -smartcard. The interface to both of these categories of device is described by -the PKCS#11 spec. If you need to do approximately one signing operation per -second or fewer, the Yubikey NEO and NEO-n are inexpensive smartcard options: - - https://www.yubico.com/products/yubikey-hardware/yubikey-neo/ - -In general you should look for a product that supports PIV (personal identity verification). If -your signing needs are in the hundreds of signatures per second, you will need -to purchase an expensive HSM (in the thousands to many thousands of USD). - -If you wish to try out the PKCS#11 signing modes without a hardware token, you -can use the [SoftHSM](https://github.com/opendnssec/SoftHSMv1#softhsm) -implementation. Please note that using SoftHSM simply stores your private key in -a file on disk and does not increase security. - -To get started with your PKCS#11 token you will need to initialize it with a -private key, PIN, and token label. The instructions to do this will be specific -to each hardware device, and you should follow the instructions provided by your -vendor. You will also need to find the path to your `module`, a shared object -file (.so). Having initialized your device, you can query it to check your token -label with: - - pkcs11-tool --module --list-token-slots - -You'll also want to check the label of the private key you imported (or -generated). Run the following command and look for a `Private Key Object`: - - pkcs11-tool --module --pin \ - --list-token-slots --login --list-objects - -You now have all the information you need to use your PKCS#11 token with CFSSL. -CFSSL supports PKCS#11 for certificate signing and OCSP signing. To create a -Signer (for certificate signing), import `signer/universal` and call NewSigner -with a Root object containing the module, pin, token label and private label -from above, plus a path to your certificate. The structure of the Root object is -documented in `universal.go`. - -Alternately, you can construct a pkcs11key.Key or pkcs11key.Pool yourself, and -pass it to ocsp.NewSigner (for OCSP) or local.NewSigner (for certificate -signing). This will be necessary, for example, if you are using a single-session -token like the Yubikey and need both OCSP signing and certificate signing at the -same time. - -### Additional Documentation - -Additional documentation can be found in the "doc" directory: - -* `api/intro.txt`: documents the API endpoints -* `bootstrap.txt`: a walkthrough from building the package to getting - up and running diff --git a/vendor/github.com/containerd/cgroups/.gitignore b/vendor/github.com/containerd/cgroups/.gitignore new file mode 100644 index 0000000000..3465c14cf7 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/.gitignore @@ -0,0 +1,2 @@ +example/example +cmd/cgctl/cgctl diff --git a/vendor/github.com/containerd/cgroups/Makefile b/vendor/github.com/containerd/cgroups/Makefile new file mode 100644 index 0000000000..19e6607561 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/Makefile @@ -0,0 +1,24 @@ +# Copyright The containerd 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. + +PACKAGES=$(shell go list ./... | grep -v /vendor/) + +all: cgutil + go build -v + +cgutil: + cd cmd/cgctl && go build -v + +proto: + protobuild --quiet ${PACKAGES} diff --git a/vendor/github.com/containerd/cgroups/Protobuild.toml b/vendor/github.com/containerd/cgroups/Protobuild.toml new file mode 100644 index 0000000000..1c4c802fe1 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/Protobuild.toml @@ -0,0 +1,46 @@ +version = "unstable" +generator = "gogoctrd" +plugins = ["grpc"] + +# Control protoc include paths. Below are usually some good defaults, but feel +# free to try it without them if it works for your project. +[includes] + # Include paths that will be added before all others. Typically, you want to + # treat the root of the project as an include, but this may not be necessary. + # before = ["."] + + # Paths that should be treated as include roots in relation to the vendor + # directory. These will be calculated with the vendor directory nearest the + # target package. + # vendored = ["github.com/gogo/protobuf"] + packages = ["github.com/gogo/protobuf"] + + # Paths that will be added untouched to the end of the includes. We use + # `/usr/local/include` to pickup the common install location of protobuf. + # This is the default. + after = ["/usr/local/include", "/usr/include"] + +# This section maps protobuf imports to Go packages. These will become +# `-M` directives in the call to the go protobuf generator. +[packages] + "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" + "google/protobuf/any.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" + +# Aggregrate the API descriptors to lock down API changes. +[[descriptors]] +prefix = "github.com/containerd/cgroups/stats/v1" +target = "stats/v1/metrics.pb.txt" +ignore_files = [ + "google/protobuf/descriptor.proto", + "gogoproto/gogo.proto" +] +[[descriptors]] +prefix = "github.com/containerd/cgroups/v2/stats" +target = "v2/stats/metrics.pb.txt" +ignore_files = [ + "google/protobuf/descriptor.proto", + "gogoproto/gogo.proto" +] diff --git a/vendor/github.com/containerd/cgroups/Vagrantfile b/vendor/github.com/containerd/cgroups/Vagrantfile new file mode 100644 index 0000000000..4596ad8a7d --- /dev/null +++ b/vendor/github.com/containerd/cgroups/Vagrantfile @@ -0,0 +1,46 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| +# Fedora box is used for testing cgroup v2 support + config.vm.box = "fedora/32-cloud-base" + config.vm.provider :virtualbox do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provider :libvirt do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provision "shell", inline: <<-SHELL + set -eux -o pipefail + # configuration + GO_VERSION="1.15" + + # install gcc and Golang + dnf -y install gcc + curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local + + # setup env vars + cat >> /etc/profile.d/sh.local < /test.sh < +Abhinandan Prativadi +Ace-Tang +Akihiro Suda +Akihiro Suda +Allen Sun +Alexander Morozov +Antonio Ojea +Amit Krishnan +Andrei Vagin +Andrey Kolomentsev +Arnaud Porterie +Arnaud Porterie +Bob Mader +Boris Popovschi +Bowen Yan +Brent Baude +Cao Zhihao +Cao Zhihao +Carlos Eduardo +chenxiaoyu +Cory Bennett +Cristian Staretu +Cristian Staretu +Daniel Dao +Derek McGowan +Edgar Lee +Eric Ernst +Eric Ren +Eric Ren +Eric Ren +Fahed Dorgaa +Frank Yang +Fupan Li +Fupan Li +Georgia Panoutsakopoulou +Guangming Wang +Haiyan Meng +Harry Zhang +Hu Shuai +Hu Shuai +Iceber Gu +Jaana Burcu Dogan +Jess Valarezo +Jess Valarezo +Jian Liao +Jian Liao +Ji'an Liu +Jie Zhang +John Howard +John Howard +John Howard +John Howard +Lorenz Brun +Luc Perkins +Julien Balestra +Jun Lin Chen <1913688+mc256@users.noreply.github.com> +Justin Cormack +Justin Terry +Justin Terry +Kenfe-Mickaël Laventure +Kevin Kern +Kevin Parsons +Kevin Xu +Kohei Tokunaga +Krasi Georgiev +Lantao Liu +Lantao Liu +Li Yuxuan +Lifubang +Lu Jingxiao +Maksym Pavlenko +Maksym Pavlenko +Mario Hros +Mario Hros +Mario Macias +Mark Gordon +Michael Crosby +Michael Katsoulis +Mike Brown +Mohammad Asif Siddiqui +Nishchay Kumar +Oliver Stenbom +Phil Estes +Phil Estes +Reid Li +Robin Winkelewski +Ross Boucher +Ruediger Maass +Rui Cao +Sakeven Jiang +Samuel Karp +Seth Pellegrino <30441101+sethp-nr@users.noreply.github.com> +Shaobao Feng +Shengbo Song +Shengjing Zhu +Siddharth Yadav +SiYu Zhao +Stefan Berger +Stefan Berger +Stephen J Day +Stephen J Day +Stephen J Day +Sudeesh John +Su Fei +Su Xiaolin +Ted Yu +Tõnis Tiigi +Wade Lee +Wade Lee +Wade Lee <21621232@zju.edu.cn> +wanglei +Wei Fu +Wei Fu +Xiaodong Zhang +Xuean Yan +Yue Zhang +Yuxing Liu +Zhang Wei +zhangyadong +Zhenguang Zhu +Zhiyu Li +Zhiyu Li <404977848@qq.com> +Zhongming Chang +Zhoulin Xie +Zhoulin Xie <42261994+JoeWrightss@users.noreply.github.com> +张潇 diff --git a/vendor/github.com/containerd/containerd/.zuul.yaml b/vendor/github.com/containerd/containerd/.zuul.yaml new file mode 100644 index 0000000000..8c845725a8 --- /dev/null +++ b/vendor/github.com/containerd/containerd/.zuul.yaml @@ -0,0 +1,35 @@ +- project: + name: containerd/containerd + merge-mode: merge + check: + jobs: + - containerd-build-arm64 + - containerd-test-arm64 + - containerd-integration-test-arm64 + +- job: + name: containerd-build-arm64 + parent: init-test + description: | + Containerd build in openlab cluster. + run: .zuul/playbooks/containerd-build/run.yaml + nodeset: ubuntu-xenial-arm64-openlab + voting: false + +- job: + name: containerd-test-arm64 + parent: init-test + description: | + Containerd unit tests in openlab cluster. + run: .zuul/playbooks/containerd-build/unit-test.yaml + nodeset: ubuntu-xenial-arm64-openlab + voting: false + +- job: + name: containerd-integration-test-arm64 + parent: init-test + description: | + Containerd unit tests in openlab cluster. + run: .zuul/playbooks/containerd-build/integration-test.yaml + nodeset: ubuntu-xenial-arm64-openlab + voting: false diff --git a/vendor/github.com/containerd/containerd/ADOPTERS.md b/vendor/github.com/containerd/containerd/ADOPTERS.md new file mode 100644 index 0000000000..4d70cca639 --- /dev/null +++ b/vendor/github.com/containerd/containerd/ADOPTERS.md @@ -0,0 +1,48 @@ +## containerd Adopters + +A non-exhaustive list of containerd adopters is provided below. + +**_Docker/Moby engine_** - Containerd began life prior to its CNCF adoption as a lower-layer +runtime manager for `runc` processes below the Docker engine. Continuing today, containerd +has extremely broad production usage as a component of the [Docker engine](https://github.com/docker/docker-ce) +stack. Note that this includes any use of the open source [Moby engine project](https://github.com/moby/moby); +including the Balena project listed below. + +**_[IBM Cloud Kubernetes Service (IKS)](https://www.ibm.com/cloud/container-service)_** - offers containerd as the CRI runtime for v1.11 and higher versions. + +**_[IBM Cloud Private (ICP)](https://www.ibm.com/cloud/private)_** - IBM's on-premises cloud offering has containerd as a "tech preview" CRI runtime for the Kubernetes offered within this product for the past two releases, and plans to fully migrate to containerd in a future release. + +**_[Google Cloud Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine/)_** - offers containerd as the CRI runtime in **beta** for recent versions of Kubernetes. + +**_[AWS Fargate](https://aws.amazon.com/fargate)_** - uses containerd + Firecracker (noted below) as the runtime and isolation technology for containers run in the Fargate platform. Fargate is a serverless, container-native compute offering from Amazon Web Services. + +**_Cloud Foundry_** - The [Guardian container manager](https://github.com/cloudfoundry/guardian) for CF has been using OCI runC directly with additional code from CF managing the container image and filesystem interactions, but have recently migrated to use containerd as a replacement for the extra code they had written around runC. + +**_Alibaba's PouchContainer_** - The Alibaba [PouchContainer](https://github.com/alibaba/pouch) project uses containerd as its runtime for a cloud native offering that has unique isolation and image distribution capabilities. + +**_Rancher's k3s project_** - Rancher Labs [k3s](https://github.com/rancher/k3s) is a lightweight Kubernetes distribution; in their words: "Easy to install, half the memory, all in a binary less than 40mb." k8s uses containerd as the embedded runtime for this popular lightweight Kubernetes variant. + +**_Rancher's Rio project_** - Rancher Labs [Rio](https://github.com/rancher/rio) project uses containerd as the runtime for a combined Kubernetes, Istio, and container "Cloud Native Container Distribution" platform. + +**_Eliot_** - The [Eliot](https://github.com/ernoaapa/eliot) container project for IoT device container management uses containerd as the runtime. + +**_Balena_** - Resin's [Balena](https://github.com/resin-os/balena) container engine, based on moby/moby but for edge, embedded, and IoT use cases, uses the containerd and runc stack in the same way that the Docker engine uses containerd. + +**_LinuxKit_** - the Moby project's [LinuxKit](https://github.com/linuxkit/linuxkit) for building secure, minimal Linux OS images in a container-native model uses containerd as the core runtime for system and service containers. + +**_BuildKit_** - The Moby project's [BuildKit](https://github.com/moby/buildkit) can use either runC or containerd as build execution backends for building container images. BuildKit support has also been built into the Docker engine in recent releases, making BuildKit provide the backend to the `docker build` command. + +**_Azure acs-engine_** - Microsoft Azure's [acs-engine](https://github.com/Azure/acs-engine) open source project has customizable deployment of Kubernetes clusters, where containerd is a selectable container runtime. At some point in the future Azure's AKS service will default to use containerd as the CRI runtime for deployed Kubernetes clusters. + +**_Amazon Firecracker_** - The AWS [Firecracker VMM project](http://firecracker-microvm.io/) has extended containerd with a new snapshotter and v2 shim to allow containerd to drive virtualized container processes via their VMM implementation. More details on their containerd integration are available in [their GitHub project](https://github.com/firecracker-microvm/firecracker-containerd). + +**_Kata Containers_** - The [Kata containers](https://katacontainers.io/) lightweight-virtualized container runtime project integrates with containerd via a custom v2 shim implementation that drives the Kata container runtime. + +**_D2iQ Konvoy_** - D2iQ Inc [Konvoy](https://d2iq.com/products/konvoy) product uses containerd as the container runtime for its Kubernetes distribution. + +**_Inclavare Containers_** - [Inclavare Containers](https://github.com/alibaba/inclavare-containers) is an innovation of container runtime with the novel approach for launching protected containers in hardware-assisted Trusted Execution Environment (TEE) technology, aka Enclave, which can prevent the untrusted entity, such as Cloud Service Provider (CSP), from accessing the sensitive and confidential assets in use. + +**_Other Projects_** - While the above list provides a cross-section of well known uses of containerd, the simplicity and clear API layer for containerd has inspired many smaller projects around providing simple container management platforms. Several examples of building higher layer functionality on top of the containerd base have come from various containerd community participants: + - Michael Crosby's [boss](https://github.com/crosbymichael/boss) project, + - Evan Hazlett's [stellar](https://github.com/ehazlett/stellar) project, + - Paul Knopf's immutable Linux image builder project: [darch](https://github.com/godarch/darch). diff --git a/vendor/github.com/containerd/containerd/BUILDING.md b/vendor/github.com/containerd/containerd/BUILDING.md new file mode 100644 index 0000000000..b50c780f2c --- /dev/null +++ b/vendor/github.com/containerd/containerd/BUILDING.md @@ -0,0 +1,279 @@ +# Build containerd from source + +This guide is useful if you intend to contribute on containerd. Thanks for your +effort. Every contribution is very appreciated. + +This doc includes: +* [Build requirements](#build-requirements) +* [Build the development environment](#build-the-development-environment) +* [Build containerd](#build-containerd) +* [Via docker container](#via-docker-container) +* [Testing](#testing-containerd) + +## Build requirements + +To build the `containerd` daemon, and the `ctr` simple test client, the following build system dependencies are required: + +* Go 1.13.x or above except 1.14.x +* Protoc 3.x compiler and headers (download at the [Google protobuf releases page](https://github.com/google/protobuf/releases)) +* Btrfs headers and libraries for your distribution. Note that building the btrfs driver can be disabled via the build tag `no_btrfs`, removing this dependency. + +## Build the development environment + +First you need to setup your Go development environment. You can follow this +guideline [How to write go code](https://golang.org/doc/code.html) and at the +end you have `go` command in your `PATH`. + +You need `git` to checkout the source code: + +```sh +git clone https://github.com/containerd/containerd +``` + +For proper results, install the `protoc` release into `/usr/local` on your build system. For example, the following commands will download and install the 3.11.4 release for a 64-bit Linux host: + +``` +$ wget -c https://github.com/google/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip +$ sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local +``` + +`containerd` uses [Btrfs](https://en.wikipedia.org/wiki/Btrfs) it means that you +need to satisfy these dependencies in your system: + +* CentOS/Fedora: `yum install btrfs-progs-devel` +* Debian/Ubuntu: `apt-get install btrfs-progs libbtrfs-dev` + * Debian(before Buster)/Ubuntu(before 19.10): `apt-get install btrfs-tools` + +At this point you are ready to build `containerd` yourself! + +## Build runc + +`runc` is the default container runtime used by `containerd` and is required to +run containerd. While it is okay to download a runc binary and install that on +the system, sometimes it is necessary to build runc directly when working with +container runtime development. You can skip this step if you already have the +correct version of `runc` installed. + +`runc` requires `libseccomp`. You may need to install the missing dependencies: + +* CentOS/Fedora: `yum install libseccomp libseccomp-devel` +* Debian/Ubuntu: `apt-get install libseccomp libseccomp-dev` + + +For the quick and dirty installation, you can use the following: + +``` +git clone https://github.com/opencontainers/runc +cd runc +make +sudo make install +``` + +Make sure to follow the guidelines for versioning in [RUNC.md](/docs/RUNC.md) for the +best results. + +## Build containerd + +`containerd` uses `make` to create a repeatable build flow. It means that you +can run: + +``` +cd containerd +make +``` + +This is going to build all the project binaries in the `./bin/` directory. + +You can move them in your global path, `/usr/local/bin` with: + +```sudo +sudo make install +``` + +When making any changes to the gRPC API, you can use the installed `protoc` +compiler to regenerate the API generated code packages with: + +```sudo +make generate +``` + +> *Note*: Several build tags are currently available: +> * `no_btrfs`: A build tag disables building the btrfs snapshot driver. +> * `no_cri`: A build tag disables building Kubernetes [CRI](http://blog.kubernetes.io/2016/12/container-runtime-interface-cri-in-kubernetes.html) support into containerd. +> See [here](https://github.com/containerd/cri-containerd#build-tags) for build tags of CRI plugin. +> * `no_devmapper`: A build tag disables building the device mapper snapshot driver. +> +> For example, adding `BUILDTAGS=no_btrfs` to your environment before calling the **binaries** +> Makefile target will disable the btrfs driver within the containerd Go build. + +Vendoring of external imports uses the [Go Modules](https://golang.org/ref/mod#vendoring). You need +to use `go mod` command to modify the dependencies. After modifition, you should run `go mod tidy` +and `go mod vendor` to ensure the `go.mod`, `go.sum` files and `vendor` directory are up to date. +Changes to these files should become a single commit for a PR which relies on vendored updates. + +Please refer to [RUNC.md](/docs/RUNC.md) for the currently supported version of `runc` that is used by containerd. + +### Static binaries + +You can build static binaries by providing a few variables to `make`: + +```sudo +make EXTRA_FLAGS="-buildmode pie" \ + EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \ + BUILDTAGS="netgo osusergo static_build" +``` + +> *Note*: +> - static build is discouraged +> - static containerd binary does not support loading shared object plugins (`*.so`) + +# Via Docker container + +The following instructions assume you are at the parent directory of containerd source directory. + +## Build containerd + +You can build `containerd` via a Linux-based Docker container. +You can build an image from this `Dockerfile`: + +``` +FROM golang + +RUN apt-get update && \ + apt-get install -y libbtrfs-dev +``` + +Let's suppose that you built an image called `containerd/build`. From the +containerd source root directory you can run the following command: + +```sh +docker run -it \ + -v ${PWD}/containerd:/go/src/github.com/containerd/containerd \ + -e GOPATH=/go \ + -w /go/src/github.com/containerd/containerd containerd/build sh +``` + +This mounts `containerd` repository + +You are now ready to [build](#build-containerd): + +```sh + make && make install +``` + +## Build containerd and runc +To have complete core container runtime, you will need both `containerd` and `runc`. It is possible to build both of these via Docker container. + +You can use `git` to checkout `runc`: + +```sh +git clone https://github.com/opencontainers/runc +``` + +We can build an image from this `Dockerfile`: + +```sh +FROM golang + +RUN apt-get update && \ + apt-get install -y libbtrfs-dev libseccomp-dev + +``` + +In our Docker container we will build `runc` build, which includes +[seccomp](https://en.wikipedia.org/wiki/seccomp), [SELinux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux), +and [AppArmor](https://en.wikipedia.org/wiki/AppArmor) support. Seccomp support +in runc requires `libseccomp-dev` as a dependency (AppArmor and SELinux support +do not require external libraries at build time). Refer to [RUNC.md](docs/RUNC.md) +in the docs directory to for details about building runc, and to learn about +supported versions of `runc` as used by containerd. + +Let's suppose you build an image called `containerd/build` from the above Dockerfile. You can run the following command: + +```sh +docker run -it --privileged \ + -v /var/lib/containerd \ + -v ${PWD}/runc:/go/src/github.com/opencontainers/runc \ + -v ${PWD}/containerd:/go/src/github.com/containerd/containerd \ + -e GOPATH=/go \ + -w /go/src/github.com/containerd/containerd containerd/build sh +``` + +This mounts both `runc` and `containerd` repositories in our Docker container. + +From within our Docker container let's build `containerd`: + +```sh +cd /go/src/github.com/containerd/containerd +make && make install +``` + +These binaries can be found in the `./bin` directory in your host. +`make install` will move the binaries in your `$PATH`. + +Next, let's build `runc`: + +```sh +cd /go/src/github.com/opencontainers/runc +make && make install +``` + +For further details about building runc, refer to [RUNC.md](docs/RUNC.md) in the +docs directory. + +When working with `ctr`, the simple test client we just built, don't forget to start the daemon! + +```sh +containerd --config config.toml +``` + +# Testing containerd + +During the automated CI the unit tests and integration tests are run as part of the PR validation. As a developer you can run these tests locally by using any of the following `Makefile` targets: + - `make test`: run all non-integration tests that do not require `root` privileges + - `make root-test`: run all non-integration tests which require `root` + - `make integration`: run all tests, including integration tests and those which require `root`. `TESTFLAGS_PARALLEL` can be used to control parallelism. For example, `TESTFLAGS_PARALLEL=1 make integration` will lead a non-parallel execution. The default value of `TESTFLAGS_PARALLEL` is **8**. + +To execute a specific test or set of tests you can use the `go test` capabilities +without using the `Makefile` targets. The following examples show how to specify a test +name and also how to use the flag directly against `go test` to run root-requiring tests. + +```sh +# run the test : +go test -v -run "" . +# enable the root-requiring tests: +go test -v -run . -test.root +``` + +Example output from directly running `go test` to execute the `TestContainerList` test: +```sh +sudo go test -v -run "TestContainerList" . -test.root +INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0 +=== RUN TestContainerList +--- PASS: TestContainerList (0.00s) +PASS +ok github.com/containerd/containerd 4.778s +``` + +## Additional tools + +### containerd-stress +In addition to `go test`-based testing executed via the `Makefile` targets, the `containerd-stress` tool is available and built with the `all` or `binaries` targets and installed during `make install`. + +With this tool you can stress a running containerd daemon for a specified period of time, selecting a concurrency level to generate stress against the daemon. The following command is an example of having five workers running for two hours against a default containerd gRPC socket address: + +```sh +containerd-stress -c 5 -t 120 +``` + +For more information on this tool's options please run `containerd-stress --help`. + +### bucketbench +[Bucketbench](https://github.com/estesp/bucketbench) is an external tool which can be used to drive load against a container runtime, specifying a particular set of lifecycle operations to run with a specified amount of concurrency. Bucketbench is more focused on generating performance details than simply inducing load against containerd. + +Bucketbench differs from the `containerd-stress` tool in a few ways: + - Bucketbench has support for testing the Docker engine, the `runc` binary, and containerd 0.2.x (via `ctr`) and 1.0 (via the client library) branches. + - Bucketbench is driven via configuration file that allows specifying a list of lifecycle operations to execute. This can be used to generate detailed statistics per-command (e.g. start, stop, pause, delete). + - Bucketbench generates detailed reports and timing data at the end of the configured test run. + +More details on how to install and run `bucketbench` are available at the [GitHub project page](https://github.com/estesp/bucketbench). diff --git a/vendor/github.com/containerd/containerd/Makefile b/vendor/github.com/containerd/containerd/Makefile new file mode 100644 index 0000000000..ef7b7606ed --- /dev/null +++ b/vendor/github.com/containerd/containerd/Makefile @@ -0,0 +1,403 @@ +# Copyright The containerd 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. + + +# Go command to use for build +GO ?= go + +# Root directory of the project (absolute path). +ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + +# Base path used to install. +DESTDIR ?= /usr/local +TEST_IMAGE_LIST ?= + +# Used to populate variables in version package. +VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) +REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) +PACKAGE=github.com/containerd/containerd +SHIM_CGO_ENABLED ?= 0 + +ifneq "$(strip $(shell command -v $(GO) 2>/dev/null))" "" + GOOS ?= $(shell $(GO) env GOOS) + GOARCH ?= $(shell $(GO) env GOARCH) +else + ifeq ($(GOOS),) + # approximate GOOS for the platform if we don't have Go and GOOS isn't + # set. We leave GOARCH unset, so that may need to be fixed. + ifeq ($(OS),Windows_NT) + GOOS = windows + else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + GOOS = linux + endif + ifeq ($(UNAME_S),Darwin) + GOOS = darwin + endif + ifeq ($(UNAME_S),FreeBSD) + GOOS = freebsd + endif + endif + else + GOOS ?= $$GOOS + GOARCH ?= $$GOARCH + endif +endif + +ifndef GODEBUG + EXTRA_LDFLAGS += -s -w + DEBUG_GO_GCFLAGS := + DEBUG_TAGS := +else + DEBUG_GO_GCFLAGS := -gcflags=all="-N -l" + DEBUG_TAGS := static_build +endif + +WHALE = "🇩" +ONI = "👹" + +RELEASE=containerd-$(VERSION:v%=%).${GOOS}-${GOARCH} +CRIRELEASE=cri-containerd-$(VERSION:v%=%)-${GOOS}-${GOARCH} +CRICNIRELEASE=cri-containerd-cni-$(VERSION:v%=%)-${GOOS}-${GOARCH} + +PKG=github.com/containerd/containerd + +# Project binaries. +COMMANDS=ctr containerd containerd-stress +MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5 + +ifdef BUILDTAGS + GO_BUILDTAGS = ${BUILDTAGS} +endif +GO_BUILDTAGS ?= +GO_BUILDTAGS += ${DEBUG_TAGS} +GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",) +GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)' +SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)' + +# Project packages. +PACKAGES=$(shell $(GO) list ${GO_TAGS} ./... | grep -v /vendor/ | grep -v /integration) +TEST_REQUIRES_ROOT_PACKAGES=$(filter \ + ${PACKAGES}, \ + $(shell \ + for f in $$(git grep -l testutil.RequiresRoot | grep -v Makefile); do \ + d="$$(dirname $$f)"; \ + [ "$$d" = "." ] && echo "${PKG}" && continue; \ + echo "${PKG}/$$d"; \ + done | sort -u) \ + ) + +ifdef SKIPTESTS + PACKAGES:=$(filter-out ${SKIPTESTS},${PACKAGES}) + TEST_REQUIRES_ROOT_PACKAGES:=$(filter-out ${SKIPTESTS},${TEST_REQUIRES_ROOT_PACKAGES}) +endif + +#Replaces ":" (*nix), ";" (windows) with newline for easy parsing +GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n") + +TESTFLAGS_RACE= +GO_BUILD_FLAGS= +# See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809 +GO_GCFLAGS=$(shell \ + set -- ${GOPATHS}; \ + echo "-gcflags=-trimpath=$${1}/src"; \ + ) + +BINARIES=$(addprefix bin/,$(COMMANDS)) + +#include platform specific makefile +-include Makefile.$(GOOS) + +# Flags passed to `go test` +TESTFLAGS ?= $(TESTFLAGS_RACE) $(EXTRA_TESTFLAGS) +TESTFLAGS_PARALLEL ?= 8 + +# Use this to replace `go test` with, for instance, `gotestsum` +GOTEST ?= $(GO) test + +OUTPUTDIR = $(join $(ROOTDIR), _output) +CRIDIR=$(OUTPUTDIR)/cri + +.PHONY: clean all AUTHORS build binaries test integration generate protos checkprotos coverage ci check help install uninstall vendor release mandir install-man genman install-cri-deps cri-release cri-cni-release cri-integration install-deps bin/cri-integration.test +.DEFAULT: default + +all: binaries + +check: proto-fmt ## run all linters + @echo "$(WHALE) $@" + GOGC=75 golangci-lint run + +ci: check binaries checkprotos coverage coverage-integration ## to be used by the CI + +AUTHORS: .mailmap .git/HEAD + git log --format='%aN <%aE>' | sort -fu > $@ + +generate: protos + @echo "$(WHALE) $@" + @PATH="${ROOTDIR}/bin:${PATH}" $(GO) generate -x ${PACKAGES} + +protos: bin/protoc-gen-gogoctrd ## generate protobuf + @echo "$(WHALE) $@" + @PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${PACKAGES} + +check-protos: protos ## check if protobufs needs to be generated again + @echo "$(WHALE) $@" + @test -z "$$(git status --short | grep ".pb.go" | tee /dev/stderr)" || \ + ((git diff | cat) && \ + (echo "$(ONI) please run 'make protos' when making changes to proto files" && false)) + +check-api-descriptors: protos ## check that protobuf changes aren't present. + @echo "$(WHALE) $@" + @test -z "$$(git status --short | grep ".pb.txt" | tee /dev/stderr)" || \ + ((git diff $$(find . -name '*.pb.txt') | cat) && \ + (echo "$(ONI) please run 'make protos' when making changes to proto files and check-in the generated descriptor file changes" && false)) + +proto-fmt: ## check format of proto files + @echo "$(WHALE) $@" + @test -z "$$(find . -path ./vendor -prune -o -path ./protobuf/google/rpc -prune -o -name '*.proto' -type f -exec grep -Hn -e "^ " {} \; | tee /dev/stderr)" || \ + (echo "$(ONI) please indent proto files with tabs only" && false) + @test -z "$$(find . -path ./vendor -prune -o -name '*.proto' -type f -exec grep -Hn "Meta meta = " {} \; | grep -v '(gogoproto.nullable) = false' | tee /dev/stderr)" || \ + (echo "$(ONI) meta fields in proto files must have option (gogoproto.nullable) = false" && false) + +build: ## build the go packages + @echo "$(WHALE) $@" + @$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES} + +test: ## run tests, except integration tests and tests that require root + @echo "$(WHALE) $@" + @$(GOTEST) ${TESTFLAGS} ${PACKAGES} + +root-test: ## run tests, except integration tests + @echo "$(WHALE) $@" + @$(GOTEST) ${TESTFLAGS} ${TEST_REQUIRES_ROOT_PACKAGES} -test.root + +integration: ## run integration tests + @echo "$(WHALE) $@" + @cd "${ROOTDIR}/integration/client" && $(GO) mod download && $(GOTEST) -v ${TESTFLAGS} -test.root -parallel ${TESTFLAGS_PARALLEL} . + +# TODO integrate cri integration bucket with coverage +bin/cri-integration.test: + @echo "$(WHALE) $@" + @$(GO) test -c ./integration -o bin/cri-integration.test + +cri-integration: binaries bin/cri-integration.test ## run cri integration tests + @echo "$(WHALE) $@" + @./script/test/cri-integration.sh + @rm -rf bin/cri-integration.test + +benchmark: ## run benchmarks tests + @echo "$(WHALE) $@" + @$(GO) test ${TESTFLAGS} -bench . -run Benchmark -test.root + +FORCE: + +define BUILD_BINARY +@echo "$(WHALE) $@" +@$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$< +endef + +# Build a binary from a cmd. +bin/%: cmd/% FORCE + $(call BUILD_BINARY) + +bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 + @echo "$(WHALE) bin/containerd-shim" + @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim + +bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 + @echo "$(WHALE) bin/containerd-shim-runc-v1" + @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1 + +bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 + @echo "$(WHALE) bin/containerd-shim-runc-v2" + @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2 + +binaries: $(BINARIES) ## build binaries + @echo "$(WHALE) $@" + +man: mandir $(addprefix man/,$(MANPAGES)) + @echo "$(WHALE) $@" + +mandir: + @mkdir -p man + +# Kept for backwards compatibility +genman: man/containerd.8 man/ctr.8 + +man/containerd.8: FORCE + @echo "$(WHALE) $@" + $(GO) run cmd/gen-manpages/main.go $(@F) $(@D) + +man/ctr.8: FORCE + @echo "$(WHALE) $@" + $(GO) run cmd/gen-manpages/main.go $(@F) $(@D) + +man/%: docs/man/%.md FORCE + @echo "$(WHALE) $@" + go-md2man -in "$<" -out "$@" + +define installmanpage +mkdir -p $(DESTDIR)/man/man$(2); +gzip -c $(1) >$(DESTDIR)/man/man$(2)/$(3).gz; +endef + +install-man: + @echo "$(WHALE) $@" + $(foreach manpage,$(addprefix man/,$(MANPAGES)), $(call installmanpage,$(manpage),$(subst .,,$(suffix $(manpage))),$(notdir $(manpage)))) + +releases/$(RELEASE).tar.gz: $(BINARIES) + @echo "$(WHALE) $@" + @rm -rf releases/$(RELEASE) releases/$(RELEASE).tar.gz + @install -d releases/$(RELEASE)/bin + @install $(BINARIES) releases/$(RELEASE)/bin + @tar -czf releases/$(RELEASE).tar.gz -C releases/$(RELEASE) bin + @rm -rf releases/$(RELEASE) + +release: releases/$(RELEASE).tar.gz + @echo "$(WHALE) $@" + @cd releases && sha256sum $(RELEASE).tar.gz >$(RELEASE).tar.gz.sha256sum + +# install of cri deps into release output directory +ifeq ($(GOOS),windows) +install-cri-deps: $(BINARIES) + mkdir -p $(CRIDIR) + DESTDIR=$(CRIDIR) script/setup/install-cni-windows + cp bin/* $(CRIDIR) +else +install-cri-deps: $(BINARIES) + @rm -rf ${CRIDIR} + @install -d ${CRIDIR}/usr/local/bin + @install -D -m 755 bin/* ${CRIDIR}/usr/local/bin + @install -d ${CRIDIR}/opt/containerd/cluster + @cp -r contrib/gce ${CRIDIR}/opt/containerd/cluster/ + @install -d ${CRIDIR}/etc/systemd/system + @install -m 644 containerd.service ${CRIDIR}/etc/systemd/system + echo "CONTAINERD_VERSION: '$(VERSION:v%=%)'" | tee ${CRIDIR}/opt/containerd/cluster/version + + DESTDIR=$(CRIDIR) script/setup/install-runc + DESTDIR=$(CRIDIR) script/setup/install-cni + DESTDIR=$(CRIDIR) script/setup/install-critools + DESTDIR=$(CRIDIR) script/setup/install-imgcrypt + + @install -d $(CRIDIR)/bin + @install $(BINARIES) $(CRIDIR)/bin +endif + +ifeq ($(GOOS),windows) +releases/$(CRIRELEASE).tar.gz: install-cri-deps + @echo "$(WHALE) $@" + @cd $(CRIDIR) && tar -czf ../../releases/$(CRIRELEASE).tar.gz * + +releases/$(CRICNIRELEASE).tar.gz: install-cri-deps + @echo "$(WHALE) $@" + @cd $(CRIDIR) && tar -czf ../../releases/$(CRICNIRELEASE).tar.gz * +else +releases/$(CRIRELEASE).tar.gz: install-cri-deps + @echo "$(WHALE) $@" + @tar -czf releases/$(CRIRELEASE).tar.gz -C $(CRIDIR) etc/crictl.yaml etc/systemd usr opt/containerd + +releases/$(CRICNIRELEASE).tar.gz: install-cri-deps + @echo "$(WHALE) $@" + @tar -czf releases/$(CRICNIRELEASE).tar.gz -C $(CRIDIR) etc usr opt +endif + +cri-release: releases/$(CRIRELEASE).tar.gz + @echo "$(WHALE) $@" + @cd releases && sha256sum $(CRIRELEASE).tar.gz >$(CRIRELEASE).tar.gz.sha256sum && ln -sf $(CRIRELEASE).tar.gz cri-containerd.tar.gz + +cri-cni-release: releases/$(CRICNIRELEASE).tar.gz + @echo "$(WHALE) $@" + @cd releases && sha256sum $(CRICNIRELEASE).tar.gz >$(CRICNIRELEASE).tar.gz.sha256sum && ln -sf $(CRICNIRELEASE).tar.gz cri-cni-containerd.tar.gz + +clean: ## clean up binaries + @echo "$(WHALE) $@" + @rm -f $(BINARIES) + @rm -f releases/*.tar.gz* + @rm -rf $(OUTPUTDIR) + @rm -rf bin/cri-integration.test + +clean-test: ## clean up debris from previously failed tests + @echo "$(WHALE) $@" + $(eval containers=$(shell find /run/containerd/runc -mindepth 2 -maxdepth 3 -type d -exec basename {} \;)) + $(shell pidof containerd containerd-shim runc | xargs -r -n 1 kill -9) + @( for container in $(containers); do \ + grep $$container /proc/self/mountinfo | while read -r mountpoint; do \ + umount $$(echo $$mountpoint | awk '{print $$5}'); \ + done; \ + find /sys/fs/cgroup -name $$container -print0 | xargs -r -0 rmdir; \ + done ) + @rm -rf /run/containerd/runc/* + @rm -rf /run/containerd/fifo/* + @rm -rf /run/containerd-test/* + @rm -rf bin/cri-integration.test + +install: ## install binaries + @echo "$(WHALE) $@ $(BINARIES)" + @mkdir -p $(DESTDIR)/bin + @install $(BINARIES) $(DESTDIR)/bin + +uninstall: + @echo "$(WHALE) $@" + @rm -f $(addprefix $(DESTDIR)/bin/,$(notdir $(BINARIES))) + +ifeq ($(GOOS),windows) +install-deps: + # TODO: need a script for hcshim something like containerd/cri/hack/install/windows/install-hcsshim.sh + script/setup/install-critools + script/setup/install-cni-windows +else +install-deps: ## install cri dependencies + script/setup/install-seccomp + script/setup/install-runc + script/setup/install-critools + script/setup/install-cni +endif + +coverage: ## generate coverprofiles from the unit tests, except tests that require root + @echo "$(WHALE) $@" + @rm -f coverage.txt + @$(GO) test -i ${TESTFLAGS} ${PACKAGES} 2> /dev/null + @( for pkg in ${PACKAGES}; do \ + $(GO) test ${TESTFLAGS} \ + -cover \ + -coverprofile=profile.out \ + -covermode=atomic $$pkg || exit; \ + if [ -f profile.out ]; then \ + cat profile.out >> coverage.txt; \ + rm profile.out; \ + fi; \ + done ) + +root-coverage: ## generate coverage profiles for unit tests that require root + @echo "$(WHALE) $@" + @$(GO) test -i ${TESTFLAGS} ${TEST_REQUIRES_ROOT_PACKAGES} 2> /dev/null + @( for pkg in ${TEST_REQUIRES_ROOT_PACKAGES}; do \ + $(GO) test ${TESTFLAGS} \ + -cover \ + -coverprofile=profile.out \ + -covermode=atomic $$pkg -test.root || exit; \ + if [ -f profile.out ]; then \ + cat profile.out >> coverage.txt; \ + rm profile.out; \ + fi; \ + done ) + +vendor: ## vendor + @echo "$(WHALE) $@" + @$(GO) mod tidy + @$(GO) mod vendor + +help: ## this help + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort diff --git a/vendor/github.com/containerd/containerd/Makefile.darwin b/vendor/github.com/containerd/containerd/Makefile.darwin new file mode 100644 index 0000000000..5303ca40ac --- /dev/null +++ b/vendor/github.com/containerd/containerd/Makefile.darwin @@ -0,0 +1,22 @@ +# Copyright The containerd 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. + + +#darwin specific settings +COMMANDS += containerd-shim + +# amd64 supports go test -race +ifeq ($(GOARCH),amd64) + TESTFLAGS_RACE= -race +endif diff --git a/vendor/github.com/containerd/containerd/Makefile.freebsd b/vendor/github.com/containerd/containerd/Makefile.freebsd new file mode 100644 index 0000000000..78e7f2de45 --- /dev/null +++ b/vendor/github.com/containerd/containerd/Makefile.freebsd @@ -0,0 +1,22 @@ +# Copyright The containerd 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. + + +#freebsd specific settings +COMMANDS += containerd-shim + +# amd64 supports go test -race +ifeq ($(GOARCH),amd64) + TESTFLAGS_RACE= -race +endif diff --git a/vendor/github.com/containerd/containerd/Makefile.linux b/vendor/github.com/containerd/containerd/Makefile.linux new file mode 100644 index 0000000000..c3385313d6 --- /dev/null +++ b/vendor/github.com/containerd/containerd/Makefile.linux @@ -0,0 +1,31 @@ +# Copyright The containerd 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. + + +#linux specific settings +WHALE="+" +ONI="-" +COMMANDS += containerd-shim containerd-shim-runc-v1 containerd-shim-runc-v2 + +# check GOOS for cross compile builds +ifeq ($(GOOS),linux) + ifneq ($(GOARCH),$(filter $(GOARCH),mips mipsle mips64 mips64le ppc64 riscv64)) + GO_GCFLAGS += -buildmode=pie + endif +endif + +# amd64 supports go test -race +ifeq ($(GOARCH),amd64) + TESTFLAGS_RACE= -race +endif diff --git a/vendor/github.com/containerd/containerd/Makefile.windows b/vendor/github.com/containerd/containerd/Makefile.windows new file mode 100644 index 0000000000..56164e4247 --- /dev/null +++ b/vendor/github.com/containerd/containerd/Makefile.windows @@ -0,0 +1,28 @@ +# Copyright The containerd 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. + + +#Windows specific settings. +WHALE = "+" +ONI = "-" + +# amd64 supports go test -race +ifeq ($(GOARCH),amd64) + TESTFLAGS_RACE= -race +endif + +BINARIES:=$(addsuffix .exe,$(BINARIES)) + +bin/%.exe: cmd/% FORCE + $(BUILD_BINARY) diff --git a/vendor/github.com/containerd/containerd/Protobuild.toml b/vendor/github.com/containerd/containerd/Protobuild.toml new file mode 100644 index 0000000000..d88fcd68d4 --- /dev/null +++ b/vendor/github.com/containerd/containerd/Protobuild.toml @@ -0,0 +1,71 @@ +version = "unstable" +generator = "gogoctrd" +plugins = ["grpc", "fieldpath"] + +# Control protoc include paths. Below are usually some good defaults, but feel +# free to try it without them if it works for your project. +[includes] + # Include paths that will be added before all others. Typically, you want to + # treat the root of the project as an include, but this may not be necessary. + before = ["./protobuf"] + + # Paths that should be treated as include roots in relation to the vendor + # directory. These will be calculated with the vendor directory nearest the + # target package. + packages = ["github.com/gogo/protobuf", "github.com/gogo/googleapis"] + + # Paths that will be added untouched to the end of the includes. We use + # `/usr/local/include` to pickup the common install location of protobuf. + # This is the default. + after = ["/usr/local/include", "/usr/include"] + +# This section maps protobuf imports to Go packages. These will become +# `-M` directives in the call to the go protobuf generator. +[packages] + "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" + "google/protobuf/any.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/empty.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" + "google/protobuf/duration.proto" = "github.com/gogo/protobuf/types" + "google/rpc/status.proto" = "github.com/gogo/googleapis/google/rpc" + +[[overrides]] +prefixes = ["github.com/containerd/containerd/api/events"] +plugins = ["fieldpath"] # disable grpc for this package + +[[overrides]] +prefixes = ["github.com/containerd/containerd/api/services/ttrpc/events/v1"] +plugins = ["ttrpc", "fieldpath"] + +[[overrides]] +# enable ttrpc and disable fieldpath and grpc for the shim +prefixes = ["github.com/containerd/containerd/runtime/v1/shim/v1", "github.com/containerd/containerd/runtime/v2/task"] +plugins = ["ttrpc"] + +# Aggregrate the API descriptors to lock down API changes. +[[descriptors]] +prefix = "github.com/containerd/containerd/api" +target = "api/next.pb.txt" +ignore_files = [ + "google/protobuf/descriptor.proto", + "gogoproto/gogo.proto" +] + +# Lock down runc config +[[descriptors]] +prefix = "github.com/containerd/containerd/runtime/linux/runctypes" +target = "runtime/linux/runctypes/next.pb.txt" +ignore_files = [ + "google/protobuf/descriptor.proto", + "gogoproto/gogo.proto" +] + +[[descriptors]] +prefix = "github.com/containerd/containerd/runtime/v2/runc/options" +target = "runtime/v2/runc/options/next.pb.txt" +ignore_files = [ + "google/protobuf/descriptor.proto", + "gogoproto/gogo.proto" +] diff --git a/vendor/github.com/containerd/containerd/RELEASES.md b/vendor/github.com/containerd/containerd/RELEASES.md new file mode 100644 index 0000000000..3fda9964aa --- /dev/null +++ b/vendor/github.com/containerd/containerd/RELEASES.md @@ -0,0 +1,329 @@ +# Versioning and Release + +This document details the versioning and release plan for containerd. Stability +is a top goal for this project and we hope that this document and the processes +it entails will help to achieve that. It covers the release process, versioning +numbering, backporting, API stability and support horizons. + +If you rely on containerd, it would be good to spend time understanding the +areas of the API that are and are not supported and how they impact your +project in the future. + +This document will be considered a living document. Supported timelines, +backport targets and API stability guarantees will be updated here as they +change. + +If there is something that you require or this document leaves out, please +reach out by [filing an issue](https://github.com/containerd/containerd/issues). + +## Releases + +Releases of containerd will be versioned using dotted triples, similar to +[Semantic Version](http://semver.org/). For the purposes of this document, we +will refer to the respective components of this triple as +`..`. The version number may have additional information, +such as alpha, beta and release candidate qualifications. Such releases will be +considered "pre-releases". + +### Major and Minor Releases + +Major and minor releases of containerd will be made from master. Releases of +containerd will be marked with GPG signed tags and announced at +https://github.com/containerd/containerd/releases. The tag will be of the +format `v..` and should be made with the command `git tag +-s v..`. + +After a minor release, a branch will be created, with the format +`release/.` from the minor tag. All further patch releases will +be done from that branch. For example, once we release `v1.0.0`, a branch +`release/1.0` will be created from that tag. All future patch releases will be +done against that branch. + +### Pre-releases + +Pre-releases, such as alphas, betas and release candidates will be conducted +from their source branch. For major and minor releases, these releases will be +done from master. For patch releases, these pre-releases should be done within +the corresponding release branch. + +While pre-releases are done to assist in the stabilization process, no +guarantees are provided. + +### Upgrade Path + +The upgrade path for containerd is such that the 0.0.x patch releases are +always backward compatible with its major and minor version. Minor (0.x.0) +version will always be compatible with the previous minor release. i.e. 1.2.0 +is backwards compatible with 1.1.0 and 1.1.0 is compatible with 1.0.0. There is +no compatibility guarantees for upgrades that span multiple, _minor_ releases. +For example, 1.0.0 to 1.2.0 is not supported. One should first upgrade to 1.1, +then 1.2. + +There are no compatibility guarantees with upgrades to _major_ versions. For +example, upgrading from 1.0.0 to 2.0.0 may require resources to migrated or +integrations to change. Each major version will be supported for at least 1 +year with bug fixes and security patches. + +### Next Release + +The activity for the next release will be tracked in the +[milestones](https://github.com/containerd/containerd/milestones). If your +issue or PR is not present in a milestone, please reach out to the maintainers +to create the milestone or add an issue or PR to an existing milestone. + +### Support Horizon + +Support horizons will be defined corresponding to a release branch, identified +by `.`. Releases branches will be in one of several states: + +- __*Next*__: The next planned release branch. +- __*Active*__: The release branch is currently supported and accepting patches. +- __*Extended*__: The release branch is only accepting security patches. +- __*End of Life*__: The release branch is no longer supported and no new patches will be accepted. + +Releases will be supported up to one year after a _minor_ release. This means that +we will accept bug reports and backports to release branches until the end of +life date. If no new _minor_ release has been made, that release will be +considered supported until 6 months after the next _minor_ is released or one year, +whichever is longer. Additionally, releases may have an extended security support +period after the end of the active period to accept security backports. This +timeframe will be decided by maintainers before the end of the active status. + +The current state is available in the following table: + +| Release | Status | Start | End of Life | +|---------|-------------|------------------|-------------------| +| [0.0](https://github.com/containerd/containerd/releases/tag/0.0.5) | End of Life | Dec 4, 2015 | - | +| [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - | +| [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 | +| [1.0](https://github.com/containerd/containerd/releases/tag/v1.0.3) | End of Life | December 5, 2017 | December 5, 2018 | +| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.8) | End of Life | April 23, 2018 | October 23, 2019 | +| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.13) | End of Life | October 24, 2018 | October 15, 2020 | +| [1.3](https://github.com/containerd/containerd/releases/tag/v1.3.10) | End of Life | September 26, 2019 | March 4, 2021 | +| [1.4](https://github.com/containerd/containerd/releases/tag/v1.4.4) | Active | August 17, 2020 | max(August 17, 2021, release of 1.5.0 + 6 months) | +| [1.5](https://github.com/containerd/containerd/milestone/30) | Next | TBD | max(TBD+1 year, release of 1.6.0 + 6 months) | + +Note that branches and release from before 1.0 may not follow these rules. + +This table should be updated as part of the release preparation process. + +### Backporting + +Backports in containerd are community driven. As maintainers, we'll try to +ensure that sensible bugfixes make it into _active_ release, but our main focus +will be features for the next _minor_ or _major_ release. For the most part, +this process is straightforward and we are here to help make it as smooth as +possible. + +If there are important fixes that need to be backported, please let use know in +one of three ways: + +1. Open an issue. +2. Open a PR with cherry-picked change from master. +3. Open a PR with a ported fix. + +__If you are reporting a security issue, please reach out discreetly at security@containerd.io__. +Remember that backported PRs must follow the versioning guidelines from this document. + +Any release that is "active" can accept backports. Opening a backport PR is +fairly straightforward. The steps differ depending on whether you are pulling +a fix from master or need to draft a new commit specific to a particular +branch. + +To cherry pick a straightforward commit from master, simply use the cherry pick +process: + +1. Pick the branch to which you want backported, usually in the format + `release/.`. The following will create a branch you can + use to open a PR: + + ```console + $ git checkout -b my-backport-branch release/.. + ``` + +2. Find the commit you want backported. +3. Apply it to the release branch: + + ```console + $ git cherry-pick -xsS + ``` +4. Push the branch and open up a PR against the _release branch_: + + ``` + $ git push -u stevvooe my-backport-branch + ``` + + Make sure to replace `stevvooe` with whatever fork you are using to open + the PR. When you open the PR, make sure to switch `master` with whatever + release branch you are targeting with the fix. Make sure the PR title has + `[]` prefixed. e.g.: + + ``` + [release/1.4] Fix foo in bar + ``` + +If there is no existing fix in master, you should first fix the bug in master, +or ask us a maintainer or contributor to do it via an issue. Once that PR is +completed, open a PR using the process above. + +Only when the bug is not seen in master and must be made for the specific +release branch should you open a PR with new code. + +## Public API Stability + +The following table provides an overview of the components covered by +containerd versions: + + +| Component | Status | Stabilized Version | Links | +|------------------|----------|--------------------|---------------| +| GRPC API | Stable | 1.0 | [api/](api) | +| Metrics API | Stable | 1.0 | - | +| Runtime Shim API | Stable | 1.2 | - | +| Daemon Config | Stable | 1.0 | - | +| Go client API | Unstable | _future_ | [godoc](https://godoc.org/github.com/containerd/containerd) | +| CRI GRPC API | Unstable | v1alpha2 _current_ | [cri-api](https://github.com/kubernetes/cri-api/tree/master/pkg/apis/runtime/v1alpha2) | +| `ctr` tool | Unstable | Out of scope | - | + +From the version stated in the above table, that component must adhere to the +stability constraints expected in release versions. + +Unless explicitly stated here, components that are called out as unstable or +not covered may change in a future minor version. Breaking changes to +"unstable" components will be avoided in patch versions. + +### GRPC API + +The primary product of containerd is the GRPC API. As of the 1.0.0 release, the +GRPC API will not have any backwards incompatible changes without a _major_ +version jump. + +To ensure compatibility, we have collected the entire GRPC API symbol set into +a single file. At each _minor_ release of containerd, we will move the current +`next.pb.txt` file to a file named for the minor version, such as `1.0.pb.txt`, +enumerating the support services and messages. See [api/](api) for details. + +Note that new services may be added in _minor_ releases. New service methods +and new fields on messages may be added if they are optional. + +`*.pb.txt` files are generated at each API release. They prevent unintentional changes +to the API by having a diff that the CI can run. These files are not intended to be +consumed or used by clients. + +### Metrics API + +The metrics API that outputs prometheus style metrics will be versioned independently, +prefixed with the API version. i.e. `/v1/metrics`, `/v2/metrics`. + +The metrics API version will be incremented when breaking changes are made to the prometheus +output. New metrics can be added to the output in a backwards compatible manner without +bumping the API version. + +### Plugins API + +containerd is based on a modular design where plugins are implemented to provide the core functionality. +Plugins implemented in tree are supported by the containerd community unless explicitly specified as non-stable. +Out of tree plugins are not supported by the containerd maintainers. + +Currently, the Windows runtime and snapshot plugins are not stable and not supported. +Please refer to the github milestones for Windows support in a future release. + +#### Error Codes + +Error codes will not change in a patch release, unless a missing error code +causes a blocking bug. Error codes of type "unknown" may change to more +specific types in the future. Any error code that is not "unknown" that is +currently returned by a service will not change without a _major_ release or a +new version of the service. + +If you find that an error code that is required by your application is not +well-documented in the protobuf service description or tested explicitly, +please file and issue and we will clarify. + +#### Opaque Fields + +Unless explicitly stated, the formats of certain fields may not be covered by +this guarantee and should be treated opaquely. For example, don't rely on the +format details of a URL field unless we explicitly say that the field will +follow that format. + +### Go client API + +The Go client API, documented in +[godoc](https://godoc.org/github.com/containerd/containerd), is currently +considered unstable. It is recommended to vendor the necessary components to +stabilize your project build. Note that because the Go API interfaces with the +GRPC API, clients written against a 1.0 Go API should remain compatible with +future 1.x series releases. + +We intend to stabilize the API in a future release when more integrations have +been carried out. + +Any changes to the API should be detectable at compile time, so upgrading will +be a matter of fixing compilation errors and moving from there. + +### CRI GRPC API + +The CRI (Container Runtime Interface) GRPC API is used by a Kubernetes kubelet +to communicate with a container runtime. This interface is used to manage +container lifecycles and container images. Currently this API is under +development and unstable across Kubernetes releases. Each Kubernetes release +only supports a single version of CRI and the CRI plugin only implements a +single version of CRI. + +Each _minor_ release will support one version of CRI and at least one version +of Kubernetes. Once this API is stable, a _minor_ will be compatible with any +version of Kubernetes which supports that version of CRI. + +### `ctr` tool + +The `ctr` tool provides the ability to introspect and understand the containerd +API. It is not considered a primary offering of the project and is unsupported in +that sense. While we understand it's value as a debug tool, it may be completely +refactored or have breaking changes in _minor_ releases. + +Targeting `ctr` for feature additions reflects a misunderstanding of the containerd +architecture. Feature addition should focus on the client Go API and additions to +`ctr` may or may not be accepted at the discretion of the maintainers. + +We will do our best to not break compatibility in the tool in _patch_ releases. + +### Daemon Configuration + +The daemon's configuration file, commonly located in `/etc/containerd/config.toml` +is versioned and backwards compatible. The `version` field in the config +file specifies the config's version. If no version number is specified inside +the config file then it is assumed to be a version 1 config and parsed as such. +Please use `version = 2` to enable version 2 config as version 1 has been +deprecated. + +### Not Covered + +As a general rule, anything not mentioned in this document is not covered by +the stability guidelines and may change in any release. Explicitly, this +pertains to this non-exhaustive list of components: + +- File System layout +- Storage formats +- Snapshot formats + +Between upgrades of subsequent, _minor_ versions, we may migrate these formats. +Any outside processes relying on details of these file system layouts may break +in that process. Container root file systems will be maintained on upgrade. + +### Exceptions + +We may make exceptions in the interest of __security patches__. If a break is +required, it will be communicated clearly and the solution will be considered +against total impact. + +## Deprecated features + +The deprecated features are shown in the following table: + +| Component | Deprecation release | Target release for removal | Recommendation | +|----------------------------------------------------------------------|---------------------|----------------------------|-------------------------------| +| Runtime V1 API and implementation (`io.containerd.runtime.v1.linux`) | containerd v1.4 | containerd v2.0 | Use `io.containerd.runc.v2` | +| Runc V1 implementation of Runtime V2 (`io.containerd.runc.v1`) | containerd v1.4 | containerd v2.0 | Use `io.containerd.runc.v2` | +| config.toml `version = 1` | containerd v1.5 | containerd v2.0 | Use config.toml `version = 2` | +| Built-in `aufs` snapshotter | containerd v1.5 | containerd v2.0 | Use `overlayfs` snapshotter | diff --git a/vendor/github.com/containerd/containerd/ROADMAP.md b/vendor/github.com/containerd/containerd/ROADMAP.md new file mode 100644 index 0000000000..aacd107392 --- /dev/null +++ b/vendor/github.com/containerd/containerd/ROADMAP.md @@ -0,0 +1,28 @@ +# containerd roadmap + +containerd uses the issues and milestones to define its roadmap. +`ROADMAP.md` files are common in open source projects but we find they quickly become out of date. +We opt for an issues and milestone approach that our maintainers and community can keep up-to-date as work is added and completed. + +## Issues + +Issues tagged with the `roadmap` label are high level roadmap items. +They are tasks and/or features that the containerd community wants completed. + +Smaller issues and pull requests can reference back to the main roadmap issue that is tagged to help detail progress towards the overall goal. + +## Milestones + +Milestones define when an issue, pull request, and/or roadmap item is to be completed. +Issues are the what, milestones are the when. +Development is complex therefore roadmap items can move between milestones depending on the remaining development and testing required to release a change. + +## Searching + +To find the roadmap items currently planned for containerd you can filter on the `roadmap` label. + +[Search Roadmap Items](https://github.com/containerd/containerd/issues?q=is%3Aopen+is%3Aissue+label%3Aroadmap) + +After searching for roadmap items you can view what milestone they are scheduled to be completed in along with the progress. + +[View Milestones](https://github.com/containerd/containerd/milestones) diff --git a/vendor/github.com/containerd/containerd/SCOPE.md b/vendor/github.com/containerd/containerd/SCOPE.md new file mode 100644 index 0000000000..aec9da9158 --- /dev/null +++ b/vendor/github.com/containerd/containerd/SCOPE.md @@ -0,0 +1,57 @@ +# Scope and Principles + +Having a clearly defined scope of a project is important for ensuring consistency and focus. +These following criteria will be used when reviewing pull requests, features, and changes for the project before being accepted. + +### Components + +Components should not have tight dependencies on each other so that they are able to be used independently. +The APIs for images and containers should be designed in a way that when used together the components have a natural flow but still be useful independently. + +An example for this design can be seen with the overlay filesystems and the container execution layer. +The execution layer and overlay filesystems can be used independently but if you were to use both, they share a common `Mount` struct that the filesystems produce and the execution layer consumes. + +### Primitives + +containerd should expose primitives to solve problems instead of building high level abstractions in the API. +A common example of this is how build would be implemented. +Instead of having a build API in containerd we should expose the lower level primitives that allow things required in build to work. +Breaking up the filesystem APIs to allow snapshots, copy functionality, and mounts allow people implementing build at the higher levels with more flexibility. + +### Extensibility and Defaults + +For the various components in containerd there should be defined extension points where implementations can be swapped for alternatives. +The best example of this is that containerd will use `runc` from OCI as the default runtime in the execution layer but other runtimes conforming to the OCI Runtime specification can be easily added to containerd. + +containerd will come with a default implementation for the various components. +These defaults will be chosen by the maintainers of the project and should not change unless better tech for that component comes out. +Additional implementations will not be accepted into the core repository and should be developed in a separate repository not maintained by the containerd maintainers. + + +## Scope + +The following table specifies the various components of containerd and general features of container runtimes. +The table specifies whether or not the feature/component is in or out of scope. + +| Name | Description | In/Out | Reason | +|------------------------------|--------------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| execution | Provide an extensible execution layer for executing a container | in | Create,start, stop pause, resume exec, signal, delete | +| cow filesystem | Built in functionality for overlay, aufs, and other copy on write filesystems for containers | in | | +| distribution | Having the ability to push and pull images as well as operations on images as a first class API object | in | containerd will fully support the management and retrieval of images | +| metrics | container-level metrics, cgroup stats, and OOM events | in | +| networking | creation and management of network interfaces | out | Networking will be handled and provided to containerd via higher level systems. | +| build | Building images as a first class API | out | Build is a higher level tooling feature and can be implemented in many different ways on top of containerd | +| volumes | Volume management for external data | out | The API supports mounts, binds, etc where all volumes type systems can be built on top of containerd. | +| logging | Persisting container logs | out | Logging can be build on top of containerd because the container’s STDIO will be provided to the clients and they can persist any way they see fit. There is no io copying of container STDIO in containerd. | + + +containerd is scoped to a single host and makes assumptions based on that fact. +It can be used to build things like a node agent that launches containers but does not have any concepts of a distributed system. + +containerd is designed to be embedded into a larger system, hence it only includes a barebone CLI (`ctr`) specifically for development and debugging purpose, with no mandate to be human-friendly, and no guarantee of interface stability over time. + +### How is the scope changed? + +The scope of this project is an allowed list. +If it's not mentioned as being in scope, it is out of scope. +For the scope of this project to change it requires a 100% vote from all maintainers of the project. diff --git a/vendor/github.com/containerd/containerd/Vagrantfile b/vendor/github.com/containerd/containerd/Vagrantfile new file mode 100644 index 0000000000..7c5c072779 --- /dev/null +++ b/vendor/github.com/containerd/containerd/Vagrantfile @@ -0,0 +1,260 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Copyright The containerd 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. + +# Vagrantfile for cgroup2 and SELinux +Vagrant.configure("2") do |config| + config.vm.box = "fedora/34-cloud-base" + memory = 4096 + cpus = 2 + config.vm.provider :virtualbox do |v| + v.memory = memory + v.cpus = cpus + end + config.vm.provider :libvirt do |v| + v.memory = memory + v.cpus = cpus + end + + # Disabled by default. To run: + # vagrant up --provision-with=upgrade-packages + # To upgrade only specific packages: + # UPGRADE_PACKAGES=selinux vagrant up --provision-with=upgrade-packages + # + config.vm.provision "upgrade-packages", type: "shell", run: "never" do |sh| + sh.upload_path = "/tmp/vagrant-upgrade-packages" + sh.env = { + 'UPGRADE_PACKAGES': ENV['UPGRADE_PACKAGES'], + } + sh.inline = <<~SHELL + #!/usr/bin/env bash + set -eux -o pipefail + dnf -y upgrade ${UPGRADE_PACKAGES} + SHELL + end + + # To re-run, installing CNI from RPM: + # INSTALL_PACKAGES="containernetworking-plugins" vagrant up --provision-with=install-packages + # + config.vm.provision "install-packages", type: "shell", run: "once" do |sh| + sh.upload_path = "/tmp/vagrant-install-packages" + sh.env = { + 'INSTALL_PACKAGES': ENV['INSTALL_PACKAGES'], + } + sh.inline = <<~SHELL + #!/usr/bin/env bash + set -eux -o pipefail + dnf -y install \ + container-selinux \ + curl \ + gcc \ + git \ + iptables \ + libseccomp-devel \ + libselinux-devel \ + lsof \ + make \ + ${INSTALL_PACKAGES} + SHELL + end + + # To re-run this provisioner, installing a different version of go: + # GO_VERSION="1.14.6" vagrant up --provision-with=install-golang + # + config.vm.provision "install-golang", type: "shell", run: "once" do |sh| + sh.upload_path = "/tmp/vagrant-install-golang" + sh.env = { + 'GO_VERSION': ENV['GO_VERSION'] || "1.16.10", + } + sh.inline = <<~SHELL + #!/usr/bin/env bash + set -eux -o pipefail + curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local + cat >> /etc/environment <> /etc/profile.d/sh.local < /tmp/containerd.log + systemctl stop containerd + } + selinux=$(getenforce) + if [[ $selinux == Enforcing ]]; then + setenforce 0 + fi + systemctl enable --now ${GOPATH}/src/github.com/containerd/containerd/containerd.service + if [[ $selinux == Enforcing ]]; then + setenforce 1 + fi + trap cleanup EXIT + ctr version + critest --parallel=$(nproc) --report-dir="${REPORT_DIR}" --ginkgo.skip='HostIpc is true' + SHELL + end + +end diff --git a/vendor/github.com/containerd/containerd/api/README.md b/vendor/github.com/containerd/containerd/api/README.md deleted file mode 100644 index f6eb28c6a5..0000000000 --- a/vendor/github.com/containerd/containerd/api/README.md +++ /dev/null @@ -1,18 +0,0 @@ -This directory contains the GRPC API definitions for containerd. - -All defined services and messages have been aggregated into `*.pb.txt` -descriptors files in this directory. Definitions present here are considered -frozen after the release. - -At release time, the current `next.pb.txt` file will be moved into place to -freeze the API changes for the minor version. For example, when 1.0.0 is -released, `next.pb.txt` should be moved to `1.0.txt`. Notice that we leave off -the patch number, since the API will be completely locked down for a given -patch series. - -We may find that by default, protobuf descriptors are too noisy to lock down -API changes. In that case, we may filter out certain fields in the descriptors, -possibly regenerating for old versions. - -This process is similar to the [process used to ensure backwards compatibility -in Go](https://github.com/golang/go/tree/master/api). diff --git a/vendor/github.com/containerd/containerd/code-of-conduct.md b/vendor/github.com/containerd/containerd/code-of-conduct.md new file mode 100644 index 0000000000..e32b71372b --- /dev/null +++ b/vendor/github.com/containerd/containerd/code-of-conduct.md @@ -0,0 +1,3 @@ +## containerd Community Code of Conduct + +containerd follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/vendor/github.com/containerd/containerd/codecov.yml b/vendor/github.com/containerd/containerd/codecov.yml new file mode 100644 index 0000000000..69cb76019a --- /dev/null +++ b/vendor/github.com/containerd/containerd/codecov.yml @@ -0,0 +1 @@ +comment: false diff --git a/vendor/github.com/containerd/containerd/containerd.service b/vendor/github.com/containerd/containerd/containerd.service new file mode 100644 index 0000000000..e4c082b3a4 --- /dev/null +++ b/vendor/github.com/containerd/containerd/containerd.service @@ -0,0 +1,40 @@ +# Copyright The containerd 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. + +[Unit] +Description=containerd container runtime +Documentation=https://containerd.io +After=network.target local-fs.target + +[Service] +ExecStartPre=-/sbin/modprobe overlay +ExecStart=/usr/local/bin/containerd + +Type=notify +Delegate=yes +KillMode=process +Restart=always +RestartSec=5 +# Having non-zero Limit*s causes performance problems due to accounting overhead +# in the kernel. We recommend using cgroups to do container-local accounting. +LimitNPROC=infinity +LimitCORE=infinity +LimitNOFILE=infinity +# Comment TasksMax if your systemd version does not supports it. +# Only systemd 226 and above support this version. +TasksMax=infinity +OOMScoreAdjust=-999 + +[Install] +WantedBy=multi-user.target diff --git a/vendor/github.com/containerd/containerd/contrib/README.md b/vendor/github.com/containerd/containerd/contrib/README.md deleted file mode 100644 index f19f03a609..0000000000 --- a/vendor/github.com/containerd/containerd/contrib/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# contrib - -The `contrib` directory contains packages that do not belong in the core containerd packages but still contribute to overall containerd usability. - -Package such as Apparmor or Selinux are placed in `contrib` because they are platform dependent and often require higher level tools and profiles to work. - -Packaging and other built tools can be added to `contrib` to aid in packaging containerd for various distributions. - -## Testing - -Code in the `contrib` directory may or may not have been tested in the normal test pipeline for core components. diff --git a/vendor/github.com/containerd/containerd/go.mod b/vendor/github.com/containerd/containerd/go.mod deleted file mode 100644 index 106cbd3394..0000000000 --- a/vendor/github.com/containerd/containerd/go.mod +++ /dev/null @@ -1,81 +0,0 @@ -module github.com/containerd/containerd - -go 1.16 - -require ( - github.com/Microsoft/go-winio v0.4.17 - github.com/Microsoft/hcsshim v0.8.23 - github.com/containerd/aufs v1.0.0 - github.com/containerd/btrfs v1.0.0 - github.com/containerd/cgroups v1.0.1 - github.com/containerd/console v1.0.2 - github.com/containerd/continuity v0.1.0 - github.com/containerd/fifo v1.0.0 - github.com/containerd/go-cni v1.0.2 - github.com/containerd/go-runc v1.0.0 - github.com/containerd/imgcrypt v1.1.1 - github.com/containerd/nri v0.1.0 - github.com/containerd/ttrpc v1.1.0 - github.com/containerd/typeurl v1.0.2 - github.com/containerd/zfs v1.0.0 - github.com/containernetworking/plugins v0.9.1 - github.com/coreos/go-systemd/v22 v22.3.2 - github.com/davecgh/go-spew v1.1.1 - github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c - github.com/docker/go-metrics v0.0.1 - github.com/docker/go-units v0.4.0 - github.com/emicklei/go-restful v2.9.5+incompatible - github.com/fsnotify/fsnotify v1.4.9 - github.com/gogo/googleapis v1.4.0 - github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.0 - github.com/google/go-cmp v0.5.5 - github.com/google/uuid v1.2.0 - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/hashicorp/go-multierror v1.0.0 - github.com/imdario/mergo v0.3.12 - github.com/klauspost/compress v1.11.13 - github.com/moby/locker v1.0.1 - github.com/moby/sys/mountinfo v0.4.1 - github.com/moby/sys/symlink v0.1.0 - github.com/opencontainers/go-digest v1.0.0 - github.com/opencontainers/image-spec v1.0.1 - github.com/opencontainers/runc v1.0.2 - github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 - github.com/opencontainers/selinux v1.8.2 - github.com/pelletier/go-toml v1.8.1 - github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.7.1 - github.com/satori/go.uuid v1.2.0 // indirect - github.com/sirupsen/logrus v1.8.1 - github.com/stretchr/testify v1.6.1 - github.com/tchap/go-patricia v2.2.6+incompatible - github.com/urfave/cli v1.22.2 - go.etcd.io/bbolt v1.3.5 - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 - golang.org/x/sync v0.0.0-20201207232520-09787c993a3a - golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 - google.golang.org/grpc v1.33.2 - gotest.tools/v3 v3.0.3 - k8s.io/api v0.20.6 - k8s.io/apimachinery v0.20.6 - k8s.io/apiserver v0.20.6 - k8s.io/client-go v0.20.6 - k8s.io/component-base v0.20.6 - k8s.io/cri-api v0.20.6 - k8s.io/klog/v2 v2.4.0 - k8s.io/utils v0.0.0-20201110183641-67b214c5f920 -) - -// When updating replace rules, make sure to also update the rules in integration/client/go.mod -replace ( - // prevent transitional dependencies due to containerd having a circular - // dependency on itself through plugins. see .empty-mod/go.mod for details - github.com/containerd/containerd => ./.empty-mod/ - github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2 - github.com/golang/protobuf => github.com/golang/protobuf v1.3.5 - // urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092 - github.com/urfave/cli => github.com/urfave/cli v1.22.1 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 - google.golang.org/grpc => google.golang.org/grpc v1.27.1 -) diff --git a/vendor/github.com/containerd/containerd/runtime/linux/runctypes/1.0.pb.txt b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/1.0.pb.txt new file mode 100644 index 0000000000..05f41fada3 --- /dev/null +++ b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/1.0.pb.txt @@ -0,0 +1,183 @@ +file { + name: "github.com/containerd/containerd/linux/runctypes/runc.proto" + package: "containerd.linux.runc" + dependency: "gogoproto/gogo.proto" + message_type { + name: "RuncOptions" + field { + name: "runtime" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "runtime" + } + field { + name: "runtime_root" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "runtimeRoot" + } + field { + name: "criu_path" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuPath" + } + field { + name: "systemd_cgroup" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "systemdCgroup" + } + } + message_type { + name: "CreateOptions" + field { + name: "no_pivot_root" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noPivotRoot" + } + field { + name: "open_tcp" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "openTcp" + } + field { + name: "external_unix_sockets" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "externalUnixSockets" + } + field { + name: "terminal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "terminal" + } + field { + name: "file_locks" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "fileLocks" + } + field { + name: "empty_namespaces" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "emptyNamespaces" + } + field { + name: "cgroups_mode" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "cgroupsMode" + } + field { + name: "no_new_keyring" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noNewKeyring" + } + field { + name: "shim_cgroup" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "shimCgroup" + } + field { + name: "io_uid" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "ioUid" + } + field { + name: "io_gid" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "ioGid" + } + } + message_type { + name: "CheckpointOptions" + field { + name: "exit" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "exit" + } + field { + name: "open_tcp" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "openTcp" + } + field { + name: "external_unix_sockets" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "externalUnixSockets" + } + field { + name: "terminal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "terminal" + } + field { + name: "file_locks" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "fileLocks" + } + field { + name: "empty_namespaces" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "emptyNamespaces" + } + field { + name: "cgroups_mode" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "cgroupsMode" + } + } + message_type { + name: "ProcessDetails" + field { + name: "exec_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "execId" + } + } + options { + go_package: "github.com/containerd/containerd/linux/runctypes;runctypes" + } + weak_dependency: 0 + syntax: "proto3" +} diff --git a/vendor/github.com/containerd/containerd/runtime/linux/runctypes/next.pb.txt b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/next.pb.txt new file mode 100644 index 0000000000..cdf0e9ddce --- /dev/null +++ b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/next.pb.txt @@ -0,0 +1,211 @@ +file { + name: "github.com/containerd/containerd/runtime/linux/runctypes/runc.proto" + package: "containerd.linux.runc" + dependency: "gogoproto/gogo.proto" + message_type { + name: "RuncOptions" + field { + name: "runtime" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "runtime" + } + field { + name: "runtime_root" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "runtimeRoot" + } + field { + name: "criu_path" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuPath" + } + field { + name: "systemd_cgroup" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "systemdCgroup" + } + } + message_type { + name: "CreateOptions" + field { + name: "no_pivot_root" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noPivotRoot" + } + field { + name: "open_tcp" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "openTcp" + } + field { + name: "external_unix_sockets" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "externalUnixSockets" + } + field { + name: "terminal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "terminal" + } + field { + name: "file_locks" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "fileLocks" + } + field { + name: "empty_namespaces" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "emptyNamespaces" + } + field { + name: "cgroups_mode" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "cgroupsMode" + } + field { + name: "no_new_keyring" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noNewKeyring" + } + field { + name: "shim_cgroup" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "shimCgroup" + } + field { + name: "io_uid" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "ioUid" + } + field { + name: "io_gid" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "ioGid" + } + field { + name: "criu_work_path" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuWorkPath" + } + field { + name: "criu_image_path" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuImagePath" + } + } + message_type { + name: "CheckpointOptions" + field { + name: "exit" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "exit" + } + field { + name: "open_tcp" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "openTcp" + } + field { + name: "external_unix_sockets" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "externalUnixSockets" + } + field { + name: "terminal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "terminal" + } + field { + name: "file_locks" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "fileLocks" + } + field { + name: "empty_namespaces" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "emptyNamespaces" + } + field { + name: "cgroups_mode" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "cgroupsMode" + } + field { + name: "work_path" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "workPath" + } + field { + name: "image_path" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "imagePath" + } + } + message_type { + name: "ProcessDetails" + field { + name: "exec_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "execId" + } + } + options { + go_package: "github.com/containerd/containerd/runtime/linux/runctypes;runctypes" + } + weak_dependency: 0 + syntax: "proto3" +} diff --git a/vendor/github.com/containerd/containerd/runtime/v2/README.md b/vendor/github.com/containerd/containerd/runtime/v2/README.md deleted file mode 100644 index aaa878bfde..0000000000 --- a/vendor/github.com/containerd/containerd/runtime/v2/README.md +++ /dev/null @@ -1,254 +0,0 @@ -# Runtime v2 - -Runtime v2 introduces a first class shim API for runtime authors to integrate with containerd. -The shim API is minimal and scoped to the execution lifecycle of a container. - -## Binary Naming - -Users specify the runtime they wish to use when creating a container. -The runtime can also be changed via a container update. - -```bash -> ctr run --runtime io.containerd.runc.v1 -``` - -When a user specifies a runtime name, `io.containerd.runc.v1`, they will specify the name and version of the runtime. -This will be translated by containerd into a binary name for the shim. - -`io.containerd.runc.v1` -> `containerd-shim-runc-v1` - -containerd keeps the `containerd-shim-*` prefix so that users can `ps aux | grep containerd-shim` to see running shims on their system. - -## Shim Authoring - -This section is dedicated to runtime authors wishing to build a shim. -It will detail how the API works and different considerations when building shim. - -### Commands - -Container information is provided to a shim in two ways. -The OCI Runtime Bundle and on the `Create` rpc request. - -#### `start` - -Each shim MUST implement a `start` subcommand. -This command will launch new shims. -The start command MUST accept the following flags: - -* `-namespace` the namespace for the container -* `-address` the address of the containerd's main socket -* `-publish-binary` the binary path to publish events back to containerd -* `-id` the id of the container - -The start command, as well as all binary calls to the shim, has the bundle for the container set as the `cwd`. - -The start command MUST return an address to a shim for containerd to issue API requests for container operations. - -The start command can either start a new shim or return an address to an existing shim based on the shim's logic. - -#### `delete` - -Each shim MUST implement a `delete` subcommand. -This command allows containerd to delete any container resources created, mounted, and/or run by a shim when containerd can no longer communicate over rpc. -This happens if a shim is SIGKILL'd with a running container. -These resources will need to be cleaned up when containerd looses the connection to a shim. -This is also used when containerd boots and reconnects to shims. -If a bundle is still on disk but containerd cannot connect to a shim, the delete command is invoked. - -The delete command MUST accept the following flags: - -* `-namespace` the namespace for the container -* `-address` the address of the containerd's main socket -* `-publish-binary` the binary path to publish events back to containerd -* `-id` the id of the container -* `-bundle` the path to the bundle to delete. On non-Windows platforms this will match `cwd` - -The delete command will be executed in the container's bundle as its `cwd` except for on the Windows platform. - -### Host Level Shim Configuration - -containerd does not provide any host level configuration for shims via the API. -If a shim needs configuration from the user with host level information across all instances, a shim specific configuration file can be setup. - -### Container Level Shim Configuration - -On the create request, there is a generic `*protobuf.Any` that allows a user to specify container level configuration for the shim. - -```proto -message CreateTaskRequest { - string id = 1; - ... - google.protobuf.Any options = 10; -} -``` - -A shim author can create their own protobuf message for configuration and clients can import and provide this information is needed. - -### I/O - -I/O for a container is provided by the client to the shim via fifo on Linux, named pipes on Windows, or log files on disk. -The paths to these files are provided on the `Create` rpc for the initial creation and on the `Exec` rpc for additional processes. - -```proto -message CreateTaskRequest { - string id = 1; - bool terminal = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; -} -``` - -```proto -message ExecProcessRequest { - string id = 1; - string exec_id = 2; - bool terminal = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; -} -``` - -Containers that are to be launched with an interactive terminal will have the `terminal` field set to `true`, data is still copied over the files(fifos,pipes) in the same way as non interactive containers. - -### Root Filesystems - -The root filesystem for the containers is provided by on the `Create` rpc. -Shims are responsible for managing the lifecycle of the filesystem mount during the lifecycle of a container. - -```proto -message CreateTaskRequest { - string id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - ... -} -``` - -The mount protobuf message is: - -```proto -message Mount { - // Type defines the nature of the mount. - string type = 1; - // Source specifies the name of the mount. Depending on mount type, this - // may be a volume name or a host path, or even ignored. - string source = 2; - // Target path in container - string target = 3; - // Options specifies zero or more fstab style mount options. - repeated string options = 4; -} -``` - -Shims are responsible for mounting the filesystem into the `rootfs/` directory of the bundle. -Shims are also responsible for unmounting of the filesystem. -During a `delete` binary call, the shim MUST ensure that filesystem is also unmounted. -Filesystems are provided by the containerd snapshotters. - -### Events - -The Runtime v2 supports an async event model. In order for the an upstream caller (such as Docker) to get these events in the correct order a Runtime v2 shim MUST implement the following events where `Compliance=MUST`. This avoids race conditions between the shim and shim client where for example a call to `Start` can signal a `TaskExitEventTopic` before even returning the results from the `Start` call. With these guarantees of a Runtime v2 shim a call to `Start` is required to have published the async event `TaskStartEventTopic` before the shim can publish the `TaskExitEventTopic`. - -#### Tasks - -| Topic | Compliance | Description | -| ----- | ---------- | ----------- | -| `runtime.TaskCreateEventTopic` | MUST | When a task is successfully created | -| `runtime.TaskStartEventTopic` | MUST (follow `TaskCreateEventTopic`) | When a task is successfully started | -| `runtime.TaskExitEventTopic` | MUST (follow `TaskStartEventTopic`) | When a task exits expected or unexpected | -| `runtime.TaskDeleteEventTopic` | MUST (follow `TaskExitEventTopic` or `TaskCreateEventTopic` if never started) | When a task is removed from a shim | -| `runtime.TaskPausedEventTopic` | SHOULD | When a task is successfully paused | -| `runtime.TaskResumedEventTopic` | SHOULD (follow `TaskPausedEventTopic`) | When a task is successfully resumed | -| `runtime.TaskCheckpointedEventTopic` | SHOULD | When a task is checkpointed | -| `runtime.TaskOOMEventTopic` | SHOULD | If the shim collects Out of Memory events | - -#### Execs - -| Topic | Compliance | Description | -| ----- | ---------- | ----------- | -| `runtime.TaskExecAddedEventTopic` | MUST (follow `TaskCreateEventTopic` ) | When an exec is successfully added | -| `runtime.TaskExecStartedEventTopic` | MUST (follow `TaskExecAddedEventTopic`) | When an exec is successfully started | -| `runtime.TaskExitEventTopic` | MUST (follow `TaskExecStartedEventTopic`) | When an exec (other than the init exec) exits expected or unexpected | -| `runtime.TaskDeleteEventTopic` | SHOULD (follow `TaskExitEventTopic` or `TaskExecAddedEventTopic` if never started) | When an exec is removed from a shim | - -#### Logging - -Shims may support pluggable logging via STDIO URIs. -Current supported schemes for logging are: - -* fifo - Linux -* binary - Linux & Windows -* file - Linux & Windows -* npipe - Windows - -Binary logging has the ability to forward a container's STDIO to an external binary for consumption. -A sample logging driver that forwards the container's STDOUT and STDERR to `journald` is: - -```go -package main - -import ( - "bufio" - "context" - "fmt" - "io" - "sync" - - "github.com/containerd/containerd/runtime/v2/logging" - "github.com/coreos/go-systemd/journal" -) - -func main() { - logging.Run(log) -} - -func log(ctx context.Context, config *logging.Config, ready func() error) error { - // construct any log metadata for the container - vars := map[string]string{ - "SYSLOG_IDENTIFIER": fmt.Sprintf("%s:%s", config.Namespace, config.ID), - } - var wg sync.WaitGroup - wg.Add(2) - // forward both stdout and stderr to the journal - go copy(&wg, config.Stdout, journal.PriInfo, vars) - go copy(&wg, config.Stderr, journal.PriErr, vars) - - // signal that we are ready and setup for the container to be started - if err := ready(); err != nil { - return err - } - wg.Wait() - return nil -} - -func copy(wg *sync.WaitGroup, r io.Reader, pri journal.Priority, vars map[string]string) { - defer wg.Done() - s := bufio.NewScanner(r) - for s.Scan() { - journal.Send(s.Text(), pri, vars) - } -} -``` - -### Other - -#### Unsupported rpcs - -If a shim does not or cannot implement an rpc call, it MUST return a `github.com/containerd/containerd/errdefs.ErrNotImplemented` error. - -#### Debugging and Shim Logs - -A fifo on unix or named pipe on Windows will be provided to the shim. -It can be located inside the `cwd` of the shim named "log". -The shims can use the existing `github.com/containerd/containerd/log` package to log debug messages. -Messages will automatically be output in the containerd's daemon logs with the correct fields and runtime set. - -#### ttrpc - -[ttrpc](https://github.com/containerd/ttrpc) is the only currently supported protocol for shims. -It works with standard protobufs and GRPC services as well as generating clients. -The only difference between grpc and ttrpc is the wire protocol. -ttrpc removes the http stack in order to save memory and binary size to keep shims small. -It is recommended to use ttrpc in your shim but grpc support is also in development. diff --git a/vendor/github.com/containerd/containerd/runtime/v2/runc/options/next.pb.txt b/vendor/github.com/containerd/containerd/runtime/v2/runc/options/next.pb.txt new file mode 100644 index 0000000000..7a29ff31c6 --- /dev/null +++ b/vendor/github.com/containerd/containerd/runtime/v2/runc/options/next.pb.txt @@ -0,0 +1,166 @@ +file { + name: "github.com/containerd/containerd/runtime/v2/runc/options/oci.proto" + package: "containerd.runc.v1" + dependency: "gogoproto/gogo.proto" + message_type { + name: "Options" + field { + name: "no_pivot_root" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noPivotRoot" + } + field { + name: "no_new_keyring" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noNewKeyring" + } + field { + name: "shim_cgroup" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "shimCgroup" + } + field { + name: "io_uid" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "ioUid" + } + field { + name: "io_gid" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "ioGid" + } + field { + name: "binary_name" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "binaryName" + } + field { + name: "root" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "root" + } + field { + name: "criu_path" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuPath" + } + field { + name: "systemd_cgroup" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "systemdCgroup" + } + field { + name: "criu_image_path" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuImagePath" + } + field { + name: "criu_work_path" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "criuWorkPath" + } + } + message_type { + name: "CheckpointOptions" + field { + name: "exit" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "exit" + } + field { + name: "open_tcp" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "openTcp" + } + field { + name: "external_unix_sockets" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "externalUnixSockets" + } + field { + name: "terminal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "terminal" + } + field { + name: "file_locks" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "fileLocks" + } + field { + name: "empty_namespaces" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "emptyNamespaces" + } + field { + name: "cgroups_mode" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "cgroupsMode" + } + field { + name: "image_path" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "imagePath" + } + field { + name: "work_path" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "workPath" + } + } + message_type { + name: "ProcessDetails" + field { + name: "exec_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "execId" + } + } + options { + go_package: "github.com/containerd/containerd/runtime/v2/runc/options;options" + } + weak_dependency: 0 + syntax: "proto3" +} diff --git a/vendor/github.com/containerd/continuity/AUTHORS b/vendor/github.com/containerd/continuity/AUTHORS new file mode 100644 index 0000000000..376ceb93d6 --- /dev/null +++ b/vendor/github.com/containerd/continuity/AUTHORS @@ -0,0 +1,40 @@ +Aaron Lehmann +Akash Gupta +Akihiro Suda +Akihiro Suda +Akihiro Suda +Andrew Pennebaker +Brandon Philips +Brian Goff +Christopher Jones +Daniel, Dao Quang Minh +Darren Stahl +Derek McGowan +Derek McGowan +Edward Pilatowicz +Ian Campbell +Ivan Markin +Justin Cormack +Justin Cummins +Kasper Fabæch Brandt +Kir Kolyshkin +Michael Crosby +Michael Crosby +Michael Wan +Mike Brown +Niels de Vos +Phil Estes +Phil Estes +Samuel Karp +Sam Whited +Sebastiaan van Stijn +Shengjing Zhu +Stephen J Day +Tibor Vass +Tobias Klauser +Tom Faulhaber +Tonis Tiigi +Trevor Porter +Wei Fu +Wilbert van de Ridder +Xiaodong Ye diff --git a/vendor/github.com/containerd/continuity/README.md b/vendor/github.com/containerd/continuity/README.md deleted file mode 100644 index 6fa50e159c..0000000000 --- a/vendor/github.com/containerd/continuity/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# continuity - -[![GoDoc](https://godoc.org/github.com/containerd/continuity?status.svg)](https://godoc.org/github.com/containerd/continuity) -[![Build Status](https://travis-ci.org/containerd/continuity.svg?branch=master)](https://travis-ci.org/containerd/continuity) - -A transport-agnostic, filesystem metadata manifest system - -This project is a staging area for experiments in providing transport agnostic -metadata storage. - -Please see https://github.com/opencontainers/specs/issues/11 for more details. - -## Manifest Format - -A continuity manifest encodes filesystem metadata in Protocol Buffers. -Please refer to [proto/manifest.proto](proto/manifest.proto). - -## Usage - -Build: - -```console -$ make -``` - -Create a manifest (of this repo itself): - -```console -$ ./bin/continuity build . > /tmp/a.pb -``` - -Dump a manifest: - -```console -$ ./bin/continuity ls /tmp/a.pb -... --rw-rw-r-- 270 B /.gitignore --rw-rw-r-- 88 B /.mailmap --rw-rw-r-- 187 B /.travis.yml --rw-rw-r-- 359 B /AUTHORS --rw-rw-r-- 11 kB /LICENSE --rw-rw-r-- 1.5 kB /Makefile -... --rw-rw-r-- 986 B /testutil_test.go -drwxrwxr-x 0 B /version --rw-rw-r-- 478 B /version/version.go -``` - -Verify a manifest: - -```console -$ ./bin/continuity verify . /tmp/a.pb -``` - -Break the directory and restore using the manifest: -```console -$ chmod 777 Makefile -$ ./bin/continuity verify . /tmp/a.pb -2017/06/23 08:00:34 error verifying manifest: resource "/Makefile" has incorrect mode: -rwxrwxrwx != -rw-rw-r-- -$ ./bin/continuity apply . /tmp/a.pb -$ stat -c %a Makefile -664 -$ ./bin/continuity verify . /tmp/a.pb -``` - -## Platforms - -continuity primarily targets Linux. continuity may compile for and work on -other operating systems, but those platforms are not tested. - -## Contribution Guide -### Building Proto Package - -If you change the proto file you will need to rebuild the generated Go with `go generate`. - -```console -$ go generate ./proto -``` - -## Project details - -continuity is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). -As a containerd sub-project, you will find the: - * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md), - * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS), - * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md) - -information in our [`containerd/project`](https://github.com/containerd/project) repository. diff --git a/vendor/github.com/containerd/continuity/go.mod b/vendor/github.com/containerd/continuity/go.mod deleted file mode 100644 index 35cea6ae8d..0000000000 --- a/vendor/github.com/containerd/continuity/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module github.com/containerd/continuity - -go 1.13 - -require ( - bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 - github.com/dustin/go-humanize v1.0.0 - github.com/golang/protobuf v1.3.5 - github.com/opencontainers/go-digest v1.0.0 - github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.7.0 - github.com/spf13/cobra v1.0.0 - golang.org/x/sync v0.0.0-20201207232520-09787c993a3a - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c -) diff --git a/vendor/github.com/containerd/continuity/sysx/generate.sh b/vendor/github.com/containerd/continuity/sysx/generate.sh new file mode 100644 index 0000000000..87d708d7ae --- /dev/null +++ b/vendor/github.com/containerd/continuity/sysx/generate.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +# Copyright The containerd 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. + + +set -e + +mksyscall="$(go env GOROOT)/src/syscall/mksyscall.pl" + +fix() { + sed 's,^package syscall$,package sysx,' \ + | sed 's,^import "unsafe"$,import (\n\t"syscall"\n\t"unsafe"\n),' \ + | gofmt -r='BytePtrFromString -> syscall.BytePtrFromString' \ + | gofmt -r='Syscall6 -> syscall.Syscall6' \ + | gofmt -r='Syscall -> syscall.Syscall' \ + | gofmt -r='SYS_GETXATTR -> syscall.SYS_GETXATTR' \ + | gofmt -r='SYS_LISTXATTR -> syscall.SYS_LISTXATTR' \ + | gofmt -r='SYS_SETXATTR -> syscall.SYS_SETXATTR' \ + | gofmt -r='SYS_REMOVEXATTR -> syscall.SYS_REMOVEXATTR' \ + | gofmt -r='SYS_LGETXATTR -> syscall.SYS_LGETXATTR' \ + | gofmt -r='SYS_LLISTXATTR -> syscall.SYS_LLISTXATTR' \ + | gofmt -r='SYS_LSETXATTR -> syscall.SYS_LSETXATTR' \ + | gofmt -r='SYS_LREMOVEXATTR -> syscall.SYS_LREMOVEXATTR' +} + +if [ "$GOARCH" == "" ] || [ "$GOOS" == "" ]; then + echo "Must specify \$GOARCH and \$GOOS" + exit 1 +fi + +mkargs="" + +if [ "$GOARCH" == "386" ] || [ "$GOARCH" == "arm" ]; then + mkargs="-l32" +fi + +for f in "$@"; do + $mksyscall $mkargs "${f}_${GOOS}.go" | fix > "${f}_${GOOS}_${GOARCH}.go" +done + diff --git a/vendor/github.com/containerd/fifo/.gitattributes b/vendor/github.com/containerd/fifo/.gitattributes new file mode 100644 index 0000000000..d207b1802b --- /dev/null +++ b/vendor/github.com/containerd/fifo/.gitattributes @@ -0,0 +1 @@ +*.go text eol=lf diff --git a/vendor/github.com/containerd/fifo/.gitignore b/vendor/github.com/containerd/fifo/.gitignore new file mode 100644 index 0000000000..7f7bd6ac8c --- /dev/null +++ b/vendor/github.com/containerd/fifo/.gitignore @@ -0,0 +1,2 @@ +coverage.txt +vendor/ diff --git a/vendor/github.com/containerd/fifo/.golangci.yml b/vendor/github.com/containerd/fifo/.golangci.yml new file mode 100644 index 0000000000..fcba5e885f --- /dev/null +++ b/vendor/github.com/containerd/fifo/.golangci.yml @@ -0,0 +1,20 @@ +linters: + enable: + - structcheck + - varcheck + - staticcheck + - unconvert + - gofmt + - goimports + - golint + - ineffassign + - vet + - unused + - misspell + disable: + - errcheck + +run: + timeout: 3m + skip-dirs: + - vendor diff --git a/vendor/github.com/containerd/fifo/Makefile b/vendor/github.com/containerd/fifo/Makefile new file mode 100644 index 0000000000..40c5046a9f --- /dev/null +++ b/vendor/github.com/containerd/fifo/Makefile @@ -0,0 +1,24 @@ +# Copyright The containerd 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. + +.PHONY: check test deps + +test: deps + go test -v -race ./... + +deps: + go mod vendor + +check: + GOGC=75 golangci-lint run diff --git a/vendor/github.com/containerd/fifo/go.mod b/vendor/github.com/containerd/fifo/go.mod deleted file mode 100644 index 0c1c48fab7..0000000000 --- a/vendor/github.com/containerd/fifo/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -module github.com/containerd/fifo - -go 1.13 - -require ( - github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.6.1 - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c -) diff --git a/vendor/github.com/containerd/go-runc/.travis.yml b/vendor/github.com/containerd/go-runc/.travis.yml new file mode 100644 index 0000000000..724ee09d24 --- /dev/null +++ b/vendor/github.com/containerd/go-runc/.travis.yml @@ -0,0 +1,21 @@ +language: go +go: + - 1.13.x + - 1.14.x + - 1.15.x + +install: + - go get -t ./... + - go get -u github.com/vbatts/git-validation + - go get -u github.com/kunalkushwaha/ltag + +before_script: + - pushd ..; git clone https://github.com/containerd/project; popd + +script: + - DCO_VERBOSITY=-q ../project/script/validate/dco + - ../project/script/validate/fileheader ../project/ + - go test -v -race -covermode=atomic -coverprofile=coverage.txt ./... + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/containerd/go-runc/go.mod b/vendor/github.com/containerd/go-runc/go.mod deleted file mode 100644 index f69c26fd68..0000000000 --- a/vendor/github.com/containerd/go-runc/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module github.com/containerd/go-runc - -go 1.13 - -require ( - github.com/containerd/console v1.0.1 - github.com/opencontainers/runtime-spec v1.0.2 - github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.7.0 - golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f -) diff --git a/vendor/github.com/containerd/ttrpc/.gitignore b/vendor/github.com/containerd/ttrpc/.gitignore new file mode 100644 index 0000000000..ea58090bd2 --- /dev/null +++ b/vendor/github.com/containerd/ttrpc/.gitignore @@ -0,0 +1,11 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out diff --git a/vendor/github.com/containerd/ttrpc/go.mod b/vendor/github.com/containerd/ttrpc/go.mod deleted file mode 100644 index efc00860c6..0000000000 --- a/vendor/github.com/containerd/ttrpc/go.mod +++ /dev/null @@ -1,13 +0,0 @@ -module github.com/containerd/ttrpc - -go 1.13 - -require ( - github.com/gogo/protobuf v1.3.2 - github.com/prometheus/procfs v0.6.0 - github.com/sirupsen/logrus v1.8.1 - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c - google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 - google.golang.org/grpc v1.27.1 - google.golang.org/protobuf v1.27.1 -) diff --git a/vendor/github.com/containerd/typeurl/.gitignore b/vendor/github.com/containerd/typeurl/.gitignore new file mode 100644 index 0000000000..d53846778b --- /dev/null +++ b/vendor/github.com/containerd/typeurl/.gitignore @@ -0,0 +1,2 @@ +*.test +coverage.txt diff --git a/vendor/github.com/containerd/typeurl/go.mod b/vendor/github.com/containerd/typeurl/go.mod deleted file mode 100644 index 77e171e57b..0000000000 --- a/vendor/github.com/containerd/typeurl/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/containerd/typeurl - -go 1.13 - -require ( - github.com/gogo/protobuf v1.3.2 - github.com/pkg/errors v0.9.1 -) diff --git a/vendor/github.com/coreos/etcd/README.md b/vendor/github.com/coreos/etcd/README.md deleted file mode 100644 index 2b559014e5..0000000000 --- a/vendor/github.com/coreos/etcd/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# etcd - -[![Go Report Card](https://goreportcard.com/badge/github.com/coreos/etcd?style=flat-square)](https://goreportcard.com/report/github.com/coreos/etcd) -[![Coverage](https://codecov.io/gh/coreos/etcd/branch/master/graph/badge.svg)](https://codecov.io/gh/coreos/etcd) -[![Build Status Travis](https://img.shields.io/travis/coreos/etcdlabs.svg?style=flat-square&&branch=master)](https://travis-ci.org/coreos/etcd) -[![Build Status Semaphore](https://semaphoreci.com/api/v1/coreos/etcd/branches/master/shields_badge.svg)](https://semaphoreci.com/coreos/etcd) -[![Godoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/coreos/etcd) -[![Releases](https://img.shields.io/github/release/coreos/etcd/all.svg?style=flat-square)](https://github.com/coreos/etcd/releases) -[![LICENSE](https://img.shields.io/github/license/coreos/etcd.svg?style=flat-square)](https://github.com/coreos/etcd/blob/master/LICENSE) - -**Note**: The `master` branch may be in an *unstable or even broken state* during development. Please use [releases][github-release] instead of the `master` branch in order to get stable binaries. - -*the etcd v2 [documentation](Documentation/v2/README.md) has moved* - -![etcd Logo](logos/etcd-horizontal-color.png) - -etcd is a distributed reliable key-value store for the most critical data of a distributed system, with a focus on being: - -* *Simple*: well-defined, user-facing API (gRPC) -* *Secure*: automatic TLS with optional client cert authentication -* *Fast*: benchmarked 10,000 writes/sec -* *Reliable*: properly distributed using Raft - -etcd is written in Go and uses the [Raft][raft] consensus algorithm to manage a highly-available replicated log. - -etcd is used [in production by many companies](./Documentation/production-users.md), and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as [Kubernetes][k8s], [fleet][fleet], [locksmith][locksmith], [vulcand][vulcand], [Doorman][doorman], and many others. Reliability is further ensured by rigorous [testing][etcd-tests]. - -See [etcdctl][etcdctl] for a simple command line client. - -[raft]: https://raft.github.io/ -[k8s]: http://kubernetes.io/ -[doorman]: https://github.com/youtube/doorman -[fleet]: https://github.com/coreos/fleet -[locksmith]: https://github.com/coreos/locksmith -[vulcand]: https://github.com/vulcand/vulcand -[etcdctl]: https://github.com/coreos/etcd/tree/master/etcdctl -[etcd-tests]: http://dash.etcd.io - -## Community meetings - -etcd contributors and maintainers have bi-weekly meetings at 11:00 AM (USA Pacific) on Tuesdays. There is an [iCalendar][rfc5545] format for the meetings [here](meeting.ics). Anyone is welcome to join via [Zoom][zoom] or audio-only: +1 669 900 6833. An initial agenda will be posted to the [shared Google docs][shared-meeting-notes] a day before each meeting, and everyone is welcome to suggest additional topics or other agendas. - -[rfc5545]: https://tools.ietf.org/html/rfc5545 -[zoom]: https://coreos.zoom.us/j/854793406 -[shared-meeting-notes]: https://docs.google.com/document/d/1DbVXOHvd9scFsSmL2oNg4YGOHJdXqtx583DmeVWrB_M/edit# - -## Getting started - -### Getting etcd - -The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, [rkt][rkt], and Docker. Instructions for using these binaries are on the [GitHub releases page][github-release]. - -For those wanting to try the very latest version, [build the latest version of etcd][dl-build] from the `master` branch. This first needs [*Go*](https://golang.org/) installed (version 1.9+ is required). All development occurs on `master`, including new features and bug fixes. Bug fixes are first targeted at `master` and subsequently ported to release branches, as described in the [branch management][branch-management] guide. - -[rkt]: https://github.com/rkt/rkt/releases/ -[github-release]: https://github.com/coreos/etcd/releases/ -[branch-management]: ./Documentation/branch_management.md -[dl-build]: ./Documentation/dl_build.md#build-the-latest-version - -### Running etcd - -First start a single-member cluster of etcd. - -If etcd is installed using the [pre-built release binaries][github-release], run it from the installation location as below: - -```sh -/tmp/etcd-download-test/etcd -``` -The etcd command can be simply run as such if it is moved to the system path as below: - -```sh -mv /tmp/etcd-download-test/etcd /usr/locale/bin/ - -etcd -``` - -If etcd is [build from the master branch][dl-build], run it as below: - -```sh -./bin/etcd -``` - -This will bring up etcd listening on port 2379 for client communication and on port 2380 for server-to-server communication. - -Next, let's set a single key, and then retrieve it: - -``` -ETCDCTL_API=3 etcdctl put mykey "this is awesome" -ETCDCTL_API=3 etcdctl get mykey -``` - -That's it! etcd is now running and serving client requests. For more - -- [Animated quick demo][demo-gif] -- [Interactive etcd playground][etcd-play] - -[demo-gif]: ./Documentation/demo.md -[etcd-play]: http://play.etcd.io/ - -### etcd TCP ports - -The [official etcd ports][iana-ports] are 2379 for client requests, and 2380 for peer communication. - -[iana-ports]: http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt - -### Running a local etcd cluster - -First install [goreman](https://github.com/mattn/goreman), which manages Procfile-based applications. - -Our [Procfile script](./Procfile) will set up a local example cluster. Start it with: - -```sh -goreman start -``` - -This will bring up 3 etcd members `infra1`, `infra2` and `infra3` and etcd `grpc-proxy`, which runs locally and composes a cluster. - -Every cluster member and proxy accepts key value reads and key value writes. - -### Running etcd on Kubernetes - -To run an etcd cluster on Kubernetes, try [etcd operator](https://github.com/coreos/etcd-operator). - -### Next steps - -Now it's time to dig into the full etcd API and other guides. - -- Read the full [documentation][fulldoc]. -- Explore the full gRPC [API][api]. -- Set up a [multi-machine cluster][clustering]. -- Learn the [config format, env variables and flags][configuration]. -- Find [language bindings and tools][integrations]. -- Use TLS to [secure an etcd cluster][security]. -- [Tune etcd][tuning]. - -[fulldoc]: ./Documentation/docs.md -[api]: ./Documentation/dev-guide/api_reference_v3.md -[clustering]: ./Documentation/op-guide/clustering.md -[configuration]: ./Documentation/op-guide/configuration.md -[integrations]: ./Documentation/integrations.md -[security]: ./Documentation/op-guide/security.md -[tuning]: ./Documentation/tuning.md - -## Contact - -- Mailing list: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) -- IRC: #[etcd](irc://irc.freenode.org:6667/#etcd) on freenode.org -- Planning/Roadmap: [milestones](https://github.com/coreos/etcd/milestones), [roadmap](./ROADMAP.md) -- Bugs: [issues](https://github.com/coreos/etcd/issues) - -## Contributing - -See [CONTRIBUTING](CONTRIBUTING.md) for details on submitting patches and the contribution workflow. - -## Reporting bugs - -See [reporting bugs](Documentation/reporting_bugs.md) for details about reporting any issues. - -### License - -etcd is under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details. diff --git a/vendor/github.com/coreos/etcd/pkg/README.md b/vendor/github.com/coreos/etcd/pkg/README.md deleted file mode 100644 index d7de4d33bc..0000000000 --- a/vendor/github.com/coreos/etcd/pkg/README.md +++ /dev/null @@ -1,2 +0,0 @@ -pkg/ is a collection of utility packages used by etcd without being specific to etcd itself. A package belongs here -only if it could possibly be moved out into its own repository in the future. diff --git a/vendor/github.com/coreos/etcd/raft/design.md b/vendor/github.com/coreos/etcd/raft/design.md new file mode 100644 index 0000000000..7bc0531dce --- /dev/null +++ b/vendor/github.com/coreos/etcd/raft/design.md @@ -0,0 +1,57 @@ +## Progress + +Progress represents a follower’s progress in the view of the leader. Leader maintains progresses of all followers, and sends `replication message` to the follower based on its progress. + +`replication message` is a `msgApp` with log entries. + +A progress has two attribute: `match` and `next`. `match` is the index of the highest known matched entry. If leader knows nothing about follower’s replication status, `match` is set to zero. `next` is the index of the first entry that will be replicated to the follower. Leader puts entries from `next` to its latest one in next `replication message`. + +A progress is in one of the three state: `probe`, `replicate`, `snapshot`. + +``` + +--------------------------------------------------------+ + | send snapshot | + | | + +---------+----------+ +----------v---------+ + +---> probe | | snapshot | + | | max inflight = 1 <----------------------------------+ max inflight = 0 | + | +---------+----------+ +--------------------+ + | | 1. snapshot success + | | (next=snapshot.index + 1) + | | 2. snapshot failure + | | (no change) + | | 3. receives msgAppResp(rej=false&&index>lastsnap.index) + | | (match=m.index,next=match+1) +receives msgAppResp(rej=true) +(next=match+1)| | + | | + | | + | | receives msgAppResp(rej=false&&index>match) + | | (match=m.index,next=match+1) + | | + | | + | | + | +---------v----------+ + | | replicate | + +---+ max inflight = n | + +--------------------+ +``` + +When the progress of a follower is in `probe` state, leader sends at most one `replication message` per heartbeat interval. The leader sends `replication message` slowly and probing the actual progress of the follower. A `msgHeartbeatResp` or a `msgAppResp` with reject might trigger the sending of the next `replication message`. + +When the progress of a follower is in `replicate` state, leader sends `replication message`, then optimistically increases `next` to the latest entry sent. This is an optimized state for fast replicating log entries to the follower. + +When the progress of a follower is in `snapshot` state, leader stops sending any `replication message`. + +A newly elected leader sets the progresses of all the followers to `probe` state with `match` = 0 and `next` = last index. The leader slowly (at most once per heartbeat) sends `replication message` to the follower and probes its progress. + +A progress changes to `replicate` when the follower replies with a non-rejection `msgAppResp`, which implies that it has matched the index sent. At this point, leader starts to stream log entries to the follower fast. The progress will fall back to `probe` when the follower replies a rejection `msgAppResp` or the link layer reports the follower is unreachable. We aggressively reset `next` to `match`+1 since if we receive any `msgAppResp` soon, both `match` and `next` will increase directly to the `index` in `msgAppResp`. (We might end up with sending some duplicate entries when aggressively reset `next` too low. see open question) + +A progress changes from `probe` to `snapshot` when the follower falls very far behind and requires a snapshot. After sending `msgSnap`, the leader waits until the success, failure or abortion of the previous snapshot sent. The progress will go back to `probe` after the sending result is applied. + +### Flow Control + +1. limit the max size of message sent per message. Max should be configurable. +Lower the cost at probing state as we limit the size per message; lower the penalty when aggressively decreased to a too low `next` + +2. limit the # of in flight messages < N when in `replicate` state. N should be configurable. Most implementation will have a sending buffer on top of its actual network transport layer (not blocking raft node). We want to make sure raft does not overflow that buffer, which can cause message dropping and triggering a bunch of unnecessary resending repeatedly. diff --git a/vendor/github.com/coreos/go-systemd/README.md b/vendor/github.com/coreos/go-systemd/README.md deleted file mode 100644 index cad04a8035..0000000000 --- a/vendor/github.com/coreos/go-systemd/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# go-systemd - -[![Build Status](https://travis-ci.org/coreos/go-systemd.png?branch=master)](https://travis-ci.org/coreos/go-systemd) -[![godoc](https://godoc.org/github.com/coreos/go-systemd?status.svg)](http://godoc.org/github.com/coreos/go-systemd) - -Go bindings to systemd. The project has several packages: - -- `activation` - for writing and using socket activation from Go -- `daemon` - for notifying systemd of service status changes -- `dbus` - for starting/stopping/inspecting running services and units -- `journal` - for writing to systemd's logging service, journald -- `sdjournal` - for reading from journald by wrapping its C API -- `login1` - for integration with the systemd logind API -- `machine1` - for registering machines/containers with systemd -- `unit` - for (de)serialization and comparison of unit files - -## Socket Activation - -An example HTTP server using socket activation can be quickly set up by following this README on a Linux machine running systemd: - -https://github.com/coreos/go-systemd/tree/master/examples/activation/httpserver - -## systemd Service Notification - -The `daemon` package is an implementation of the [sd_notify protocol](https://www.freedesktop.org/software/systemd/man/sd_notify.html#Description). It can be used to inform systemd of service start-up completion, watchdog events, and other status changes. - -## D-Bus - -The `dbus` package connects to the [systemd D-Bus API](http://www.freedesktop.org/wiki/Software/systemd/dbus/) and lets you start, stop and introspect systemd units. The API docs are here: - -http://godoc.org/github.com/coreos/go-systemd/dbus - -### Debugging - -Create `/etc/dbus-1/system-local.conf` that looks like this: - -``` - - - - - - - -``` - -## Journal - -### Writing to the Journal - -Using the pure-Go `journal` package you can submit journal entries directly to systemd's journal, taking advantage of features like indexed key/value pairs for each log entry. - -### Reading from the Journal - -The `sdjournal` package provides read access to the journal by wrapping around journald's native C API; consequently it requires cgo and the journal headers to be available. - -## logind - -The `login1` package provides functions to integrate with the [systemd logind API](http://www.freedesktop.org/wiki/Software/systemd/logind/). - -## machined - -The `machine1` package allows interaction with the [systemd machined D-Bus API](http://www.freedesktop.org/wiki/Software/systemd/machined/). - -## Units - -The `unit` package provides various functions for working with [systemd unit files](http://www.freedesktop.org/software/systemd/man/systemd.unit.html). diff --git a/vendor/github.com/coreos/go-systemd/v22/README.md b/vendor/github.com/coreos/go-systemd/v22/README.md deleted file mode 100644 index 9fac51300a..0000000000 --- a/vendor/github.com/coreos/go-systemd/v22/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# go-systemd - -[![Build Status](https://travis-ci.org/coreos/go-systemd.png?branch=master)](https://travis-ci.org/coreos/go-systemd) -[![godoc](https://img.shields.io/badge/godoc-reference-5272B4)](https://pkg.go.dev/mod/github.com/coreos/go-systemd/v22/?tab=packages) -![minimum golang 1.12](https://img.shields.io/badge/golang-1.12%2B-orange.svg) - - -Go bindings to systemd. The project has several packages: - -- `activation` - for writing and using socket activation from Go -- `daemon` - for notifying systemd of service status changes -- `dbus` - for starting/stopping/inspecting running services and units -- `journal` - for writing to systemd's logging service, journald -- `sdjournal` - for reading from journald by wrapping its C API -- `login1` - for integration with the systemd logind API -- `machine1` - for registering machines/containers with systemd -- `unit` - for (de)serialization and comparison of unit files - -## Socket Activation - -An example HTTP server using socket activation can be quickly set up by following this README on a Linux machine running systemd: - -https://github.com/coreos/go-systemd/tree/master/examples/activation/httpserver - -## systemd Service Notification - -The `daemon` package is an implementation of the [sd_notify protocol](https://www.freedesktop.org/software/systemd/man/sd_notify.html#Description). -It can be used to inform systemd of service start-up completion, watchdog events, and other status changes. - -## D-Bus - -The `dbus` package connects to the [systemd D-Bus API](http://www.freedesktop.org/wiki/Software/systemd/dbus/) and lets you start, stop and introspect systemd units. -[API documentation][dbus-doc] is available online. - -[dbus-doc]: https://pkg.go.dev/github.com/coreos/go-systemd/v22/dbus?tab=doc - -### Debugging - -Create `/etc/dbus-1/system-local.conf` that looks like this: - -``` - - - - - - - -``` - -## Journal - -### Writing to the Journal - -Using the pure-Go `journal` package you can submit journal entries directly to systemd's journal, taking advantage of features like indexed key/value pairs for each log entry. - -### Reading from the Journal - -The `sdjournal` package provides read access to the journal by wrapping around journald's native C API; consequently it requires cgo and the journal headers to be available. - -## logind - -The `login1` package provides functions to integrate with the [systemd logind API](http://www.freedesktop.org/wiki/Software/systemd/logind/). - -## machined - -The `machine1` package allows interaction with the [systemd machined D-Bus API](http://www.freedesktop.org/wiki/Software/systemd/machined/). - -## Units - -The `unit` package provides various functions for working with [systemd unit files](http://www.freedesktop.org/software/systemd/man/systemd.unit.html). diff --git a/vendor/github.com/coreos/go-systemd/v22/go.mod b/vendor/github.com/coreos/go-systemd/v22/go.mod deleted file mode 100644 index d285cf367e..0000000000 --- a/vendor/github.com/coreos/go-systemd/v22/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/coreos/go-systemd/v22 - -go 1.12 - -require github.com/godbus/dbus/v5 v5.0.4 diff --git a/vendor/github.com/coreos/pkg/README.md b/vendor/github.com/coreos/pkg/README.md deleted file mode 100644 index ca68a07f0f..0000000000 --- a/vendor/github.com/coreos/pkg/README.md +++ /dev/null @@ -1,4 +0,0 @@ -a collection of go utility packages - -[![Build Status](https://travis-ci.org/coreos/pkg.png?branch=master)](https://travis-ci.org/coreos/pkg) -[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/coreos/pkg) diff --git a/vendor/github.com/creack/pty/.gitignore b/vendor/github.com/creack/pty/.gitignore new file mode 100644 index 0000000000..1f0a99f2f2 --- /dev/null +++ b/vendor/github.com/creack/pty/.gitignore @@ -0,0 +1,4 @@ +[568].out +_go* +_test* +_obj diff --git a/vendor/github.com/creack/pty/Dockerfile.riscv b/vendor/github.com/creack/pty/Dockerfile.riscv new file mode 100644 index 0000000000..adfdf82c89 --- /dev/null +++ b/vendor/github.com/creack/pty/Dockerfile.riscv @@ -0,0 +1,14 @@ +FROM golang:1.13 + +# Clone and complie a riscv compatible version of the go compiler. +RUN git clone https://review.gerrithub.io/riscv/riscv-go /riscv-go +# riscvdev branch HEAD as of 2019-06-29. +RUN cd /riscv-go && git checkout 04885fddd096d09d4450726064d06dd107e374bf +ENV PATH=/riscv-go/misc/riscv:/riscv-go/bin:$PATH +RUN cd /riscv-go/src && GOROOT_BOOTSTRAP=$(go env GOROOT) ./make.bash +ENV GOROOT=/riscv-go + +# Make sure we compile. +WORKDIR pty +ADD . . +RUN GOOS=linux GOARCH=riscv go build diff --git a/vendor/github.com/creack/pty/go.mod b/vendor/github.com/creack/pty/go.mod deleted file mode 100644 index e48decaf46..0000000000 --- a/vendor/github.com/creack/pty/go.mod +++ /dev/null @@ -1,4 +0,0 @@ -module github.com/creack/pty - -go 1.13 - diff --git a/vendor/github.com/creack/pty/mktypes.bash b/vendor/github.com/creack/pty/mktypes.bash new file mode 100644 index 0000000000..82ee16721c --- /dev/null +++ b/vendor/github.com/creack/pty/mktypes.bash @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +GOOSARCH="${GOOS}_${GOARCH}" +case "$GOOSARCH" in +_* | *_ | _) + echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 + exit 1 + ;; +esac + +GODEFS="go tool cgo -godefs" + +$GODEFS types.go |gofmt > ztypes_$GOARCH.go + +case $GOOS in +freebsd|dragonfly|openbsd) + $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go + ;; +esac diff --git a/vendor/github.com/creack/pty/test_crosscompile.sh b/vendor/github.com/creack/pty/test_crosscompile.sh new file mode 100644 index 0000000000..c4b9e3734c --- /dev/null +++ b/vendor/github.com/creack/pty/test_crosscompile.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env sh + +# Test script checking that all expected os/arch compile properly. +# Does not actually test the logic, just the compilation so we make sure we don't break code depending on the lib. + +echo2() { + echo $@ >&2 +} + +trap end 0 +end() { + [ "$?" = 0 ] && echo2 "Pass." || (echo2 "Fail."; exit 1) +} + +cross() { + os=$1 + shift + echo2 "Build for $os." + for arch in $@; do + echo2 " - $os/$arch" + GOOS=$os GOARCH=$arch go build + done + echo2 +} + +set -e + +cross linux amd64 386 arm arm64 ppc64 ppc64le s390x mips mipsle mips64 mips64le +cross darwin amd64 386 arm arm64 +cross freebsd amd64 386 arm +cross netbsd amd64 386 arm +cross openbsd amd64 386 arm arm64 +cross dragonfly amd64 +cross solaris amd64 + +# Not expected to work but should still compile. +cross windows amd64 386 arm + +# TODO: Fix compilation error on openbsd/arm. +# TODO: Merge the solaris PR. + +# Some os/arch require a different compiler. Run in docker. +if ! hash docker; then + # If docker is not present, stop here. + return +fi + +echo2 "Build for linux." +echo2 " - linux/riscv" +docker build -t test -f Dockerfile.riscv . diff --git a/vendor/github.com/cyphar/filepath-securejoin/.travis.yml b/vendor/github.com/cyphar/filepath-securejoin/.travis.yml new file mode 100644 index 0000000000..3938f38349 --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/.travis.yml @@ -0,0 +1,19 @@ +# Copyright (C) 2017 SUSE LLC. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +language: go +go: + - 1.7.x + - 1.8.x + - tip + +os: + - linux + - osx + +script: + - go test -cover -v ./... + +notifications: + email: false diff --git a/vendor/github.com/cyphar/filepath-securejoin/VERSION b/vendor/github.com/cyphar/filepath-securejoin/VERSION new file mode 100644 index 0000000000..ee1372d33a --- /dev/null +++ b/vendor/github.com/cyphar/filepath-securejoin/VERSION @@ -0,0 +1 @@ +0.2.2 diff --git a/vendor/github.com/deckarep/golang-set/.gitignore b/vendor/github.com/deckarep/golang-set/.gitignore new file mode 100644 index 0000000000..00268614f0 --- /dev/null +++ b/vendor/github.com/deckarep/golang-set/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/deckarep/golang-set/.travis.yml b/vendor/github.com/deckarep/golang-set/.travis.yml new file mode 100644 index 0000000000..db1359c72e --- /dev/null +++ b/vendor/github.com/deckarep/golang-set/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.2 + +script: + - go test ./... + #- go test -race ./... + diff --git a/vendor/github.com/docker/distribution/.gitignore b/vendor/github.com/docker/distribution/.gitignore new file mode 100644 index 0000000000..4cf7888e92 --- /dev/null +++ b/vendor/github.com/docker/distribution/.gitignore @@ -0,0 +1,38 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# never checkin from the bin file (for now) +bin/* + +# Test key files +*.pem + +# Cover profiles +*.out + +# Editor/IDE specific files. +*.sublime-project +*.sublime-workspace +.idea/* diff --git a/vendor/github.com/docker/distribution/.gometalinter.json b/vendor/github.com/docker/distribution/.gometalinter.json new file mode 100644 index 0000000000..9df5b14bcb --- /dev/null +++ b/vendor/github.com/docker/distribution/.gometalinter.json @@ -0,0 +1,16 @@ +{ + "Vendor": true, + "Deadline": "2m", + "Sort": ["linter", "severity", "path", "line"], + "EnableGC": true, + "Enable": [ + "structcheck", + "staticcheck", + "unconvert", + + "gofmt", + "goimports", + "golint", + "vet" + ] +} diff --git a/vendor/github.com/docker/distribution/.mailmap b/vendor/github.com/docker/distribution/.mailmap new file mode 100644 index 0000000000..0f48321d49 --- /dev/null +++ b/vendor/github.com/docker/distribution/.mailmap @@ -0,0 +1,32 @@ +Stephen J Day Stephen Day +Stephen J Day Stephen Day +Olivier Gambier Olivier Gambier +Brian Bland Brian Bland +Brian Bland Brian Bland +Josh Hawn Josh Hawn +Richard Scothern Richard +Richard Scothern Richard Scothern +Andrew Meredith Andrew Meredith +harche harche +Jessie Frazelle +Sharif Nassar Sharif Nassar +Sven Dowideit Sven Dowideit +Vincent Giersch Vincent Giersch +davidli davidli +Omer Cohen Omer Cohen +Eric Yang Eric Yang +Nikita Tarasov Nikita +Yu Wang yuwaMSFT2 +Yu Wang Yu Wang (UC) +Olivier Gambier dmp +Olivier Gambier Olivier +Olivier Gambier Olivier +Elsan Li 李楠 elsanli(李楠) +Rui Cao ruicao +Gwendolynne Barr gbarr01 +Haibing Zhou 周海兵 zhouhaibing089 +Feng Honglin tifayuki +Helen Xie Helen-xie +Mike Brown Mike Brown +Manish Tomar Manish Tomar +Sakeven Jiang sakeven diff --git a/vendor/github.com/docker/distribution/.travis.yml b/vendor/github.com/docker/distribution/.travis.yml new file mode 100644 index 0000000000..44ced60451 --- /dev/null +++ b/vendor/github.com/docker/distribution/.travis.yml @@ -0,0 +1,51 @@ +dist: trusty +sudo: required +# setup travis so that we can run containers for integration tests +services: + - docker + +language: go + +go: + - "1.11.x" + +go_import_path: github.com/docker/distribution + +addons: + apt: + packages: + - python-minimal + + +env: + - TRAVIS_GOOS=linux DOCKER_BUILDTAGS="include_oss include_gcs" TRAVIS_CGO_ENABLED=1 + +before_install: + - uname -r + - sudo apt-get -q update + +install: + - go get -u github.com/vbatts/git-validation + # TODO: Add enforcement of license + # - go get -u github.com/kunalkushwaha/ltag + - cd $TRAVIS_BUILD_DIR + +script: + - export GOOS=$TRAVIS_GOOS + - export CGO_ENABLED=$TRAVIS_CGO_ENABLED + - DCO_VERBOSITY=-q script/validate/dco + - GOOS=linux script/setup/install-dev-tools + - script/validate/vendor + - go build -i . + - make check + - make build + - make binaries + # Currently takes too long + #- if [ "$GOOS" = "linux" ]; then make test-race ; fi + - if [ "$GOOS" = "linux" ]; then make coverage ; fi + +after_success: + - bash <(curl -s https://codecov.io/bash) -F linux + +before_deploy: + # Run tests with storage driver configurations diff --git a/vendor/github.com/docker/distribution/BUILDING.md b/vendor/github.com/docker/distribution/BUILDING.md new file mode 100644 index 0000000000..2981d016b0 --- /dev/null +++ b/vendor/github.com/docker/distribution/BUILDING.md @@ -0,0 +1,117 @@ + +# Building the registry source + +## Use-case + +This is useful if you intend to actively work on the registry. + +### Alternatives + +Most people should use the [official Registry docker image](https://hub.docker.com/r/library/registry/). + +People looking for advanced operational use cases might consider rolling their own image with a custom Dockerfile inheriting `FROM registry:2`. + +OS X users who want to run natively can do so following [the instructions here](https://github.com/docker/docker.github.io/blob/master/registry/recipes/osx-setup-guide.md). + +### Gotchas + +You are expected to know your way around with go & git. + +If you are a casual user with no development experience, and no preliminary knowledge of go, building from source is probably not a good solution for you. + +## Build the development environment + +The first prerequisite of properly building distribution targets is to have a Go +development environment setup. Please follow [How to Write Go Code](https://golang.org/doc/code.html) +for proper setup. If done correctly, you should have a GOROOT and GOPATH set in the +environment. + +If a Go development environment is setup, one can use `go get` to install the +`registry` command from the current latest: + + go get github.com/docker/distribution/cmd/registry + +The above will install the source repository into the `GOPATH`. + +Now create the directory for the registry data (this might require you to set permissions properly) + + mkdir -p /var/lib/registry + +... or alternatively `export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere` if you want to store data into another location. + +The `registry` +binary can then be run with the following: + + $ $GOPATH/bin/registry --version + $GOPATH/bin/registry github.com/docker/distribution v2.0.0-alpha.1+unknown + +> __NOTE:__ While you do not need to use `go get` to checkout the distribution +> project, for these build instructions to work, the project must be checked +> out in the correct location in the `GOPATH`. This should almost always be +> `$GOPATH/src/github.com/docker/distribution`. + +The registry can be run with the default config using the following +incantation: + + $ $GOPATH/bin/registry serve $GOPATH/src/github.com/docker/distribution/cmd/registry/config-example.yml + INFO[0000] endpoint local-5003 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] endpoint local-8083 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] listening on :5000 app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] debug server listening localhost:5001 + +If it is working, one should see the above log messages. + +### Repeatable Builds + +For the full development experience, one should `cd` into +`$GOPATH/src/github.com/docker/distribution`. From there, the regular `go` +commands, such as `go test`, should work per package (please see +[Developing](#developing) if they don't work). + +A `Makefile` has been provided as a convenience to support repeatable builds. +Please install the following into `GOPATH` for it to work: + + go get github.com/golang/lint/golint + +Once these commands are available in the `GOPATH`, run `make` to get a full +build: + + $ make + + clean + + fmt + + vet + + lint + + build + github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar + github.com/sirupsen/logrus + github.com/docker/libtrust + ... + github.com/yvasiyarov/gorelic + github.com/docker/distribution/registry/handlers + github.com/docker/distribution/cmd/registry + + test + ... + ok github.com/docker/distribution/digest 7.875s + ok github.com/docker/distribution/manifest 0.028s + ok github.com/docker/distribution/notifications 17.322s + ? github.com/docker/distribution/registry [no test files] + ok github.com/docker/distribution/registry/api/v2 0.101s + ? github.com/docker/distribution/registry/auth [no test files] + ok github.com/docker/distribution/registry/auth/silly 0.011s + ... + + /Users/sday/go/src/github.com/docker/distribution/bin/registry + + /Users/sday/go/src/github.com/docker/distribution/bin/registry-api-descriptor-template + + binaries + +The above provides a repeatable build using the contents of the vendor +directory. This includes formatting, vetting, linting, building, +testing and generating tagged binaries. We can verify this worked by running +the registry binary generated in the "./bin" directory: + + $ ./bin/registry --version + ./bin/registry github.com/docker/distribution v2.0.0-alpha.2-80-g16d8b2c.m + +### Optional build tags + +Optional [build tags](http://golang.org/pkg/go/build/) can be provided using +the environment variable `DOCKER_BUILDTAGS`. diff --git a/vendor/github.com/docker/distribution/CONTRIBUTING.md b/vendor/github.com/docker/distribution/CONTRIBUTING.md new file mode 100644 index 0000000000..4c067d9e7e --- /dev/null +++ b/vendor/github.com/docker/distribution/CONTRIBUTING.md @@ -0,0 +1,148 @@ +# Contributing to the registry + +## Before reporting an issue... + +### If your problem is with... + + - automated builds + - your account on the [Docker Hub](https://hub.docker.com/) + - any other [Docker Hub](https://hub.docker.com/) issue + +Then please do not report your issue here - you should instead report it to [https://support.docker.com](https://support.docker.com) + +### If you... + + - need help setting up your registry + - can't figure out something + - are not sure what's going on or what your problem is + +Then please do not open an issue here yet - you should first try one of the following support forums: + + - irc: #docker-distribution on freenode + - mailing-list: or https://groups.google.com/a/dockerproject.org/forum/#!forum/distribution + +### Reporting security issues + +The Docker maintainers take security seriously. If you discover a security +issue, please bring it to their attention right away! + +Please **DO NOT** file a public issue, instead send your report privately to +[security@docker.com](mailto:security@docker.com). + +## Reporting an issue properly + +By following these simple rules you will get better and faster feedback on your issue. + + - search the bugtracker for an already reported issue + +### If you found an issue that describes your problem: + + - please read other user comments first, and confirm this is the same issue: a given error condition might be indicative of different problems - you may also find a workaround in the comments + - please refrain from adding "same thing here" or "+1" comments + - you don't need to comment on an issue to get notified of updates: just hit the "subscribe" button + - comment if you have some new, technical and relevant information to add to the case + - __DO NOT__ comment on closed issues or merged PRs. If you think you have a related problem, open up a new issue and reference the PR or issue. + +### If you have not found an existing issue that describes your problem: + + 1. create a new issue, with a succinct title that describes your issue: + - bad title: "It doesn't work with my docker" + - good title: "Private registry push fail: 400 error with E_INVALID_DIGEST" + 2. copy the output of: + - `docker version` + - `docker info` + - `docker exec registry --version` + 3. copy the command line you used to launch your Registry + 4. restart your docker daemon in debug mode (add `-D` to the daemon launch arguments) + 5. reproduce your problem and get your docker daemon logs showing the error + 6. if relevant, copy your registry logs that show the error + 7. provide any relevant detail about your specific Registry configuration (e.g., storage backend used) + 8. indicate if you are using an enterprise proxy, Nginx, or anything else between you and your Registry + +## Contributing a patch for a known bug, or a small correction + +You should follow the basic GitHub workflow: + + 1. fork + 2. commit a change + 3. make sure the tests pass + 4. PR + +Additionally, you must [sign your commits](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work). It's very simple: + + - configure your name with git: `git config user.name "Real Name" && git config user.email mail@example.com` + - sign your commits using `-s`: `git commit -s -m "My commit"` + +Some simple rules to ensure quick merge: + + - clearly point to the issue(s) you want to fix in your PR comment (e.g., `closes #12345`) + - prefer multiple (smaller) PRs addressing individual issues over a big one trying to address multiple issues at once + - if you need to amend your PR following comments, please squash instead of adding more commits + +## Contributing new features + +You are heavily encouraged to first discuss what you want to do. You can do so on the irc channel, or by opening an issue that clearly describes the use case you want to fulfill, or the problem you are trying to solve. + +If this is a major new feature, you should then submit a proposal that describes your technical solution and reasoning. +If you did discuss it first, this will likely be greenlighted very fast. It's advisable to address all feedback on this proposal before starting actual work. + +Then you should submit your implementation, clearly linking to the issue (and possible proposal). + +Your PR will be reviewed by the community, then ultimately by the project maintainers, before being merged. + +It's mandatory to: + + - interact respectfully with other community members and maintainers - more generally, you are expected to abide by the [Docker community rules](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#docker-community-guidelines) + - address maintainers' comments and modify your submission accordingly + - write tests for any new code + +Complying to these simple rules will greatly accelerate the review process, and will ensure you have a pleasant experience in contributing code to the Registry. + +Have a look at a great, successful contribution: the [Swift driver PR](https://github.com/docker/distribution/pull/493) + +## Coding Style + +Unless explicitly stated, we follow all coding guidelines from the Go +community. While some of these standards may seem arbitrary, they somehow seem +to result in a solid, consistent codebase. + +It is possible that the code base does not currently comply with these +guidelines. We are not looking for a massive PR that fixes this, since that +goes against the spirit of the guidelines. All new contributions should make a +best effort to clean up and make the code base better than they left it. +Obviously, apply your best judgement. Remember, the goal here is to make the +code base easier for humans to navigate and understand. Always keep that in +mind when nudging others to comply. + +The rules: + +1. All code should be formatted with `gofmt -s`. +2. All code should pass the default levels of + [`golint`](https://github.com/golang/lint). +3. All code should follow the guidelines covered in [Effective + Go](http://golang.org/doc/effective_go.html) and [Go Code Review + Comments](https://github.com/golang/go/wiki/CodeReviewComments). +4. Comment the code. Tell us the why, the history and the context. +5. Document _all_ declarations and methods, even private ones. Declare + expectations, caveats and anything else that may be important. If a type + gets exported, having the comments already there will ensure it's ready. +6. Variable name length should be proportional to its context and no longer. + `noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`. + In practice, short methods will have short variable names and globals will + have longer names. +7. No underscores in package names. If you need a compound name, step back, + and re-examine why you need a compound name. If you still think you need a + compound name, lose the underscore. +8. No utils or helpers packages. If a function is not general enough to + warrant its own package, it has not been written generally enough to be a + part of a util package. Just leave it unexported and well-documented. +9. All tests should run with `go test` and outside tooling should not be + required. No, we don't need another unit testing framework. Assertion + packages are acceptable if they provide _real_ incremental value. +10. Even though we call these "rules" above, they are actually just + guidelines. Since you've read all the rules, you now know that. + +If you are having trouble getting into the mood of idiomatic Go, we recommend +reading through [Effective Go](http://golang.org/doc/effective_go.html). The +[Go Blog](http://blog.golang.org/) is also a great resource. Drinking the +kool-aid is a lot easier than going thirsty. diff --git a/vendor/github.com/docker/distribution/Dockerfile b/vendor/github.com/docker/distribution/Dockerfile new file mode 100644 index 0000000000..612e62ce12 --- /dev/null +++ b/vendor/github.com/docker/distribution/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.11-alpine AS build + +ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution +ENV DOCKER_BUILDTAGS include_oss include_gcs + +ARG GOOS=linux +ARG GOARCH=amd64 +ARG GOARM=6 + +RUN set -ex \ + && apk add --no-cache make git file + +WORKDIR $DISTRIBUTION_DIR +COPY . $DISTRIBUTION_DIR +RUN CGO_ENABLED=0 make PREFIX=/go clean binaries && file ./bin/registry | grep "statically linked" + +FROM alpine +COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml +COPY --from=build /go/src/github.com/docker/distribution/bin/registry /bin/registry +VOLUME ["/var/lib/registry"] +EXPOSE 5000 +ENTRYPOINT ["registry"] +CMD ["serve", "/etc/docker/registry/config.yml"] diff --git a/vendor/github.com/docker/distribution/MAINTAINERS b/vendor/github.com/docker/distribution/MAINTAINERS new file mode 100644 index 0000000000..3183620c57 --- /dev/null +++ b/vendor/github.com/docker/distribution/MAINTAINERS @@ -0,0 +1,243 @@ +# Distribution maintainers file +# +# This file describes who runs the docker/distribution project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# + +[Rules] + + [Rules.maintainers] + + title = "What is a maintainer?" + + text = """ +There are different types of maintainers, with different responsibilities, but +all maintainers have 3 things in common: + +1) They share responsibility in the project's success. +2) They have made a long-term, recurring time investment to improve the project. +3) They spend that time doing whatever needs to be done, not necessarily what +is the most interesting or fun. + +Maintainers are often under-appreciated, because their work is harder to appreciate. +It's easy to appreciate a really cool and technically advanced feature. It's harder +to appreciate the absence of bugs, the slow but steady improvement in stability, +or the reliability of a release process. But those things distinguish a good +project from a great one. +""" + + [Rules.reviewer] + + title = "What is a reviewer?" + + text = """ +A reviewer is a core role within the project. +They share in reviewing issues and pull requests and their LGTM count towards the +required LGTM count to merge a code change into the project. + +Reviewers are part of the organization but do not have write access. +Becoming a reviewer is a core aspect in the journey to becoming a maintainer. +""" + + [Rules.adding-maintainers] + + title = "How are maintainers added?" + + text = """ +Maintainers are first and foremost contributors that have shown they are +committed to the long term success of a project. Contributors wanting to become +maintainers are expected to be deeply involved in contributing code, pull +request review, and triage of issues in the project for more than three months. + +Just contributing does not make you a maintainer, it is about building trust +with the current maintainers of the project and being a person that they can +depend on and trust to make decisions in the best interest of the project. + +Periodically, the existing maintainers curate a list of contributors that have +shown regular activity on the project over the prior months. From this list, +maintainer candidates are selected and proposed on the maintainers mailing list. + +After a candidate has been announced on the maintainers mailing list, the +existing maintainers are given five business days to discuss the candidate, +raise objections and cast their vote. Candidates must be approved by at least 66% of the current maintainers by adding their vote on the mailing +list. Only maintainers of the repository that the candidate is proposed for are +allowed to vote. + +If a candidate is approved, a maintainer will contact the candidate to invite +the candidate to open a pull request that adds the contributor to the +MAINTAINERS file. The candidate becomes a maintainer once the pull request is +merged. +""" + + [Rules.stepping-down-policy] + + title = "Stepping down policy" + + text = """ +Life priorities, interests, and passions can change. If you're a maintainer but +feel you must remove yourself from the list, inform other maintainers that you +intend to step down, and if possible, help find someone to pick up your work. +At the very least, ensure your work can be continued where you left off. + +After you've informed other maintainers, create a pull request to remove +yourself from the MAINTAINERS file. +""" + + [Rules.inactive-maintainers] + + title = "Removal of inactive maintainers" + + text = """ +Similar to the procedure for adding new maintainers, existing maintainers can +be removed from the list if they do not show significant activity on the +project. Periodically, the maintainers review the list of maintainers and their +activity over the last three months. + +If a maintainer has shown insufficient activity over this period, a neutral +person will contact the maintainer to ask if they want to continue being +a maintainer. If the maintainer decides to step down as a maintainer, they +open a pull request to be removed from the MAINTAINERS file. + +If the maintainer wants to remain a maintainer, but is unable to perform the +required duties they can be removed with a vote of at least 66% of +the current maintainers. An e-mail is sent to the +mailing list, inviting maintainers of the project to vote. The voting period is +five business days. Issues related to a maintainer's performance should be +discussed with them among the other maintainers so that they are not surprised +by a pull request removing them. +""" + + [Rules.decisions] + + title = "How are decisions made?" + + text = """ +Short answer: EVERYTHING IS A PULL REQUEST. + +distribution is an open-source project with an open design philosophy. This means +that the repository is the source of truth for EVERY aspect of the project, +including its philosophy, design, road map, and APIs. *If it's part of the +project, it's in the repo. If it's in the repo, it's part of the project.* + +As a result, all decisions can be expressed as changes to the repository. An +implementation change is a change to the source code. An API change is a change +to the API specification. A philosophy change is a change to the philosophy +manifesto, and so on. + +All decisions affecting distribution, big and small, follow the same 3 steps: + +* Step 1: Open a pull request. Anyone can do this. + +* Step 2: Discuss the pull request. Anyone can do this. + +* Step 3: Merge or refuse the pull request. Who does this depends on the nature +of the pull request and which areas of the project it affects. +""" + + [Rules.DCO] + + title = "Helping contributors with the DCO" + + text = """ +The [DCO or `Sign your work`]( +https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work) +requirement is not intended as a roadblock or speed bump. + +Some distribution contributors are not as familiar with `git`, or have used a web +based editor, and thus asking them to `git commit --amend -s` is not the best +way forward. + +In this case, maintainers can update the commits based on clause (c) of the DCO. +The most trivial way for a contributor to allow the maintainer to do this, is to +add a DCO signature in a pull requests's comment, or a maintainer can simply +note that the change is sufficiently trivial that it does not substantially +change the existing contribution - i.e., a spelling change. + +When you add someone's DCO, please also add your own to keep a log. +""" + + [Rules."no direct push"] + + title = "I'm a maintainer. Should I make pull requests too?" + + text = """ +Yes. Nobody should ever push to master directly. All changes should be +made through a pull request. +""" + + [Rules.tsc] + + title = "Conflict Resolution and technical disputes" + + text = """ +distribution defers to the [Technical Steering Committee](https://github.com/moby/tsc) for escalations and resolution on disputes for technical matters." + """ + + [Rules.meta] + + title = "How is this process changed?" + + text = "Just like everything else: by making a pull request :)" + +# Current project organization +[Org] + + [Org.Maintainers] + people = [ + "dmcgowan", + "dmp42", + "stevvooe", + ] + [Org.Reviewers] + people = [ + "manishtomar", + "caervs", + "davidswu", + "RobbKistler" + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.caervs] + Name = "Ryan Abrams" + Email = "rdabrams@gmail.com" + GitHub = "caervs" + + [people.davidswu] + Name = "David Wu" + Email = "dwu7401@gmail.com" + GitHub = "davidswu" + + [people.dmcgowan] + Name = "Derek McGowan" + Email = "derek@mcgstyle.net" + GitHub = "dmcgowan" + + [people.dmp42] + Name = "Olivier Gambier" + Email = "olivier@docker.com" + GitHub = "dmp42" + + [people.manishtomar] + Name = "Manish Tomar" + Email = "manish.tomar@docker.com" + GitHub = "manishtomar" + + [people.RobbKistler] + Name = "Robb Kistler" + Email = "robb.kistler@docker.com" + GitHub = "RobbKistler" + + [people.stevvooe] + Name = "Stephen Day" + Email = "stephen.day@docker.com" + GitHub = "stevvooe" diff --git a/vendor/github.com/docker/distribution/Makefile b/vendor/github.com/docker/distribution/Makefile new file mode 100644 index 0000000000..4635c6eca8 --- /dev/null +++ b/vendor/github.com/docker/distribution/Makefile @@ -0,0 +1,102 @@ +# Root directory of the project (absolute path). +ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + +# Used to populate version variable in main package. +VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) +REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) + + +PKG=github.com/docker/distribution + +# Project packages. +PACKAGES=$(shell go list -tags "${BUILDTAGS}" ./... | grep -v /vendor/) +INTEGRATION_PACKAGE=${PKG} +COVERAGE_PACKAGES=$(filter-out ${PKG}/registry/storage/driver/%,${PACKAGES}) + + +# Project binaries. +COMMANDS=registry digest registry-api-descriptor-template + +# Allow turning off function inlining and variable registerization +ifeq (${DISABLE_OPTIMIZATION},true) + GO_GCFLAGS=-gcflags "-N -l" + VERSION:="$(VERSION)-noopt" +endif + +WHALE = "+" + +# Go files +# +TESTFLAGS_RACE= +GOFILES=$(shell find . -type f -name '*.go') +GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",) +GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) $(EXTRA_LDFLAGS)' + +BINARIES=$(addprefix bin/,$(COMMANDS)) + +# Flags passed to `go test` +TESTFLAGS ?= -v $(TESTFLAGS_RACE) +TESTFLAGS_PARALLEL ?= 8 + +.PHONY: all build binaries check clean test test-race test-full integration coverage +.DEFAULT: all + +all: binaries + +# This only needs to be generated by hand when cutting full releases. +version/version.go: + @echo "$(WHALE) $@" + ./version/version.sh > $@ + +check: ## run all linters (TODO: enable "unused", "varcheck", "ineffassign", "unconvert", "staticheck", "goimports", "structcheck") + @echo "$(WHALE) $@" + gometalinter --config .gometalinter.json ./... + +test: ## run tests, except integration test with test.short + @echo "$(WHALE) $@" + @go test ${GO_TAGS} -test.short ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) + +test-race: ## run tests, except integration test with test.short and race + @echo "$(WHALE) $@" + @go test ${GO_TAGS} -race -test.short ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) + +test-full: ## run tests, except integration tests + @echo "$(WHALE) $@" + @go test ${GO_TAGS} ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) + +integration: ## run integration tests + @echo "$(WHALE) $@" + @go test ${TESTFLAGS} -parallel ${TESTFLAGS_PARALLEL} ${INTEGRATION_PACKAGE} + +coverage: ## generate coverprofiles from the unit tests + @echo "$(WHALE) $@" + @rm -f coverage.txt + @go test ${GO_TAGS} -i ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${COVERAGE_PACKAGES}) 2> /dev/null + @( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${COVERAGE_PACKAGES}); do \ + go test ${GO_TAGS} ${TESTFLAGS} \ + -cover \ + -coverprofile=profile.out \ + -covermode=atomic $$pkg || exit; \ + if [ -f profile.out ]; then \ + cat profile.out >> coverage.txt; \ + rm profile.out; \ + fi; \ + done ) + +FORCE: + +# Build a binary from a cmd. +bin/%: cmd/% FORCE + @echo "$(WHALE) $@${BINARY_SUFFIX}" + @go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< + +binaries: $(BINARIES) ## build binaries + @echo "$(WHALE) $@" + +build: + @echo "$(WHALE) $@" + @go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${GO_LDFLAGS} ${GO_TAGS} $(PACKAGES) + +clean: ## clean up binaries + @echo "$(WHALE) $@" + @rm -f $(BINARIES) diff --git a/vendor/github.com/docker/distribution/ROADMAP.md b/vendor/github.com/docker/distribution/ROADMAP.md new file mode 100644 index 0000000000..701127afec --- /dev/null +++ b/vendor/github.com/docker/distribution/ROADMAP.md @@ -0,0 +1,267 @@ +# Roadmap + +The Distribution Project consists of several components, some of which are +still being defined. This document defines the high-level goals of the +project, identifies the current components, and defines the release- +relationship to the Docker Platform. + +* [Distribution Goals](#distribution-goals) +* [Distribution Components](#distribution-components) +* [Project Planning](#project-planning): release-relationship to the Docker Platform. + +This road map is a living document, providing an overview of the goals and +considerations made in respect of the future of the project. + +## Distribution Goals + +- Replace the existing [docker registry](github.com/docker/docker-registry) + implementation as the primary implementation. +- Replace the existing push and pull code in the docker engine with the + distribution package. +- Define a strong data model for distributing docker images +- Provide a flexible distribution tool kit for use in the docker platform +- Unlock new distribution models + +## Distribution Components + +Components of the Distribution Project are managed via github [milestones](https://github.com/docker/distribution/milestones). Upcoming +features and bugfixes for a component will be added to the relevant milestone. If a feature or +bugfix is not part of a milestone, it is currently unscheduled for +implementation. + +* [Registry](#registry) +* [Distribution Package](#distribution-package) + +*** + +### Registry + +The new Docker registry is the main portion of the distribution repository. +Registry 2.0 is the first release of the next-generation registry. This was +primarily focused on implementing the [new registry +API](https://github.com/docker/distribution/blob/master/docs/spec/api.md), +with a focus on security and performance. + +Following from the Distribution project goals above, we have a set of goals +for registry v2 that we would like to follow in the design. New features +should be compared against these goals. + +#### Data Storage and Distribution First + +The registry's first goal is to provide a reliable, consistent storage +location for Docker images. The registry should only provide the minimal +amount of indexing required to fetch image data and no more. + +This means we should be selective in new features and API additions, including +those that may require expensive, ever growing indexes. Requests should be +servable in "constant time". + +#### Content Addressability + +All data objects used in the registry API should be content addressable. +Content identifiers should be secure and verifiable. This provides a secure, +reliable base from which to build more advanced content distribution systems. + +#### Content Agnostic + +In the past, changes to the image format would require large changes in Docker +and the Registry. By decoupling the distribution and image format, we can +allow the formats to progress without having to coordinate between the two. +This means that we should be focused on decoupling Docker from the registry +just as much as decoupling the registry from Docker. Such an approach will +allow us to unlock new distribution models that haven't been possible before. + +We can take this further by saying that the new registry should be content +agnostic. The registry provides a model of names, tags, manifests and content +addresses and that model can be used to work with content. + +#### Simplicity + +The new registry should be closer to a microservice component than its +predecessor. This means it should have a narrower API and a low number of +service dependencies. It should be easy to deploy. + +This means that other solutions should be explored before changing the API or +adding extra dependencies. If functionality is required, can it be added as an +extension or companion service. + +#### Extensibility + +The registry should provide extension points to add functionality. By keeping +the scope narrow, but providing the ability to add functionality. + +Features like search, indexing, synchronization and registry explorers fall +into this category. No such feature should be added unless we've found it +impossible to do through an extension. + +#### Active Feature Discussions + +The following are feature discussions that are currently active. + +If you don't see your favorite, unimplemented feature, feel free to contact us +via IRC or the mailing list and we can talk about adding it. The goal here is +to make sure that new features go through a rigid design process before +landing in the registry. + +##### Proxying to other Registries + +A _pull-through caching_ mode exists for the registry, but is restricted from +within the docker client to only mirror the official Docker Hub. This functionality +can be expanded when image provenance has been specified and implemented in the +distribution project. + +##### Metadata storage + +Metadata for the registry is currently stored with the manifest and layer data on +the storage backend. While this is a big win for simplicity and reliably maintaining +state, it comes with the cost of consistency and high latency. The mutable registry +metadata operations should be abstracted behind an API which will allow ACID compliant +storage systems to handle metadata. + +##### Peer to Peer transfer + +Discussion has started here: https://docs.google.com/document/d/1rYDpSpJiQWmCQy8Cuiaa3NH-Co33oK_SC9HeXYo87QA/edit + +##### Indexing, Search and Discovery + +The original registry provided some implementation of search for use with +private registries. Support has been elided from V2 since we'd like to both +decouple search functionality from the registry. The makes the registry +simpler to deploy, especially in use cases where search is not needed, and +let's us decouple the image format from the registry. + +There are explorations into using the catalog API and notification system to +build external indexes. The current line of thought is that we will define a +common search API to index and query docker images. Such a system could be run +as a companion to a registry or set of registries to power discovery. + +The main issue with search and discovery is that there are so many ways to +accomplish it. There are two aspects to this project. The first is deciding on +how it will be done, including an API definition that can work with changing +data formats. The second is the process of integrating with `docker search`. +We expect that someone attempts to address the problem with the existing tools +and propose it as a standard search API or uses it to inform a standardization +process. Once this has been explored, we integrate with the docker client. + +Please see the following for more detail: + +- https://github.com/docker/distribution/issues/206 + +##### Deletes + +> __NOTE:__ Deletes are a much asked for feature. Before requesting this +feature or participating in discussion, we ask that you read this section in +full and understand the problems behind deletes. + +While, at first glance, implementing deleting seems simple, there are a number +mitigating factors that make many solutions not ideal or even pathological in +the context of a registry. The following paragraph discuss the background and +approaches that could be applied to arrive at a solution. + +The goal of deletes in any system is to remove unused or unneeded data. Only +data requested for deletion should be removed and no other data. Removing +unintended data is worse than _not_ removing data that was requested for +removal but ideally, both are supported. Generally, according to this rule, we +err on holding data longer than needed, ensuring that it is only removed when +we can be certain that it can be removed. With the current behavior, we opt to +hold onto the data forever, ensuring that data cannot be incorrectly removed. + +To understand the problems with implementing deletes, one must understand the +data model. All registry data is stored in a filesystem layout, implemented on +a "storage driver", effectively a _virtual file system_ (VFS). The storage +system must assume that this VFS layer will be eventually consistent and has +poor read- after-write consistency, since this is the lower common denominator +among the storage drivers. This is mitigated by writing values in reverse- +dependent order, but makes wider transactional operations unsafe. + +Layered on the VFS model is a content-addressable _directed, acyclic graph_ +(DAG) made up of blobs. Manifests reference layers. Tags reference manifests. +Since the same data can be referenced by multiple manifests, we only store +data once, even if it is in different repositories. Thus, we have a set of +blobs, referenced by tags and manifests. If we want to delete a blob we need +to be certain that it is no longer referenced by another manifest or tag. When +we delete a manifest, we also can try to delete the referenced blobs. Deciding +whether or not a blob has an active reference is the crux of the problem. + +Conceptually, deleting a manifest and its resources is quite simple. Just find +all the manifests, enumerate the referenced blobs and delete the blobs not in +that set. An astute observer will recognize this as a garbage collection +problem. As with garbage collection in programming languages, this is very +simple when one always has a consistent view. When one adds parallelism and an +inconsistent view of data, it becomes very challenging. + +A simple example can demonstrate this. Let's say we are deleting a manifest +_A_ in one process. We scan the manifest and decide that all the blobs are +ready for deletion. Concurrently, we have another process accepting a new +manifest _B_ referencing one or more blobs from the manifest _A_. Manifest _B_ +is accepted and all the blobs are considered present, so the operation +proceeds. The original process then deletes the referenced blobs, assuming +they were unreferenced. The manifest _B_, which we thought had all of its data +present, can no longer be served by the registry, since the dependent data has +been deleted. + +Deleting data from the registry safely requires some way to coordinate this +operation. The following approaches are being considered: + +- _Reference Counting_ - Maintain a count of references to each blob. This is + challenging for a number of reasons: 1. maintaining a consistent consensus + of reference counts across a set of Registries and 2. Building the initial + list of reference counts for an existing registry. These challenges can be + met with a consensus protocol like Paxos or Raft in the first case and a + necessary but simple scan in the second.. +- _Lock the World GC_ - Halt all writes to the data store. Walk the data store + and find all blob references. Delete all unreferenced blobs. This approach + is very simple but requires disabling writes for a period of time while the + service reads all data. This is slow and expensive but very accurate and + effective. +- _Generational GC_ - Do something similar to above but instead of blocking + writes, writes are sent to another storage backend while reads are broadcast + to the new and old backends. GC is then performed on the read-only portion. + Because writes land in the new backend, the data in the read-only section + can be safely deleted. The main drawbacks of this approach are complexity + and coordination. +- _Centralized Oracle_ - Using a centralized, transactional database, we can + know exactly which data is referenced at any given time. This avoids + coordination problem by managing this data in a single location. We trade + off metadata scalability for simplicity and performance. This is a very good + option for most registry deployments. This would create a bottleneck for + registry metadata. However, metadata is generally not the main bottleneck + when serving images. + +Please let us know if other solutions exist that we have yet to enumerate. +Note that for any approach, implementation is a massive consideration. For +example, a mark-sweep based solution may seem simple but the amount of work in +coordination offset the extra work it might take to build a _Centralized +Oracle_. We'll accept proposals for any solution but please coordinate with us +before dropping code. + +At this time, we have traded off simplicity and ease of deployment for disk +space. Simplicity and ease of deployment tend to reduce developer involvement, +which is currently the most expensive resource in software engineering. Taking +on any solution for deletes will greatly effect these factors, trading off +very cheap disk space for a complex deployment and operational story. + +Please see the following issues for more detail: + +- https://github.com/docker/distribution/issues/422 +- https://github.com/docker/distribution/issues/461 +- https://github.com/docker/distribution/issues/462 + +### Distribution Package + +At its core, the Distribution Project is a set of Go packages that make up +Distribution Components. At this time, most of these packages make up the +Registry implementation. + +The package itself is considered unstable. If you're using it, please take care to vendor the dependent version. + +For feature additions, please see the Registry section. In the future, we may break out a +separate Roadmap for distribution-specific features that apply to more than +just the registry. + +*** + +### Project Planning + +An [Open-Source Planning Process](https://github.com/docker/distribution/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/docker/distribution/wiki) define the goals for each Milestone and identify current progress. + diff --git a/vendor/github.com/docker/go-connections/README.md b/vendor/github.com/docker/go-connections/README.md deleted file mode 100644 index d257e44fdc..0000000000 --- a/vendor/github.com/docker/go-connections/README.md +++ /dev/null @@ -1,13 +0,0 @@ -[![GoDoc](https://godoc.org/github.com/docker/go-connections?status.svg)](https://godoc.org/github.com/docker/go-connections) - -# Introduction - -go-connections provides common package to work with network connections. - -## Usage - -See the [docs in godoc](https://godoc.org/github.com/docker/go-connections) for examples and documentation. - -## License - -go-connections is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. diff --git a/vendor/github.com/docker/go-events/.gitignore b/vendor/github.com/docker/go-events/.gitignore new file mode 100644 index 0000000000..daf913b1b3 --- /dev/null +++ b/vendor/github.com/docker/go-events/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/docker/go-events/CONTRIBUTING.md b/vendor/github.com/docker/go-events/CONTRIBUTING.md new file mode 100644 index 0000000000..d813af779b --- /dev/null +++ b/vendor/github.com/docker/go-events/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# Contributing to Docker open source projects + +Want to hack on go-events? Awesome! Here are instructions to get you started. + +go-events is part of the [Docker](https://www.docker.com) project, and +follows the same rules and principles. If you're already familiar with the way +Docker does things, you'll feel right at home. + +Otherwise, go read Docker's +[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), +[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md), +[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and +[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md). + +For an in-depth description of our contribution process, visit the +contributors guide: [Understand how to contribute](https://docs.docker.com/opensource/workflow/make-a-contribution/) + +### Sign your work + +The sign-off is a simple line at the end of the explanation for the patch. Your +signature certifies that you wrote the patch or otherwise have the right to pass +it on as an open-source patch. The rules are pretty simple: if you can certify +the below (from [developercertificate.org](http://developercertificate.org/)): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +Then you just add a line to every git commit message: + + Signed-off-by: Joe Smith + +Use your real name (sorry, no pseudonyms or anonymous contributions.) + +If you set your `user.name` and `user.email` git configs, you can sign your +commit automatically with `git commit -s`. diff --git a/vendor/github.com/docker/go-events/MAINTAINERS b/vendor/github.com/docker/go-events/MAINTAINERS new file mode 100644 index 0000000000..e414d82e96 --- /dev/null +++ b/vendor/github.com/docker/go-events/MAINTAINERS @@ -0,0 +1,46 @@ +# go-events maintainers file +# +# This file describes who runs the docker/go-events project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# +# This file is compiled into the MAINTAINERS file in docker/opensource. +# +[Org] + [Org."Core maintainers"] + people = [ + "aaronlehmann", + "aluzzardi", + "lk4d4", + "stevvooe", + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.aaronlehmann] + Name = "Aaron Lehmann" + Email = "aaron.lehmann@docker.com" + GitHub = "aaronlehmann" + + [people.aluzzardi] + Name = "Andrea Luzzardi" + Email = "al@docker.com" + GitHub = "aluzzardi" + + [people.lk4d4] + Name = "Alexander Morozov" + Email = "lk4d4@docker.com" + GitHub = "lk4d4" + + [people.stevvooe] + Name = "Stephen Day" + Email = "stephen.day@docker.com" + GitHub = "stevvooe" diff --git a/vendor/github.com/docker/go-metrics/CONTRIBUTING.md b/vendor/github.com/docker/go-metrics/CONTRIBUTING.md new file mode 100644 index 0000000000..b8a512c366 --- /dev/null +++ b/vendor/github.com/docker/go-metrics/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# Contributing + +## Sign your work + +The sign-off is a simple line at the end of the explanation for the patch. Your +signature certifies that you wrote the patch or otherwise have the right to pass +it on as an open-source patch. The rules are pretty simple: if you can certify +the below (from [developercertificate.org](http://developercertificate.org/)): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +Then you just add a line to every git commit message: + + Signed-off-by: Joe Smith + +Use your real name (sorry, no pseudonyms or anonymous contributions.) + +If you set your `user.name` and `user.email` git configs, you can sign your +commit automatically with `git commit -s`. diff --git a/vendor/github.com/docker/go-metrics/go.mod b/vendor/github.com/docker/go-metrics/go.mod deleted file mode 100644 index 7e328f0cff..0000000000 --- a/vendor/github.com/docker/go-metrics/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/docker/go-metrics - -go 1.11 - -require github.com/prometheus/client_golang v1.1.0 diff --git a/vendor/github.com/docker/go-units/CONTRIBUTING.md b/vendor/github.com/docker/go-units/CONTRIBUTING.md new file mode 100644 index 0000000000..9ea86d784e --- /dev/null +++ b/vendor/github.com/docker/go-units/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# Contributing to go-units + +Want to hack on go-units? Awesome! Here are instructions to get you started. + +go-units is a part of the [Docker](https://www.docker.com) project, and follows +the same rules and principles. If you're already familiar with the way +Docker does things, you'll feel right at home. + +Otherwise, go read Docker's +[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), +[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md), +[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and +[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md). + +### Sign your work + +The sign-off is a simple line at the end of the explanation for the patch. Your +signature certifies that you wrote the patch or otherwise have the right to pass +it on as an open-source patch. The rules are pretty simple: if you can certify +the below (from [developercertificate.org](http://developercertificate.org/)): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +Then you just add a line to every git commit message: + + Signed-off-by: Joe Smith + +Use your real name (sorry, no pseudonyms or anonymous contributions.) + +If you set your `user.name` and `user.email` git configs, you can sign your +commit automatically with `git commit -s`. diff --git a/vendor/github.com/docker/go-units/MAINTAINERS b/vendor/github.com/docker/go-units/MAINTAINERS new file mode 100644 index 0000000000..4aac7c7411 --- /dev/null +++ b/vendor/github.com/docker/go-units/MAINTAINERS @@ -0,0 +1,46 @@ +# go-units maintainers file +# +# This file describes who runs the docker/go-units project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# +# This file is compiled into the MAINTAINERS file in docker/opensource. +# +[Org] + [Org."Core maintainers"] + people = [ + "akihirosuda", + "dnephin", + "thajeztah", + "vdemeester", + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.akihirosuda] + Name = "Akihiro Suda" + Email = "akihiro.suda.cz@hco.ntt.co.jp" + GitHub = "AkihiroSuda" + + [people.dnephin] + Name = "Daniel Nephin" + Email = "dnephin@gmail.com" + GitHub = "dnephin" + + [people.thajeztah] + Name = "Sebastiaan van Stijn" + Email = "github@gone.nl" + GitHub = "thaJeztah" + + [people.vdemeester] + Name = "Vincent Demeester" + Email = "vincent@sbr.pm" + GitHub = "vdemeester" \ No newline at end of file diff --git a/vendor/github.com/docker/go-units/circle.yml b/vendor/github.com/docker/go-units/circle.yml new file mode 100644 index 0000000000..af9d605529 --- /dev/null +++ b/vendor/github.com/docker/go-units/circle.yml @@ -0,0 +1,11 @@ +dependencies: + post: + # install golint + - go get golang.org/x/lint/golint + +test: + pre: + # run analysis before tests + - go vet ./... + - test -z "$(golint ./... | tee /dev/stderr)" + - test -z "$(gofmt -s -l . | tee /dev/stderr)" diff --git a/vendor/github.com/docker/libkv/.travis.yml b/vendor/github.com/docker/libkv/.travis.yml new file mode 100644 index 0000000000..0b50a02e55 --- /dev/null +++ b/vendor/github.com/docker/libkv/.travis.yml @@ -0,0 +1,31 @@ +language: go + +go: + - 1.8.7 + +# let us have speedy Docker-based Travis workers +sudo: false + +before_install: + # Symlink below is needed for Travis CI to work correctly on personal forks of libkv + - ln -s $HOME/gopath/src/github.com/${TRAVIS_REPO_SLUG///libkv/} $HOME/gopath/src/github.com/docker + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls + - go get github.com/golang/lint/golint + - go get github.com/GeertJohan/fgt + +before_script: + - script/travis_consul.sh 0.6.3 + - script/travis_etcd.sh 3.0.0 + - script/travis_zk.sh 3.5.4-beta + +script: + - ./consul agent -server -bootstrap -advertise=127.0.0.1 -data-dir /tmp/consul -config-file=./config.json 1>/dev/null & + - ./etcd/etcd --listen-client-urls 'http://0.0.0.0:4001' --advertise-client-urls 'http://127.0.0.1:4001' >/dev/null 2>&1 & + - ./zk/bin/zkServer.sh start ./zk/conf/zoo.cfg 1> /dev/null + - script/validate-gofmt + - go vet ./... + - fgt golint ./... + - go test -v -race ./... + - script/coverage + - goveralls -service=travis-ci -coverprofile=goverage.report diff --git a/vendor/github.com/docker/libkv/MAINTAINERS b/vendor/github.com/docker/libkv/MAINTAINERS new file mode 100644 index 0000000000..4a8bbc6135 --- /dev/null +++ b/vendor/github.com/docker/libkv/MAINTAINERS @@ -0,0 +1,40 @@ +# Libkv maintainers file +# +# This file describes who runs the docker/libkv project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# +# This file is compiled into the MAINTAINERS file in docker/opensource. +# +[Org] + [Org."Core maintainers"] + people = [ + "aluzzardi", + "sanimej", + "vieux", + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.aluzzardi] + Name = "Andrea Luzzardi" + Email = "al@docker.com" + GitHub = "aluzzardi" + + [people.sanimej] + Name = "Santhosh Manohar" + Email = "santhosh@docker.com" + GitHub = "sanimej" + + [people.vieux] + Name = "Victor Vieux" + Email = "vieux@docker.com" + GitHub = "vieux" diff --git a/vendor/github.com/docker/libtrust/CONTRIBUTING.md b/vendor/github.com/docker/libtrust/CONTRIBUTING.md new file mode 100644 index 0000000000..05be0f8ab3 --- /dev/null +++ b/vendor/github.com/docker/libtrust/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing to libtrust + +Want to hack on libtrust? Awesome! Here are instructions to get you +started. + +libtrust is a part of the [Docker](https://www.docker.com) project, and follows +the same rules and principles. If you're already familiar with the way +Docker does things, you'll feel right at home. + +Otherwise, go read +[Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md). + +Happy hacking! diff --git a/vendor/github.com/docker/libtrust/MAINTAINERS b/vendor/github.com/docker/libtrust/MAINTAINERS new file mode 100644 index 0000000000..9768175feb --- /dev/null +++ b/vendor/github.com/docker/libtrust/MAINTAINERS @@ -0,0 +1,3 @@ +Solomon Hykes +Josh Hawn (github: jlhawn) +Derek McGowan (github: dmcgowan) diff --git a/vendor/github.com/docker/swarmkit/README.md b/vendor/github.com/docker/swarmkit/README.md deleted file mode 100644 index ffc744c313..0000000000 --- a/vendor/github.com/docker/swarmkit/README.md +++ /dev/null @@ -1,334 +0,0 @@ -# [SwarmKit](https://github.com/docker/swarmkit) - -[![GoDoc](https://godoc.org/github.com/docker/swarmkit?status.svg)](https://godoc.org/github.com/docker/swarmkit) -[![Circle CI](https://circleci.com/gh/docker/swarmkit.svg?style=shield&circle-token=a7bf494e28963703a59de71cf19b73ad546058a7)](https://circleci.com/gh/docker/swarmkit) -[![codecov.io](https://codecov.io/github/docker/swarmkit/coverage.svg?branch=master&token=LqD1dzTjsN)](https://codecov.io/github/docker/swarmkit?branch=master) -[![Badge Badge](http://doyouevenbadge.com/github.com/docker/swarmkit)](http://doyouevenbadge.com/report/github.com/docker/swarmkit) - -*SwarmKit* is a toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more. - -Its main benefits are: - -- **Distributed**: *SwarmKit* uses the [Raft Consensus Algorithm](https://raft.github.io/) in order to coordinate and does not rely on a single point of failure to perform decisions. -- **Secure**: Node communication and membership within a *Swarm* are secure out of the box. *SwarmKit* uses mutual TLS for node *authentication*, *role authorization* and *transport encryption*, automating both certificate issuance and rotation. -- **Simple**: *SwarmKit* is operationally simple and minimizes infrastructure dependencies. It does not need an external database to operate. - -## Overview - -Machines running *SwarmKit* can be grouped together in order to form a *Swarm*, coordinating tasks with each other. -Once a machine joins, it becomes a *Swarm Node*. Nodes can either be *worker* nodes or *manager* nodes. - -- **Worker Nodes** are responsible for running Tasks using an *Executor*. *SwarmKit* comes with a default *Docker Container Executor* that can be easily swapped out. -- **Manager Nodes** on the other hand accept specifications from the user and are responsible for reconciling the desired state with the actual cluster state. - -An operator can dynamically update a Node's role by promoting a Worker to Manager or demoting a Manager to Worker. - -*Tasks* are organized in *Services*. A service is a higher level abstraction that allows the user to declare the desired state of a group of tasks. -Services define what type of task should be created as well as how to execute them (e.g. run this many replicas at all times) and how to update them (e.g. rolling updates). - -## Features - -Some of *SwarmKit*'s main features are: - -- **Orchestration** - - - **Desired State Reconciliation**: *SwarmKit* constantly compares the desired state against the current cluster state and reconciles the two if necessary. For instance, if a node fails, *SwarmKit* reschedules its tasks onto a different node. - - - **Service Types**: There are different types of services. The project currently ships with two of them out of the box - - - **Replicated Services** are scaled to the desired number of replicas. - - **Global Services** run one task on every available node in the cluster. - - - **Configurable Updates**: At any time, you can change the value of one or more fields for a service. After you make the update, *SwarmKit* reconciles the desired state by ensuring all tasks are using the desired settings. By default, it performs a lockstep update - that is, update all tasks at the same time. This can be configured through different knobs: - - - **Parallelism** defines how many updates can be performed at the same time. - - **Delay** sets the minimum delay between updates. *SwarmKit* will start by shutting down the previous task, bring up a new one, wait for it to transition to the *RUNNING* state *then* wait for the additional configured delay. Finally, it will move onto other tasks. - - - **Restart Policies**: The orchestration layer monitors tasks and reacts to failures based on the specified policy. The operator can define restart conditions, delays and limits (maximum number of attempts in a given time window). *SwarmKit* can decide to restart a task on a different machine. This means that faulty nodes will gradually be drained of their tasks. - -- **Scheduling** - - - **Resource Awareness**: *SwarmKit* is aware of resources available on nodes and will place tasks accordingly. - - **Constraints**: Operators can limit the set of nodes where a task can be scheduled by defining constraint expressions. Multiple constraints find nodes that satisfy every expression, i.e., an `AND` match. Constraints can match node attributes in the following table. Note that `engine.labels` are collected from Docker Engine with information like operating system, drivers, etc. `node.labels` are added by cluster administrators for operational purpose. For example, some nodes have security compliant labels to run tasks with compliant requirements. - - | node attribute | matches | example | - |:------------- |:-------------| :-------------| - | node.id | node's ID | `node.id == 2ivku8v2gvtg4`| - | node.hostname | node's hostname | `node.hostname != node-2`| - | node.ip | node's IP address | `node.ip != 172.19.17.0/24`| - | node.role | node's manager or worker role | `node.role == manager`| - | node.platform.os | node's operating system | `node.platform.os == linux`| - | node.platform.arch | node's architecture | `node.platform.arch == x86_64`| - | node.labels | node's labels added by cluster admins | `node.labels.security == high`| - | engine.labels | Docker Engine's labels | `engine.labels.operatingsystem == ubuntu 14.04`| - - - **Strategies**: The project currently ships with a *spread strategy* which will attempt to schedule tasks on the least loaded - nodes, provided they meet the constraints and resource requirements. - -- **Cluster Management** - - - **State Store**: Manager nodes maintain a strongly consistent, replicated (Raft based) and extremely fast (in-memory reads) view of the cluster which allows them to make quick scheduling decisions while tolerating failures. - - **Topology Management**: Node roles (*Worker* / *Manager*) can be dynamically changed through API/CLI calls. - - **Node Management**: An operator can alter the desired availability of a node: Setting it to *Paused* will prevent any further tasks from being scheduled to it while *Drained* will have the same effect while also re-scheduling its tasks somewhere else (mostly for maintenance scenarios). - -- **Security** - - - **Mutual TLS**: All nodes communicate with each other using mutual *TLS*. Swarm managers act as a *Root Certificate Authority*, issuing certificates to new nodes. - - **Token-based Join**: All nodes require a cryptographic token to join the swarm, which defines that node's role. Tokens can be rotated as often as desired without affecting already-joined nodes. - - **Certificate Rotation**: TLS Certificates are rotated and reloaded transparently on every node, allowing a user to set how frequently rotation should happen (the current default is 3 months, the minimum is 30 minutes). - -## Build - -Requirements: - -- Go 1.6 or higher -- A [working golang](https://golang.org/doc/code.html) environment -- [Protobuf 3.x or higher](https://developers.google.com/protocol-buffers/docs/downloads) to regenerate protocol buffer files (e.g. using `make generate`) - -*SwarmKit* is built in Go and leverages a standard project structure to work well with Go tooling. -If you are new to Go, please see [BUILDING.md](BUILDING.md) for a more detailed guide. - -Once you have *SwarmKit* checked out in your `$GOPATH`, the `Makefile` can be used for common tasks. - -From the project root directory, run the following to build `swarmd` and `swarmctl`: - -```sh -$ make binaries -``` - -## Test - -Before running tests for the first time, setup the tooling: - -```sh -$ make setup -``` - -Then run: - -```sh -$ make all -``` - -## Usage Examples - -### Setting up a Swarm - -These instructions assume that `swarmd` and `swarmctl` are in your PATH. - -(Before starting, make sure `/tmp/node-N` don't exist) - -Initialize the first node: - -```sh -$ swarmd -d /tmp/node-1 --listen-control-api /tmp/node-1/swarm.sock --hostname node-1 -``` - -Before joining cluster, the token should be fetched: - -``` -$ export SWARM_SOCKET=/tmp/node-1/swarm.sock -$ swarmctl cluster inspect default -ID : 87d2ecpg12dfonxp3g562fru1 -Name : default -Orchestration settings: - Task history entries: 5 -Dispatcher settings: - Dispatcher heartbeat period: 5s -Certificate Authority settings: - Certificate Validity Duration: 2160h0m0s - Join Tokens: - Worker: SWMTKN-1-3vi7ajem0jed8guusgvyl98nfg18ibg4pclify6wzac6ucrhg3-0117z3s2ytr6egmmnlr6gd37n - Manager: SWMTKN-1-3vi7ajem0jed8guusgvyl98nfg18ibg4pclify6wzac6ucrhg3-d1ohk84br3ph0njyexw0wdagx -``` - -In two additional terminals, join two nodes. From the example below, replace `127.0.0.1:4242` -with the address of the first node, and use the `` acquired above. -In this example, the `` is `SWMTKN-1-3vi7ajem0jed8guusgvyl98nfg18ibg4pclify6wzac6ucrhg3-0117z3s2ytr6egmmnlr6gd37n`. -If the joining nodes run on the same host as `node-1`, select a different remote -listening port, e.g., `--listen-remote-api 127.0.0.1:4343`. - -```sh -$ swarmd -d /tmp/node-2 --hostname node-2 --join-addr 127.0.0.1:4242 --join-token -$ swarmd -d /tmp/node-3 --hostname node-3 --join-addr 127.0.0.1:4242 --join-token -``` - -If joining as a manager, also specify the listen-control-api. - -```sh -$ swarmd -d /tmp/node-4 --hostname node-4 --join-addr 127.0.0.1:4242 --join-token --listen-control-api /tmp/node-4/swarm.sock --listen-remote-api 127.0.0.1:4245 -``` - -In a fourth terminal, use `swarmctl` to explore and control the cluster. Before -running `swarmctl`, set the `SWARM_SOCKET` environment variable to the path of the -manager socket that was specified in `--listen-control-api` when starting the -manager. - -To list nodes: - -``` -$ export SWARM_SOCKET=/tmp/node-1/swarm.sock -$ swarmctl node ls -ID Name Membership Status Availability Manager Status --- ---- ---------- ------ ------------ -------------- -3x12fpoi36eujbdkgdnbvbi6r node-2 ACCEPTED READY ACTIVE -4spl3tyipofoa2iwqgabsdcve node-1 ACCEPTED READY ACTIVE REACHABLE * -dknwk1uqxhnyyujq66ho0h54t node-3 ACCEPTED READY ACTIVE -zw3rwfawdasdewfq66ho34eaw node-4 ACCEPTED READY ACTIVE REACHABLE - - -``` - -### Creating Services - -Start a *redis* service: - -``` -$ swarmctl service create --name redis --image redis:3.0.5 -08ecg7vc7cbf9k57qs722n2le -``` - -List the running services: - -``` -$ swarmctl service ls -ID Name Image Replicas --- ---- ----- -------- -08ecg7vc7cbf9k57qs722n2le redis redis:3.0.5 1/1 -``` - -Inspect the service: - -``` -$ swarmctl service inspect redis -ID : 08ecg7vc7cbf9k57qs722n2le -Name : redis -Replicas : 1/1 -Template - Container - Image : redis:3.0.5 - -Task ID Service Slot Image Desired State Last State Node -------- ------- ---- ----- ------------- ---------- ---- -0xk1ir8wr85lbs8sqg0ug03vr redis 1 redis:3.0.5 RUNNING RUNNING 1 minutes ago node-1 -``` - -### Updating Services - -You can update any attribute of a service. - -For example, you can scale the service by changing the instance count: - -``` -$ swarmctl service update redis --replicas 6 -08ecg7vc7cbf9k57qs722n2le - -$ swarmctl service inspect redis -ID : 08ecg7vc7cbf9k57qs722n2le -Name : redis -Replicas : 6/6 -Template - Container - Image : redis:3.0.5 - -Task ID Service Slot Image Desired State Last State Node -------- ------- ---- ----- ------------- ---------- ---- -0xk1ir8wr85lbs8sqg0ug03vr redis 1 redis:3.0.5 RUNNING RUNNING 3 minutes ago node-1 -25m48y9fevrnh77til1d09vqq redis 2 redis:3.0.5 RUNNING RUNNING 28 seconds ago node-3 -42vwc8z93c884anjgpkiatnx6 redis 3 redis:3.0.5 RUNNING RUNNING 28 seconds ago node-2 -d41f3wnf9dex3mk6jfqp4tdjw redis 4 redis:3.0.5 RUNNING RUNNING 28 seconds ago node-2 -66lefnooz63met6yfrsk6myvg redis 5 redis:3.0.5 RUNNING RUNNING 28 seconds ago node-1 -3a2sawtoyk19wqhmtuiq7z9pt redis 6 redis:3.0.5 RUNNING RUNNING 28 seconds ago node-3 -``` - -Changing *replicas* from *1* to *6* forced *SwarmKit* to create *5* additional Tasks in order to -comply with the desired state. - -Every other field can be changed as well, such as image, args, env, ... - -Let's change the image from *redis:3.0.5* to *redis:3.0.6* (e.g. upgrade): - -``` -$ swarmctl service update redis --image redis:3.0.6 -08ecg7vc7cbf9k57qs722n2le - -$ swarmctl service inspect redis -ID : 08ecg7vc7cbf9k57qs722n2le -Name : redis -Replicas : 6/6 -Update Status - State : COMPLETED - Started : 3 minutes ago - Completed : 1 minute ago - Message : update completed -Template - Container - Image : redis:3.0.6 - -Task ID Service Slot Image Desired State Last State Node -------- ------- ---- ----- ------------- ---------- ---- -0udsjss61lmwz52pke5hd107g redis 1 redis:3.0.6 RUNNING RUNNING 1 minute ago node-3 -b8o394v840thk10tamfqlwztb redis 2 redis:3.0.6 RUNNING RUNNING 1 minute ago node-1 -efw7j66xqpoj3cn3zjkdrwff7 redis 3 redis:3.0.6 RUNNING RUNNING 1 minute ago node-3 -8ajeipzvxucs3776e4z8gemey redis 4 redis:3.0.6 RUNNING RUNNING 1 minute ago node-2 -f05f2lbqzk9fh4kstwpulygvu redis 5 redis:3.0.6 RUNNING RUNNING 1 minute ago node-2 -7sbpoy82deq7hu3q9cnucfin6 redis 6 redis:3.0.6 RUNNING RUNNING 1 minute ago node-1 -``` - -By default, all tasks are updated at the same time. - -This behavior can be changed by defining update options. - -For instance, in order to update tasks 2 at a time and wait at least 10 seconds between updates: - -``` -$ swarmctl service update redis --image redis:3.0.7 --update-parallelism 2 --update-delay 10s -$ watch -n1 "swarmctl service inspect redis" # watch the update -``` - -This will update 2 tasks, wait for them to become *RUNNING*, then wait an additional 10 seconds before moving to other tasks. - -Update options can be set at service creation and updated later on. If an update command doesn't specify update options, the last set of options will be used. - -### Node Management - -*SwarmKit* monitors node health. In the case of node failures, it re-schedules tasks to other nodes. - -An operator can manually define the *Availability* of a node and can *Pause* and *Drain* nodes. - -Let's put `node-1` into maintenance mode: - -``` -$ swarmctl node drain node-1 - -$ swarmctl node ls -ID Name Membership Status Availability Manager Status --- ---- ---------- ------ ------------ -------------- -3x12fpoi36eujbdkgdnbvbi6r node-2 ACCEPTED READY ACTIVE -4spl3tyipofoa2iwqgabsdcve node-1 ACCEPTED READY DRAIN REACHABLE * -dknwk1uqxhnyyujq66ho0h54t node-3 ACCEPTED READY ACTIVE - -$ swarmctl service inspect redis -ID : 08ecg7vc7cbf9k57qs722n2le -Name : redis -Replicas : 6/6 -Update Status - State : COMPLETED - Started : 2 minutes ago - Completed : 1 minute ago - Message : update completed -Template - Container - Image : redis:3.0.7 - -Task ID Service Slot Image Desired State Last State Node -------- ------- ---- ----- ------------- ---------- ---- -8uy2fy8dqbwmlvw5iya802tj0 redis 1 redis:3.0.7 RUNNING RUNNING 23 seconds ago node-2 -7h9lgvidypcr7q1k3lfgohb42 redis 2 redis:3.0.7 RUNNING RUNNING 2 minutes ago node-3 -ae4dl0chk3gtwm1100t5yeged redis 3 redis:3.0.7 RUNNING RUNNING 23 seconds ago node-3 -9fz7fxbg0igypstwliyameobs redis 4 redis:3.0.7 RUNNING RUNNING 2 minutes ago node-3 -drzndxnjz3c8iujdewzaplgr6 redis 5 redis:3.0.7 RUNNING RUNNING 23 seconds ago node-2 -7rcgciqhs4239quraw7evttyf redis 6 redis:3.0.7 RUNNING RUNNING 2 minutes ago node-2 -``` - -As you can see, every Task running on `node-1` was rebalanced to either `node-2` or `node-3` by the reconciliation loop. diff --git a/vendor/github.com/docker/swarmkit/api/api.pb.txt b/vendor/github.com/docker/swarmkit/api/api.pb.txt new file mode 100644 index 0000000000..0c841c3237 --- /dev/null +++ b/vendor/github.com/docker/swarmkit/api/api.pb.txt @@ -0,0 +1,10839 @@ +file { + name: "google/protobuf/timestamp.proto" + package: "google.protobuf" + message_type { + name: "Timestamp" + field { + name: "seconds" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "seconds" + } + field { + name: "nanos" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "nanos" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "TimestampProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/timestamp" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "google/protobuf/duration.proto" + package: "google.protobuf" + message_type { + name: "Duration" + field { + name: "seconds" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "seconds" + } + field { + name: "nanos" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "nanos" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "DurationProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/duration" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "google/protobuf/wrappers.proto" + package: "google.protobuf" + message_type { + name: "DoubleValue" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "value" + } + } + message_type { + name: "FloatValue" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_FLOAT + json_name: "value" + } + } + message_type { + name: "Int64Value" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "value" + } + } + message_type { + name: "UInt64Value" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "value" + } + } + message_type { + name: "Int32Value" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "value" + } + } + message_type { + name: "UInt32Value" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "value" + } + } + message_type { + name: "BoolValue" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "value" + } + } + message_type { + name: "StringValue" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + } + message_type { + name: "BytesValue" + field { + name: "value" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "value" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "WrappersProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/wrappers" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "google/protobuf/descriptor.proto" + package: "google.protobuf" + message_type { + name: "FileDescriptorSet" + field { + name: "file" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FileDescriptorProto" + json_name: "file" + } + } + message_type { + name: "FileDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "package" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "package" + } + field { + name: "dependency" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "dependency" + } + field { + name: "public_dependency" + number: 10 + label: LABEL_REPEATED + type: TYPE_INT32 + json_name: "publicDependency" + } + field { + name: "weak_dependency" + number: 11 + label: LABEL_REPEATED + type: TYPE_INT32 + json_name: "weakDependency" + } + field { + name: "message_type" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto" + json_name: "messageType" + } + field { + name: "enum_type" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumDescriptorProto" + json_name: "enumType" + } + field { + name: "service" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.ServiceDescriptorProto" + json_name: "service" + } + field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldDescriptorProto" + json_name: "extension" + } + field { + name: "options" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.FileOptions" + json_name: "options" + } + field { + name: "source_code_info" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.SourceCodeInfo" + json_name: "sourceCodeInfo" + } + field { + name: "syntax" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "syntax" + } + } + message_type { + name: "DescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "field" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldDescriptorProto" + json_name: "field" + } + field { + name: "extension" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldDescriptorProto" + json_name: "extension" + } + field { + name: "nested_type" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto" + json_name: "nestedType" + } + field { + name: "enum_type" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumDescriptorProto" + json_name: "enumType" + } + field { + name: "extension_range" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto.ExtensionRange" + json_name: "extensionRange" + } + field { + name: "oneof_decl" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.OneofDescriptorProto" + json_name: "oneofDecl" + } + field { + name: "options" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.MessageOptions" + json_name: "options" + } + field { + name: "reserved_range" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.DescriptorProto.ReservedRange" + json_name: "reservedRange" + } + field { + name: "reserved_name" + number: 10 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "reservedName" + } + nested_type { + name: "ExtensionRange" + field { + name: "start" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "start" + } + field { + name: "end" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.ExtensionRangeOptions" + json_name: "options" + } + } + nested_type { + name: "ReservedRange" + field { + name: "start" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "start" + } + field { + name: "end" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + } + } + message_type { + name: "ExtensionRangeOptions" + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "FieldDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "number" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "number" + } + field { + name: "label" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldDescriptorProto.Label" + json_name: "label" + } + field { + name: "type" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldDescriptorProto.Type" + json_name: "type" + } + field { + name: "type_name" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "typeName" + } + field { + name: "extendee" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "extendee" + } + field { + name: "default_value" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "defaultValue" + } + field { + name: "oneof_index" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "oneofIndex" + } + field { + name: "json_name" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "jsonName" + } + field { + name: "options" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.FieldOptions" + json_name: "options" + } + enum_type { + name: "Type" + value { + name: "TYPE_DOUBLE" + number: 1 + } + value { + name: "TYPE_FLOAT" + number: 2 + } + value { + name: "TYPE_INT64" + number: 3 + } + value { + name: "TYPE_UINT64" + number: 4 + } + value { + name: "TYPE_INT32" + number: 5 + } + value { + name: "TYPE_FIXED64" + number: 6 + } + value { + name: "TYPE_FIXED32" + number: 7 + } + value { + name: "TYPE_BOOL" + number: 8 + } + value { + name: "TYPE_STRING" + number: 9 + } + value { + name: "TYPE_GROUP" + number: 10 + } + value { + name: "TYPE_MESSAGE" + number: 11 + } + value { + name: "TYPE_BYTES" + number: 12 + } + value { + name: "TYPE_UINT32" + number: 13 + } + value { + name: "TYPE_ENUM" + number: 14 + } + value { + name: "TYPE_SFIXED32" + number: 15 + } + value { + name: "TYPE_SFIXED64" + number: 16 + } + value { + name: "TYPE_SINT32" + number: 17 + } + value { + name: "TYPE_SINT64" + number: 18 + } + } + enum_type { + name: "Label" + value { + name: "LABEL_OPTIONAL" + number: 1 + } + value { + name: "LABEL_REQUIRED" + number: 2 + } + value { + name: "LABEL_REPEATED" + number: 3 + } + } + } + message_type { + name: "OneofDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "options" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.OneofOptions" + json_name: "options" + } + } + message_type { + name: "EnumDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "value" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumValueDescriptorProto" + json_name: "value" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumOptions" + json_name: "options" + } + field { + name: "reserved_range" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" + json_name: "reservedRange" + } + field { + name: "reserved_name" + number: 5 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "reservedName" + } + nested_type { + name: "EnumReservedRange" + field { + name: "start" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "start" + } + field { + name: "end" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + } + } + message_type { + name: "EnumValueDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "number" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "number" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.EnumValueOptions" + json_name: "options" + } + } + message_type { + name: "ServiceDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "method" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.MethodDescriptorProto" + json_name: "method" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.ServiceOptions" + json_name: "options" + } + } + message_type { + name: "MethodDescriptorProto" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "input_type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "inputType" + } + field { + name: "output_type" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "outputType" + } + field { + name: "options" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.MethodOptions" + json_name: "options" + } + field { + name: "client_streaming" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "clientStreaming" + } + field { + name: "server_streaming" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "serverStreaming" + } + } + message_type { + name: "FileOptions" + field { + name: "java_package" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "javaPackage" + } + field { + name: "java_outer_classname" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "javaOuterClassname" + } + field { + name: "java_multiple_files" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "javaMultipleFiles" + } + field { + name: "java_generate_equals_and_hash" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + deprecated: true + } + json_name: "javaGenerateEqualsAndHash" + } + field { + name: "java_string_check_utf8" + number: 27 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "javaStringCheckUtf8" + } + field { + name: "optimize_for" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FileOptions.OptimizeMode" + default_value: "SPEED" + json_name: "optimizeFor" + } + field { + name: "go_package" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "goPackage" + } + field { + name: "cc_generic_services" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "ccGenericServices" + } + field { + name: "java_generic_services" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "javaGenericServices" + } + field { + name: "py_generic_services" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "pyGenericServices" + } + field { + name: "php_generic_services" + number: 42 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "phpGenericServices" + } + field { + name: "deprecated" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "cc_enable_arenas" + number: 31 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "ccEnableArenas" + } + field { + name: "objc_class_prefix" + number: 36 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "objcClassPrefix" + } + field { + name: "csharp_namespace" + number: 37 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "csharpNamespace" + } + field { + name: "swift_prefix" + number: 39 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "swiftPrefix" + } + field { + name: "php_class_prefix" + number: 40 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "phpClassPrefix" + } + field { + name: "php_namespace" + number: 41 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "phpNamespace" + } + field { + name: "php_metadata_namespace" + number: 44 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "phpMetadataNamespace" + } + field { + name: "ruby_package" + number: 45 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "rubyPackage" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + enum_type { + name: "OptimizeMode" + value { + name: "SPEED" + number: 1 + } + value { + name: "CODE_SIZE" + number: 2 + } + value { + name: "LITE_RUNTIME" + number: 3 + } + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 38 + end: 39 + } + } + message_type { + name: "MessageOptions" + field { + name: "message_set_wire_format" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "messageSetWireFormat" + } + field { + name: "no_standard_descriptor_accessor" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "noStandardDescriptorAccessor" + } + field { + name: "deprecated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "map_entry" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "mapEntry" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 8 + end: 9 + } + reserved_range { + start: 9 + end: 10 + } + } + message_type { + name: "FieldOptions" + field { + name: "ctype" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldOptions.CType" + default_value: "STRING" + json_name: "ctype" + } + field { + name: "packed" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "packed" + } + field { + name: "jstype" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.FieldOptions.JSType" + default_value: "JS_NORMAL" + json_name: "jstype" + } + field { + name: "lazy" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "lazy" + } + field { + name: "deprecated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "weak" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "weak" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + enum_type { + name: "CType" + value { + name: "STRING" + number: 0 + } + value { + name: "CORD" + number: 1 + } + value { + name: "STRING_PIECE" + number: 2 + } + } + enum_type { + name: "JSType" + value { + name: "JS_NORMAL" + number: 0 + } + value { + name: "JS_STRING" + number: 1 + } + value { + name: "JS_NUMBER" + number: 2 + } + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 4 + end: 5 + } + } + message_type { + name: "OneofOptions" + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "EnumOptions" + field { + name: "allow_alias" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "allowAlias" + } + field { + name: "deprecated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + reserved_range { + start: 5 + end: 6 + } + } + message_type { + name: "EnumValueOptions" + field { + name: "deprecated" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "ServiceOptions" + field { + name: "deprecated" + number: 33 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "MethodOptions" + field { + name: "deprecated" + number: 33 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "false" + json_name: "deprecated" + } + field { + name: "idempotency_level" + number: 34 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".google.protobuf.MethodOptions.IdempotencyLevel" + default_value: "IDEMPOTENCY_UNKNOWN" + json_name: "idempotencyLevel" + } + field { + name: "uninterpreted_option" + number: 999 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption" + json_name: "uninterpretedOption" + } + enum_type { + name: "IdempotencyLevel" + value { + name: "IDEMPOTENCY_UNKNOWN" + number: 0 + } + value { + name: "NO_SIDE_EFFECTS" + number: 1 + } + value { + name: "IDEMPOTENT" + number: 2 + } + } + extension_range { + start: 1000 + end: 536870912 + } + } + message_type { + name: "UninterpretedOption" + field { + name: "name" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.UninterpretedOption.NamePart" + json_name: "name" + } + field { + name: "identifier_value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "identifierValue" + } + field { + name: "positive_int_value" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "positiveIntValue" + } + field { + name: "negative_int_value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "negativeIntValue" + } + field { + name: "double_value" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_DOUBLE + json_name: "doubleValue" + } + field { + name: "string_value" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "stringValue" + } + field { + name: "aggregate_value" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "aggregateValue" + } + nested_type { + name: "NamePart" + field { + name: "name_part" + number: 1 + label: LABEL_REQUIRED + type: TYPE_STRING + json_name: "namePart" + } + field { + name: "is_extension" + number: 2 + label: LABEL_REQUIRED + type: TYPE_BOOL + json_name: "isExtension" + } + } + } + message_type { + name: "SourceCodeInfo" + field { + name: "location" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.SourceCodeInfo.Location" + json_name: "location" + } + nested_type { + name: "Location" + field { + name: "path" + number: 1 + label: LABEL_REPEATED + type: TYPE_INT32 + options { + packed: true + } + json_name: "path" + } + field { + name: "span" + number: 2 + label: LABEL_REPEATED + type: TYPE_INT32 + options { + packed: true + } + json_name: "span" + } + field { + name: "leading_comments" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "leadingComments" + } + field { + name: "trailing_comments" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "trailingComments" + } + field { + name: "leading_detached_comments" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "leadingDetachedComments" + } + } + } + message_type { + name: "GeneratedCodeInfo" + field { + name: "annotation" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.protobuf.GeneratedCodeInfo.Annotation" + json_name: "annotation" + } + nested_type { + name: "Annotation" + field { + name: "path" + number: 1 + label: LABEL_REPEATED + type: TYPE_INT32 + options { + packed: true + } + json_name: "path" + } + field { + name: "source_file" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sourceFile" + } + field { + name: "begin" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "begin" + } + field { + name: "end" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "end" + } + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "DescriptorProtos" + optimize_for: SPEED + go_package: "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.Reflection" + } +} +file { + name: "gogoproto/gogo.proto" + package: "gogoproto" + dependency: "google/protobuf/descriptor.proto" + extension { + name: "goproto_enum_prefix" + extendee: ".google.protobuf.EnumOptions" + number: 62001 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoEnumPrefix" + } + extension { + name: "goproto_enum_stringer" + extendee: ".google.protobuf.EnumOptions" + number: 62021 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoEnumStringer" + } + extension { + name: "enum_stringer" + extendee: ".google.protobuf.EnumOptions" + number: 62022 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "enumStringer" + } + extension { + name: "enum_customname" + extendee: ".google.protobuf.EnumOptions" + number: 62023 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "enumCustomname" + } + extension { + name: "enumdecl" + extendee: ".google.protobuf.EnumOptions" + number: 62024 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "enumdecl" + } + extension { + name: "enumvalue_customname" + extendee: ".google.protobuf.EnumValueOptions" + number: 66001 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "enumvalueCustomname" + } + extension { + name: "goproto_getters_all" + extendee: ".google.protobuf.FileOptions" + number: 63001 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoGettersAll" + } + extension { + name: "goproto_enum_prefix_all" + extendee: ".google.protobuf.FileOptions" + number: 63002 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoEnumPrefixAll" + } + extension { + name: "goproto_stringer_all" + extendee: ".google.protobuf.FileOptions" + number: 63003 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoStringerAll" + } + extension { + name: "verbose_equal_all" + extendee: ".google.protobuf.FileOptions" + number: 63004 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "verboseEqualAll" + } + extension { + name: "face_all" + extendee: ".google.protobuf.FileOptions" + number: 63005 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "faceAll" + } + extension { + name: "gostring_all" + extendee: ".google.protobuf.FileOptions" + number: 63006 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "gostringAll" + } + extension { + name: "populate_all" + extendee: ".google.protobuf.FileOptions" + number: 63007 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "populateAll" + } + extension { + name: "stringer_all" + extendee: ".google.protobuf.FileOptions" + number: 63008 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "stringerAll" + } + extension { + name: "onlyone_all" + extendee: ".google.protobuf.FileOptions" + number: 63009 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "onlyoneAll" + } + extension { + name: "equal_all" + extendee: ".google.protobuf.FileOptions" + number: 63013 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "equalAll" + } + extension { + name: "description_all" + extendee: ".google.protobuf.FileOptions" + number: 63014 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "descriptionAll" + } + extension { + name: "testgen_all" + extendee: ".google.protobuf.FileOptions" + number: 63015 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "testgenAll" + } + extension { + name: "benchgen_all" + extendee: ".google.protobuf.FileOptions" + number: 63016 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "benchgenAll" + } + extension { + name: "marshaler_all" + extendee: ".google.protobuf.FileOptions" + number: 63017 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "marshalerAll" + } + extension { + name: "unmarshaler_all" + extendee: ".google.protobuf.FileOptions" + number: 63018 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "unmarshalerAll" + } + extension { + name: "stable_marshaler_all" + extendee: ".google.protobuf.FileOptions" + number: 63019 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "stableMarshalerAll" + } + extension { + name: "sizer_all" + extendee: ".google.protobuf.FileOptions" + number: 63020 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "sizerAll" + } + extension { + name: "goproto_enum_stringer_all" + extendee: ".google.protobuf.FileOptions" + number: 63021 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoEnumStringerAll" + } + extension { + name: "enum_stringer_all" + extendee: ".google.protobuf.FileOptions" + number: 63022 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "enumStringerAll" + } + extension { + name: "unsafe_marshaler_all" + extendee: ".google.protobuf.FileOptions" + number: 63023 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "unsafeMarshalerAll" + } + extension { + name: "unsafe_unmarshaler_all" + extendee: ".google.protobuf.FileOptions" + number: 63024 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "unsafeUnmarshalerAll" + } + extension { + name: "goproto_extensions_map_all" + extendee: ".google.protobuf.FileOptions" + number: 63025 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoExtensionsMapAll" + } + extension { + name: "goproto_unrecognized_all" + extendee: ".google.protobuf.FileOptions" + number: 63026 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoUnrecognizedAll" + } + extension { + name: "gogoproto_import" + extendee: ".google.protobuf.FileOptions" + number: 63027 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "gogoprotoImport" + } + extension { + name: "protosizer_all" + extendee: ".google.protobuf.FileOptions" + number: 63028 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "protosizerAll" + } + extension { + name: "compare_all" + extendee: ".google.protobuf.FileOptions" + number: 63029 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "compareAll" + } + extension { + name: "typedecl_all" + extendee: ".google.protobuf.FileOptions" + number: 63030 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "typedeclAll" + } + extension { + name: "enumdecl_all" + extendee: ".google.protobuf.FileOptions" + number: 63031 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "enumdeclAll" + } + extension { + name: "goproto_registration" + extendee: ".google.protobuf.FileOptions" + number: 63032 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoRegistration" + } + extension { + name: "messagename_all" + extendee: ".google.protobuf.FileOptions" + number: 63033 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "messagenameAll" + } + extension { + name: "goproto_sizecache_all" + extendee: ".google.protobuf.FileOptions" + number: 63034 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoSizecacheAll" + } + extension { + name: "goproto_unkeyed_all" + extendee: ".google.protobuf.FileOptions" + number: 63035 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoUnkeyedAll" + } + extension { + name: "goproto_getters" + extendee: ".google.protobuf.MessageOptions" + number: 64001 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoGetters" + } + extension { + name: "goproto_stringer" + extendee: ".google.protobuf.MessageOptions" + number: 64003 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoStringer" + } + extension { + name: "verbose_equal" + extendee: ".google.protobuf.MessageOptions" + number: 64004 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "verboseEqual" + } + extension { + name: "face" + extendee: ".google.protobuf.MessageOptions" + number: 64005 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "face" + } + extension { + name: "gostring" + extendee: ".google.protobuf.MessageOptions" + number: 64006 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "gostring" + } + extension { + name: "populate" + extendee: ".google.protobuf.MessageOptions" + number: 64007 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "populate" + } + extension { + name: "stringer" + extendee: ".google.protobuf.MessageOptions" + number: 67008 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "stringer" + } + extension { + name: "onlyone" + extendee: ".google.protobuf.MessageOptions" + number: 64009 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "onlyone" + } + extension { + name: "equal" + extendee: ".google.protobuf.MessageOptions" + number: 64013 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "equal" + } + extension { + name: "description" + extendee: ".google.protobuf.MessageOptions" + number: 64014 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "description" + } + extension { + name: "testgen" + extendee: ".google.protobuf.MessageOptions" + number: 64015 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "testgen" + } + extension { + name: "benchgen" + extendee: ".google.protobuf.MessageOptions" + number: 64016 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "benchgen" + } + extension { + name: "marshaler" + extendee: ".google.protobuf.MessageOptions" + number: 64017 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "marshaler" + } + extension { + name: "unmarshaler" + extendee: ".google.protobuf.MessageOptions" + number: 64018 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "unmarshaler" + } + extension { + name: "stable_marshaler" + extendee: ".google.protobuf.MessageOptions" + number: 64019 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "stableMarshaler" + } + extension { + name: "sizer" + extendee: ".google.protobuf.MessageOptions" + number: 64020 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "sizer" + } + extension { + name: "unsafe_marshaler" + extendee: ".google.protobuf.MessageOptions" + number: 64023 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "unsafeMarshaler" + } + extension { + name: "unsafe_unmarshaler" + extendee: ".google.protobuf.MessageOptions" + number: 64024 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "unsafeUnmarshaler" + } + extension { + name: "goproto_extensions_map" + extendee: ".google.protobuf.MessageOptions" + number: 64025 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoExtensionsMap" + } + extension { + name: "goproto_unrecognized" + extendee: ".google.protobuf.MessageOptions" + number: 64026 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoUnrecognized" + } + extension { + name: "protosizer" + extendee: ".google.protobuf.MessageOptions" + number: 64028 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "protosizer" + } + extension { + name: "compare" + extendee: ".google.protobuf.MessageOptions" + number: 64029 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "compare" + } + extension { + name: "typedecl" + extendee: ".google.protobuf.MessageOptions" + number: 64030 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "typedecl" + } + extension { + name: "messagename" + extendee: ".google.protobuf.MessageOptions" + number: 64033 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "messagename" + } + extension { + name: "goproto_sizecache" + extendee: ".google.protobuf.MessageOptions" + number: 64034 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoSizecache" + } + extension { + name: "goproto_unkeyed" + extendee: ".google.protobuf.MessageOptions" + number: 64035 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "goprotoUnkeyed" + } + extension { + name: "nullable" + extendee: ".google.protobuf.FieldOptions" + number: 65001 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "nullable" + } + extension { + name: "embed" + extendee: ".google.protobuf.FieldOptions" + number: 65002 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "embed" + } + extension { + name: "customtype" + extendee: ".google.protobuf.FieldOptions" + number: 65003 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "customtype" + } + extension { + name: "customname" + extendee: ".google.protobuf.FieldOptions" + number: 65004 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "customname" + } + extension { + name: "jsontag" + extendee: ".google.protobuf.FieldOptions" + number: 65005 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "jsontag" + } + extension { + name: "moretags" + extendee: ".google.protobuf.FieldOptions" + number: 65006 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "moretags" + } + extension { + name: "casttype" + extendee: ".google.protobuf.FieldOptions" + number: 65007 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "casttype" + } + extension { + name: "castkey" + extendee: ".google.protobuf.FieldOptions" + number: 65008 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "castkey" + } + extension { + name: "castvalue" + extendee: ".google.protobuf.FieldOptions" + number: 65009 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "castvalue" + } + extension { + name: "stdtime" + extendee: ".google.protobuf.FieldOptions" + number: 65010 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "stdtime" + } + extension { + name: "stdduration" + extendee: ".google.protobuf.FieldOptions" + number: 65011 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "stdduration" + } + extension { + name: "wktpointer" + extendee: ".google.protobuf.FieldOptions" + number: 65012 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "wktpointer" + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "GoGoProtos" + go_package: "github.com/gogo/protobuf/gogoproto" + } +} +file { + name: "github.com/docker/swarmkit/api/types.proto" + package: "docker.swarmkit.v1" + dependency: "google/protobuf/timestamp.proto" + dependency: "google/protobuf/duration.proto" + dependency: "google/protobuf/wrappers.proto" + dependency: "gogoproto/gogo.proto" + message_type { + name: "Version" + field { + name: "index" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "index" + } + } + message_type { + name: "IndexEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "val" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "val" + } + } + message_type { + name: "Annotations" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "labels" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations.LabelsEntry" + json_name: "labels" + } + field { + name: "indices" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IndexEntry" + options { + 65001: 0 + } + json_name: "indices" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "NamedGenericResource" + field { + name: "kind" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + } + message_type { + name: "DiscreteGenericResource" + field { + name: "kind" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "value" + } + } + message_type { + name: "GenericResource" + field { + name: "named_resource_spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NamedGenericResource" + oneof_index: 0 + json_name: "namedResourceSpec" + } + field { + name: "discrete_resource_spec" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.DiscreteGenericResource" + oneof_index: 0 + json_name: "discreteResourceSpec" + } + oneof_decl { + name: "resource" + } + } + message_type { + name: "Resources" + field { + name: "nano_cpus" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + options { + 65004: "NanoCPUs" + } + json_name: "nanoCpus" + } + field { + name: "memory_bytes" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "memoryBytes" + } + field { + name: "generic" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.GenericResource" + json_name: "generic" + } + } + message_type { + name: "ResourceRequirements" + field { + name: "limits" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resources" + json_name: "limits" + } + field { + name: "reservations" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resources" + json_name: "reservations" + } + field { + name: "swap_bytes" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Int64Value" + json_name: "swapBytes" + } + field { + name: "memory_swappiness" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Int64Value" + json_name: "memorySwappiness" + } + } + message_type { + name: "Platform" + field { + name: "architecture" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "architecture" + } + field { + name: "os" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "OS" + } + json_name: "os" + } + } + message_type { + name: "PluginDescription" + field { + name: "type" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "type" + } + field { + name: "name" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + } + message_type { + name: "EngineDescription" + field { + name: "engine_version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "engineVersion" + } + field { + name: "labels" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EngineDescription.LabelsEntry" + json_name: "labels" + } + field { + name: "plugins" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.PluginDescription" + options { + 65001: 0 + } + json_name: "plugins" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "NodeDescription" + field { + name: "hostname" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "hostname" + } + field { + name: "platform" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Platform" + json_name: "platform" + } + field { + name: "resources" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resources" + json_name: "resources" + } + field { + name: "engine" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EngineDescription" + json_name: "engine" + } + field { + name: "tls_info" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NodeTLSInfo" + options { + 65004: "TLSInfo" + } + json_name: "tlsInfo" + } + field { + name: "fips" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65004: "FIPS" + } + json_name: "fips" + } + } + message_type { + name: "NodeTLSInfo" + field { + name: "trust_root" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "trustRoot" + } + field { + name: "cert_issuer_subject" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "certIssuerSubject" + } + field { + name: "cert_issuer_public_key" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "certIssuerPublicKey" + } + } + message_type { + name: "RaftMemberStatus" + field { + name: "leader" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "leader" + } + field { + name: "reachability" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.RaftMemberStatus.Reachability" + json_name: "reachability" + } + field { + name: "message" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "message" + } + enum_type { + name: "Reachability" + value { + name: "UNKNOWN" + number: 0 + } + value { + name: "UNREACHABLE" + number: 1 + } + value { + name: "REACHABLE" + number: 2 + } + } + } + message_type { + name: "NodeStatus" + field { + name: "state" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeStatus.State" + json_name: "state" + } + field { + name: "message" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "message" + } + field { + name: "addr" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + enum_type { + name: "State" + value { + name: "UNKNOWN" + number: 0 + } + value { + name: "DOWN" + number: 1 + } + value { + name: "READY" + number: 2 + } + value { + name: "DISCONNECTED" + number: 3 + } + } + } + message_type { + name: "Image" + field { + name: "reference" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "reference" + } + } + message_type { + name: "Mount" + field { + name: "type" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.Mount.Type" + json_name: "type" + } + field { + name: "source" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "source" + } + field { + name: "target" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "target" + } + field { + name: "readonly" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65004: "ReadOnly" + } + json_name: "readonly" + } + field { + name: "consistency" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.Mount.Consistency" + json_name: "consistency" + } + field { + name: "bind_options" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Mount.BindOptions" + json_name: "bindOptions" + } + field { + name: "volume_options" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Mount.VolumeOptions" + json_name: "volumeOptions" + } + field { + name: "tmpfs_options" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Mount.TmpfsOptions" + json_name: "tmpfsOptions" + } + nested_type { + name: "BindOptions" + field { + name: "propagation" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.Mount.BindOptions.Propagation" + json_name: "propagation" + } + field { + name: "nonrecursive" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65004: "NonRecursive" + } + json_name: "nonrecursive" + } + enum_type { + name: "Propagation" + value { + name: "RPRIVATE" + number: 0 + options { + 66001: "MountPropagationRPrivate" + } + } + value { + name: "PRIVATE" + number: 1 + options { + 66001: "MountPropagationPrivate" + } + } + value { + name: "RSHARED" + number: 2 + options { + 66001: "MountPropagationRShared" + } + } + value { + name: "SHARED" + number: 3 + options { + 66001: "MountPropagationShared" + } + } + value { + name: "RSLAVE" + number: 4 + options { + 66001: "MountPropagationRSlave" + } + } + value { + name: "SLAVE" + number: 5 + options { + 66001: "MountPropagationSlave" + } + } + options { + 62001: 0 + 62023: "MountPropagation" + } + } + } + nested_type { + name: "VolumeOptions" + field { + name: "nocopy" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65004: "NoCopy" + } + json_name: "nocopy" + } + field { + name: "labels" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Mount.VolumeOptions.LabelsEntry" + json_name: "labels" + } + field { + name: "driver_config" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "driverConfig" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + nested_type { + name: "TmpfsOptions" + field { + name: "size_bytes" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "sizeBytes" + } + field { + name: "mode" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + options { + 65001: 0 + 65003: "os.FileMode" + } + json_name: "mode" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "options" + } + } + enum_type { + name: "Type" + value { + name: "BIND" + number: 0 + options { + 66001: "MountTypeBind" + } + } + value { + name: "VOLUME" + number: 1 + options { + 66001: "MountTypeVolume" + } + } + value { + name: "TMPFS" + number: 2 + options { + 66001: "MountTypeTmpfs" + } + } + value { + name: "NPIPE" + number: 3 + options { + 66001: "MountTypeNamedPipe" + } + } + options { + 62001: 0 + 62023: "MountType" + } + } + enum_type { + name: "Consistency" + value { + name: "DEFAULT" + number: 0 + options { + 66001: "MountConsistencyDefault" + } + } + value { + name: "CONSISTENT" + number: 1 + options { + 66001: "MountConsistencyFull" + } + } + value { + name: "CACHED" + number: 2 + options { + 66001: "MountConsistencyCached" + } + } + value { + name: "DELEGATED" + number: 3 + options { + 66001: "MountConsistencyDelegated" + } + } + options { + 62001: 0 + 62023: "MountConsistency" + } + } + } + message_type { + name: "RestartPolicy" + field { + name: "condition" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.RestartPolicy.RestartCondition" + json_name: "condition" + } + field { + name: "delay" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "delay" + } + field { + name: "max_attempts" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "maxAttempts" + } + field { + name: "window" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "window" + } + enum_type { + name: "RestartCondition" + value { + name: "NONE" + number: 0 + options { + 66001: "RestartOnNone" + } + } + value { + name: "ON_FAILURE" + number: 1 + options { + 66001: "RestartOnFailure" + } + } + value { + name: "ANY" + number: 2 + options { + 66001: "RestartOnAny" + } + } + options { + 62001: 0 + 62023: "RestartCondition" + } + } + } + message_type { + name: "UpdateConfig" + field { + name: "parallelism" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "parallelism" + } + field { + name: "delay" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + options { + 65001: 0 + 65011: 1 + } + json_name: "delay" + } + field { + name: "failure_action" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.UpdateConfig.FailureAction" + json_name: "failureAction" + } + field { + name: "monitor" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "monitor" + } + field { + name: "max_failure_ratio" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_FLOAT + json_name: "maxFailureRatio" + } + field { + name: "order" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.UpdateConfig.UpdateOrder" + json_name: "order" + } + enum_type { + name: "FailureAction" + value { + name: "PAUSE" + number: 0 + } + value { + name: "CONTINUE" + number: 1 + } + value { + name: "ROLLBACK" + number: 2 + } + } + enum_type { + name: "UpdateOrder" + value { + name: "STOP_FIRST" + number: 0 + } + value { + name: "START_FIRST" + number: 1 + } + } + } + message_type { + name: "UpdateStatus" + field { + name: "state" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.UpdateStatus.UpdateState" + json_name: "state" + } + field { + name: "started_at" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "startedAt" + } + field { + name: "completed_at" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "completedAt" + } + field { + name: "message" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "message" + } + enum_type { + name: "UpdateState" + value { + name: "UNKNOWN" + number: 0 + } + value { + name: "UPDATING" + number: 1 + } + value { + name: "PAUSED" + number: 2 + } + value { + name: "COMPLETED" + number: 3 + } + value { + name: "ROLLBACK_STARTED" + number: 4 + } + value { + name: "ROLLBACK_PAUSED" + number: 5 + } + value { + name: "ROLLBACK_COMPLETED" + number: 6 + } + } + } + message_type { + name: "ContainerStatus" + field { + name: "container_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + field { + name: "pid" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + options { + 65004: "PID" + } + json_name: "pid" + } + field { + name: "exit_code" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "exitCode" + } + } + message_type { + name: "PortStatus" + field { + name: "ports" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.PortConfig" + json_name: "ports" + } + } + message_type { + name: "TaskStatus" + field { + name: "timestamp" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "timestamp" + } + field { + name: "state" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.TaskState" + json_name: "state" + } + field { + name: "message" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "message" + } + field { + name: "err" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "err" + } + field { + name: "container" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerStatus" + oneof_index: 0 + json_name: "container" + } + field { + name: "port_status" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.PortStatus" + json_name: "portStatus" + } + field { + name: "applied_by" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "appliedBy" + } + field { + name: "applied_at" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "appliedAt" + } + oneof_decl { + name: "runtime_status" + } + } + message_type { + name: "NetworkAttachmentConfig" + field { + name: "target" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "target" + } + field { + name: "aliases" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "aliases" + } + field { + name: "addresses" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "addresses" + } + field { + name: "driver_attachment_opts" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachmentConfig.DriverAttachmentOptsEntry" + json_name: "driverAttachmentOpts" + } + nested_type { + name: "DriverAttachmentOptsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "IPAMConfig" + field { + name: "family" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.IPAMConfig.AddressFamily" + json_name: "family" + } + field { + name: "subnet" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "subnet" + } + field { + name: "range" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "range" + } + field { + name: "gateway" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "gateway" + } + field { + name: "reserved" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IPAMConfig.ReservedEntry" + json_name: "reserved" + } + nested_type { + name: "ReservedEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + enum_type { + name: "AddressFamily" + value { + name: "UNKNOWN" + number: 0 + } + value { + name: "IPV4" + number: 4 + } + value { + name: "IPV6" + number: 6 + } + } + } + message_type { + name: "PortConfig" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "protocol" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.PortConfig.Protocol" + json_name: "protocol" + } + field { + name: "target_port" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "targetPort" + } + field { + name: "published_port" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "publishedPort" + } + field { + name: "publish_mode" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.PortConfig.PublishMode" + json_name: "publishMode" + } + enum_type { + name: "Protocol" + value { + name: "TCP" + number: 0 + options { + 66001: "ProtocolTCP" + } + } + value { + name: "UDP" + number: 1 + options { + 66001: "ProtocolUDP" + } + } + value { + name: "SCTP" + number: 2 + options { + 66001: "ProtocolSCTP" + } + } + options { + 62001: 0 + } + } + enum_type { + name: "PublishMode" + value { + name: "INGRESS" + number: 0 + options { + 66001: "PublishModeIngress" + } + } + value { + name: "HOST" + number: 1 + options { + 66001: "PublishModeHost" + } + } + options { + 62001: 0 + 62023: "PublishMode" + } + } + } + message_type { + name: "Driver" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "options" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver.OptionsEntry" + json_name: "options" + } + nested_type { + name: "OptionsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "IPAMOptions" + field { + name: "driver" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "driver" + } + field { + name: "configs" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IPAMConfig" + json_name: "configs" + } + } + message_type { + name: "Peer" + field { + name: "node_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "addr" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + } + message_type { + name: "WeightedPeer" + field { + name: "peer" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Peer" + json_name: "peer" + } + field { + name: "weight" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "weight" + } + } + message_type { + name: "IssuanceStatus" + field { + name: "state" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.IssuanceStatus.State" + json_name: "state" + } + field { + name: "err" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "err" + } + enum_type { + name: "State" + value { + name: "UNKNOWN" + number: 0 + options { + 66001: "IssuanceStateUnknown" + } + } + value { + name: "RENEW" + number: 1 + options { + 66001: "IssuanceStateRenew" + } + } + value { + name: "PENDING" + number: 2 + options { + 66001: "IssuanceStatePending" + } + } + value { + name: "ISSUED" + number: 3 + options { + 66001: "IssuanceStateIssued" + } + } + value { + name: "FAILED" + number: 4 + options { + 66001: "IssuanceStateFailed" + } + } + value { + name: "ROTATE" + number: 5 + options { + 66001: "IssuanceStateRotate" + } + } + options { + 62001: 0 + } + } + } + message_type { + name: "AcceptancePolicy" + field { + name: "policies" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.AcceptancePolicy.RoleAdmissionPolicy" + json_name: "policies" + } + nested_type { + name: "RoleAdmissionPolicy" + field { + name: "role" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + json_name: "role" + } + field { + name: "autoaccept" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "autoaccept" + } + field { + name: "secret" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.AcceptancePolicy.RoleAdmissionPolicy.Secret" + json_name: "secret" + } + nested_type { + name: "Secret" + field { + name: "data" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "data" + } + field { + name: "alg" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "alg" + } + } + } + } + message_type { + name: "ExternalCA" + field { + name: "protocol" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.ExternalCA.CAProtocol" + json_name: "protocol" + } + field { + name: "url" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "URL" + } + json_name: "url" + } + field { + name: "options" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ExternalCA.OptionsEntry" + json_name: "options" + } + field { + name: "ca_cert" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CACert" + } + json_name: "caCert" + } + nested_type { + name: "OptionsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + enum_type { + name: "CAProtocol" + value { + name: "CFSSL" + number: 0 + options { + 66001: "CAProtocolCFSSL" + } + } + } + } + message_type { + name: "CAConfig" + field { + name: "node_cert_expiry" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "nodeCertExpiry" + } + field { + name: "external_cas" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ExternalCA" + options { + 65004: "ExternalCAs" + } + json_name: "externalCas" + } + field { + name: "signing_ca_cert" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "SigningCACert" + } + json_name: "signingCaCert" + } + field { + name: "signing_ca_key" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "SigningCAKey" + } + json_name: "signingCaKey" + } + field { + name: "force_rotate" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "forceRotate" + } + } + message_type { + name: "OrchestrationConfig" + field { + name: "task_history_retention_limit" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "taskHistoryRetentionLimit" + } + } + message_type { + name: "TaskDefaults" + field { + name: "log_driver" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "logDriver" + } + } + message_type { + name: "DispatcherConfig" + field { + name: "heartbeat_period" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "heartbeatPeriod" + } + } + message_type { + name: "RaftConfig" + field { + name: "snapshot_interval" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "snapshotInterval" + } + field { + name: "keep_old_snapshots" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "keepOldSnapshots" + } + field { + name: "log_entries_for_slow_followers" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "logEntriesForSlowFollowers" + } + field { + name: "heartbeat_tick" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "heartbeatTick" + } + field { + name: "election_tick" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "electionTick" + } + } + message_type { + name: "EncryptionConfig" + field { + name: "auto_lock_managers" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "autoLockManagers" + } + } + message_type { + name: "SpreadOver" + field { + name: "spread_descriptor" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "spreadDescriptor" + } + } + message_type { + name: "PlacementPreference" + field { + name: "spread" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SpreadOver" + oneof_index: 0 + json_name: "spread" + } + oneof_decl { + name: "Preference" + } + } + message_type { + name: "Placement" + field { + name: "constraints" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "constraints" + } + field { + name: "preferences" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.PlacementPreference" + json_name: "preferences" + } + field { + name: "platforms" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Platform" + json_name: "platforms" + } + field { + name: "max_replicas" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "maxReplicas" + } + } + message_type { + name: "JoinTokens" + field { + name: "worker" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "worker" + } + field { + name: "manager" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "manager" + } + } + message_type { + name: "RootCA" + field { + name: "ca_key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CAKey" + } + json_name: "caKey" + } + field { + name: "ca_cert" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CACert" + } + json_name: "caCert" + } + field { + name: "ca_cert_hash" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "CACertHash" + } + json_name: "caCertHash" + } + field { + name: "join_tokens" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.JoinTokens" + options { + 65001: 0 + } + json_name: "joinTokens" + } + field { + name: "root_rotation" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RootRotation" + json_name: "rootRotation" + } + field { + name: "last_forced_rotation" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "lastForcedRotation" + } + } + message_type { + name: "Certificate" + field { + name: "role" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + json_name: "role" + } + field { + name: "csr" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CSR" + } + json_name: "csr" + } + field { + name: "status" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IssuanceStatus" + options { + 65001: 0 + } + json_name: "status" + } + field { + name: "certificate" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "certificate" + } + field { + name: "cn" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "CN" + } + json_name: "cn" + } + } + message_type { + name: "EncryptionKey" + field { + name: "subsystem" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "subsystem" + } + field { + name: "algorithm" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.EncryptionKey.Algorithm" + json_name: "algorithm" + } + field { + name: "key" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "key" + } + field { + name: "lamport_time" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "lamportTime" + } + enum_type { + name: "Algorithm" + value { + name: "AES_128_GCM" + number: 0 + } + options { + 62001: 0 + } + } + } + message_type { + name: "ManagerStatus" + field { + name: "raft_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "raftId" + } + field { + name: "addr" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + field { + name: "leader" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "leader" + } + field { + name: "reachability" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.RaftMemberStatus.Reachability" + json_name: "reachability" + } + } + message_type { + name: "FileTarget" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "uid" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "UID" + } + json_name: "uid" + } + field { + name: "gid" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "GID" + } + json_name: "gid" + } + field { + name: "mode" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + options { + 65001: 0 + 65003: "os.FileMode" + } + json_name: "mode" + } + } + message_type { + name: "RuntimeTarget" + } + message_type { + name: "SecretReference" + field { + name: "secret_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "secretId" + } + field { + name: "secret_name" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "secretName" + } + field { + name: "file" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.FileTarget" + oneof_index: 0 + json_name: "file" + } + oneof_decl { + name: "target" + } + } + message_type { + name: "ConfigReference" + field { + name: "config_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "configId" + } + field { + name: "config_name" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "configName" + } + field { + name: "file" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.FileTarget" + oneof_index: 0 + json_name: "file" + } + field { + name: "runtime" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RuntimeTarget" + oneof_index: 0 + json_name: "runtime" + } + oneof_decl { + name: "target" + } + } + message_type { + name: "BlacklistedCertificate" + field { + name: "expiry" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "expiry" + } + } + message_type { + name: "HealthConfig" + field { + name: "test" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "test" + } + field { + name: "interval" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "interval" + } + field { + name: "timeout" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "timeout" + } + field { + name: "retries" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "retries" + } + field { + name: "start_period" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "startPeriod" + } + } + message_type { + name: "MaybeEncryptedRecord" + field { + name: "algorithm" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.MaybeEncryptedRecord.Algorithm" + json_name: "algorithm" + } + field { + name: "data" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "data" + } + field { + name: "nonce" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "nonce" + } + enum_type { + name: "Algorithm" + value { + name: "NONE" + number: 0 + options { + 66001: "NotEncrypted" + } + } + value { + name: "SECRETBOX_SALSA20_POLY1305" + number: 1 + options { + 66001: "NACLSecretboxSalsa20Poly1305" + } + } + value { + name: "FERNET_AES_128_CBC" + number: 2 + options { + 66001: "FernetAES128CBC" + } + } + } + } + message_type { + name: "RootRotation" + field { + name: "ca_cert" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CACert" + } + json_name: "caCert" + } + field { + name: "ca_key" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CAKey" + } + json_name: "caKey" + } + field { + name: "cross_signed_ca_cert" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CrossSignedCACert" + } + json_name: "crossSignedCaCert" + } + } + message_type { + name: "Privileges" + field { + name: "credential_spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Privileges.CredentialSpec" + json_name: "credentialSpec" + } + field { + name: "selinux_context" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Privileges.SELinuxContext" + options { + 65004: "SELinuxContext" + } + json_name: "selinuxContext" + } + nested_type { + name: "CredentialSpec" + field { + name: "file" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "file" + } + field { + name: "registry" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "registry" + } + field { + name: "config" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "config" + } + oneof_decl { + name: "source" + } + } + nested_type { + name: "SELinuxContext" + field { + name: "disable" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "disable" + } + field { + name: "user" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "user" + } + field { + name: "role" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "role" + } + field { + name: "type" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "type" + } + field { + name: "level" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "level" + } + } + } + message_type { + name: "JobStatus" + field { + name: "job_iteration" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + options { + 65001: 0 + } + json_name: "jobIteration" + } + field { + name: "last_execution" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "lastExecution" + } + } + enum_type { + name: "ResourceType" + value { + name: "TASK" + number: 0 + } + value { + name: "SECRET" + number: 1 + } + value { + name: "CONFIG" + number: 2 + } + } + enum_type { + name: "TaskState" + value { + name: "NEW" + number: 0 + options { + 66001: "TaskStateNew" + } + } + value { + name: "PENDING" + number: 64 + options { + 66001: "TaskStatePending" + } + } + value { + name: "ASSIGNED" + number: 192 + options { + 66001: "TaskStateAssigned" + } + } + value { + name: "ACCEPTED" + number: 256 + options { + 66001: "TaskStateAccepted" + } + } + value { + name: "PREPARING" + number: 320 + options { + 66001: "TaskStatePreparing" + } + } + value { + name: "READY" + number: 384 + options { + 66001: "TaskStateReady" + } + } + value { + name: "STARTING" + number: 448 + options { + 66001: "TaskStateStarting" + } + } + value { + name: "RUNNING" + number: 512 + options { + 66001: "TaskStateRunning" + } + } + value { + name: "COMPLETE" + number: 576 + options { + 66001: "TaskStateCompleted" + } + } + value { + name: "SHUTDOWN" + number: 640 + options { + 66001: "TaskStateShutdown" + } + } + value { + name: "FAILED" + number: 704 + options { + 66001: "TaskStateFailed" + } + } + value { + name: "REJECTED" + number: 768 + options { + 66001: "TaskStateRejected" + } + } + value { + name: "REMOVE" + number: 800 + options { + 66001: "TaskStateRemove" + } + } + value { + name: "ORPHANED" + number: 832 + options { + 66001: "TaskStateOrphaned" + } + } + options { + 62001: 0 + 62023: "TaskState" + } + } + enum_type { + name: "NodeRole" + value { + name: "WORKER" + number: 0 + options { + 66001: "NodeRoleWorker" + } + } + value { + name: "MANAGER" + number: 1 + options { + 66001: "NodeRoleManager" + } + } + options { + 62001: 0 + 62023: "NodeRole" + } + } + syntax: "proto3" +} +file { + name: "google/protobuf/any.proto" + package: "google.protobuf" + message_type { + name: "Any" + field { + name: "type_url" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "typeUrl" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "value" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "AnyProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/any" + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/specs.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/duration.proto" + dependency: "google/protobuf/any.proto" + dependency: "google/protobuf/wrappers.proto" + message_type { + name: "NodeSpec" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "desired_role" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + json_name: "desiredRole" + } + field { + name: "membership" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeSpec.Membership" + json_name: "membership" + } + field { + name: "availability" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeSpec.Availability" + json_name: "availability" + } + enum_type { + name: "Membership" + value { + name: "PENDING" + number: 0 + options { + 66001: "NodeMembershipPending" + } + } + value { + name: "ACCEPTED" + number: 1 + options { + 66001: "NodeMembershipAccepted" + } + } + options { + 62001: 0 + } + } + enum_type { + name: "Availability" + value { + name: "ACTIVE" + number: 0 + options { + 66001: "NodeAvailabilityActive" + } + } + value { + name: "PAUSE" + number: 1 + options { + 66001: "NodeAvailabilityPause" + } + } + value { + name: "DRAIN" + number: 2 + options { + 66001: "NodeAvailabilityDrain" + } + } + options { + 62001: 0 + } + } + } + message_type { + name: "ServiceSpec" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "task" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.TaskSpec" + options { + 65001: 0 + } + json_name: "task" + } + field { + name: "replicated" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ReplicatedService" + oneof_index: 0 + json_name: "replicated" + } + field { + name: "global" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.GlobalService" + oneof_index: 0 + json_name: "global" + } + field { + name: "replicated_job" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ReplicatedJob" + oneof_index: 0 + json_name: "replicatedJob" + } + field { + name: "global_job" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.GlobalJob" + oneof_index: 0 + json_name: "globalJob" + } + field { + name: "update" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.UpdateConfig" + json_name: "update" + } + field { + name: "rollback" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.UpdateConfig" + json_name: "rollback" + } + field { + name: "networks" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachmentConfig" + options { + deprecated: true + } + json_name: "networks" + } + field { + name: "endpoint" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EndpointSpec" + json_name: "endpoint" + } + oneof_decl { + name: "mode" + } + } + message_type { + name: "ReplicatedService" + field { + name: "replicas" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "replicas" + } + } + message_type { + name: "GlobalService" + } + message_type { + name: "ReplicatedJob" + field { + name: "max_concurrent" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "maxConcurrent" + } + field { + name: "total_completions" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalCompletions" + } + } + message_type { + name: "GlobalJob" + } + message_type { + name: "TaskSpec" + field { + name: "attachment" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachmentSpec" + oneof_index: 0 + json_name: "attachment" + } + field { + name: "container" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerSpec" + oneof_index: 0 + json_name: "container" + } + field { + name: "generic" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.GenericRuntimeSpec" + oneof_index: 0 + json_name: "generic" + } + field { + name: "resources" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ResourceRequirements" + json_name: "resources" + } + field { + name: "restart" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RestartPolicy" + json_name: "restart" + } + field { + name: "placement" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Placement" + json_name: "placement" + } + field { + name: "log_driver" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "logDriver" + } + field { + name: "networks" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachmentConfig" + json_name: "networks" + } + field { + name: "force_update" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "forceUpdate" + } + field { + name: "resource_references" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ResourceReference" + options { + 65001: 0 + } + json_name: "resourceReferences" + } + oneof_decl { + name: "runtime" + } + } + message_type { + name: "ResourceReference" + field { + name: "resource_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "resourceId" + } + field { + name: "resource_type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.ResourceType" + json_name: "resourceType" + } + } + message_type { + name: "GenericRuntimeSpec" + field { + name: "kind" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "payload" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Any" + json_name: "payload" + } + } + message_type { + name: "NetworkAttachmentSpec" + field { + name: "container_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + } + message_type { + name: "ContainerSpec" + field { + name: "image" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "image" + } + field { + name: "labels" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerSpec.LabelsEntry" + json_name: "labels" + } + field { + name: "command" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "command" + } + field { + name: "args" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "args" + } + field { + name: "hostname" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "hostname" + } + field { + name: "env" + number: 5 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "env" + } + field { + name: "dir" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "dir" + } + field { + name: "user" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "user" + } + field { + name: "groups" + number: 11 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "groups" + } + field { + name: "privileges" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Privileges" + json_name: "privileges" + } + field { + name: "init" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.BoolValue" + json_name: "init" + } + field { + name: "tty" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65004: "TTY" + } + json_name: "tty" + } + field { + name: "open_stdin" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "openStdin" + } + field { + name: "read_only" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "readOnly" + } + field { + name: "stop_signal" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "stopSignal" + } + field { + name: "mounts" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Mount" + options { + 65001: 0 + } + json_name: "mounts" + } + field { + name: "stop_grace_period" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + json_name: "stopGracePeriod" + } + field { + name: "pull_options" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerSpec.PullOptions" + json_name: "pullOptions" + } + field { + name: "secrets" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SecretReference" + json_name: "secrets" + } + field { + name: "configs" + number: 21 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ConfigReference" + json_name: "configs" + } + field { + name: "hosts" + number: 17 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "hosts" + } + field { + name: "dns_config" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerSpec.DNSConfig" + options { + 65004: "DNSConfig" + } + json_name: "dnsConfig" + } + field { + name: "healthcheck" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.HealthConfig" + json_name: "healthcheck" + } + field { + name: "isolation" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.ContainerSpec.Isolation" + json_name: "isolation" + } + field { + name: "pidsLimit" + number: 25 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "pidsLimit" + } + field { + name: "sysctls" + number: 26 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerSpec.SysctlsEntry" + json_name: "sysctls" + } + field { + name: "capability_add" + number: 27 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "capabilityAdd" + } + field { + name: "capability_drop" + number: 28 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "capabilityDrop" + } + field { + name: "ulimits" + number: 29 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ContainerSpec.Ulimit" + json_name: "ulimits" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + nested_type { + name: "PullOptions" + field { + name: "registry_auth" + number: 64 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "registryAuth" + } + } + nested_type { + name: "DNSConfig" + field { + name: "nameservers" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "nameservers" + } + field { + name: "search" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "search" + } + field { + name: "options" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "options" + } + } + nested_type { + name: "SysctlsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + nested_type { + name: "Ulimit" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "soft" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "soft" + } + field { + name: "hard" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "hard" + } + } + enum_type { + name: "Isolation" + value { + name: "ISOLATION_DEFAULT" + number: 0 + options { + 66001: "ContainerIsolationDefault" + } + } + value { + name: "ISOLATION_PROCESS" + number: 1 + options { + 66001: "ContainerIsolationProcess" + } + } + value { + name: "ISOLATION_HYPERV" + number: 2 + options { + 66001: "ContainerIsolationHyperV" + } + } + options { + 62001: 0 + } + } + } + message_type { + name: "EndpointSpec" + field { + name: "mode" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.EndpointSpec.ResolutionMode" + json_name: "mode" + } + field { + name: "ports" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.PortConfig" + json_name: "ports" + } + enum_type { + name: "ResolutionMode" + value { + name: "VIP" + number: 0 + options { + 66001: "ResolutionModeVirtualIP" + } + } + value { + name: "DNSRR" + number: 1 + options { + 66001: "ResolutionModeDNSRoundRobin" + } + } + options { + 62001: 0 + } + } + } + message_type { + name: "NetworkSpec" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "driver_config" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "driverConfig" + } + field { + name: "ipv6_enabled" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "ipv6Enabled" + } + field { + name: "internal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "internal" + } + field { + name: "ipam" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IPAMOptions" + options { + 65004: "IPAM" + } + json_name: "ipam" + } + field { + name: "attachable" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "attachable" + } + field { + name: "ingress" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "ingress" + } + field { + name: "network" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "network" + } + oneof_decl { + name: "config_from" + } + } + message_type { + name: "ClusterSpec" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "acceptance_policy" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.AcceptancePolicy" + options { + deprecated: true + 65001: 0 + } + json_name: "acceptancePolicy" + } + field { + name: "orchestration" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.OrchestrationConfig" + options { + 65001: 0 + } + json_name: "orchestration" + } + field { + name: "raft" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RaftConfig" + options { + 65001: 0 + } + json_name: "raft" + } + field { + name: "dispatcher" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.DispatcherConfig" + options { + 65001: 0 + } + json_name: "dispatcher" + } + field { + name: "ca_config" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.CAConfig" + options { + 65001: 0 + 65004: "CAConfig" + } + json_name: "caConfig" + } + field { + name: "task_defaults" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.TaskDefaults" + options { + 65001: 0 + } + json_name: "taskDefaults" + } + field { + name: "encryption_config" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EncryptionConfig" + options { + 65001: 0 + } + json_name: "encryptionConfig" + } + } + message_type { + name: "SecretSpec" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "data" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "data" + } + field { + name: "templating" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "templating" + } + field { + name: "driver" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "driver" + } + } + message_type { + name: "ConfigSpec" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "data" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "data" + } + field { + name: "templating" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "templating" + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + package: "docker.protobuf.plugin" + dependency: "google/protobuf/descriptor.proto" + message_type { + name: "WatchSelectors" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "id" + } + field { + name: "id_prefix" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "idPrefix" + } + field { + name: "name" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "name" + } + field { + name: "name_prefix" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "namePrefix" + } + field { + name: "custom" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "custom" + } + field { + name: "custom_prefix" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "customPrefix" + } + field { + name: "service_id" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "serviceId" + } + field { + name: "node_id" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "nodeId" + } + field { + name: "slot" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "slot" + } + field { + name: "desired_state" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "desiredState" + } + field { + name: "role" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "role" + } + field { + name: "membership" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "membership" + } + field { + name: "kind" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "kind" + } + } + message_type { + name: "StoreObject" + field { + name: "watch_selectors" + number: 1 + label: LABEL_REQUIRED + type: TYPE_MESSAGE + type_name: ".docker.protobuf.plugin.WatchSelectors" + json_name: "watchSelectors" + } + } + message_type { + name: "TLSAuthorization" + field { + name: "roles" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "roles" + } + field { + name: "insecure" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "insecure" + } + } + extension { + name: "deepcopy" + extendee: ".google.protobuf.MessageOptions" + number: 70000 + label: LABEL_OPTIONAL + type: TYPE_BOOL + default_value: "true" + json_name: "deepcopy" + } + extension { + name: "store_object" + extendee: ".google.protobuf.MessageOptions" + number: 70001 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.protobuf.plugin.StoreObject" + json_name: "storeObject" + } + extension { + name: "tls_authorization" + extendee: ".google.protobuf.MethodOptions" + number: 73626345 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.protobuf.plugin.TLSAuthorization" + json_name: "tlsAuthorization" + } +} +file { + name: "github.com/docker/swarmkit/api/ca.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "github.com/docker/swarmkit/api/specs.proto" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "NodeCertificateStatusRequest" + field { + name: "node_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + } + message_type { + name: "NodeCertificateStatusResponse" + field { + name: "status" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IssuanceStatus" + json_name: "status" + } + field { + name: "certificate" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Certificate" + json_name: "certificate" + } + } + message_type { + name: "IssueNodeCertificateRequest" + field { + name: "role" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + options { + deprecated: true + } + json_name: "role" + } + field { + name: "csr" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BYTES + options { + 65004: "CSR" + } + json_name: "csr" + } + field { + name: "token" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "token" + } + field { + name: "availability" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeSpec.Availability" + json_name: "availability" + } + } + message_type { + name: "IssueNodeCertificateResponse" + field { + name: "node_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "node_membership" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeSpec.Membership" + json_name: "nodeMembership" + } + } + message_type { + name: "GetRootCACertificateRequest" + } + message_type { + name: "GetRootCACertificateResponse" + field { + name: "certificate" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "certificate" + } + } + message_type { + name: "GetUnlockKeyRequest" + } + message_type { + name: "GetUnlockKeyResponse" + field { + name: "unlock_key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "unlockKey" + } + field { + name: "version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + options { + 65001: 0 + } + json_name: "version" + } + } + service { + name: "CA" + method { + name: "GetRootCACertificate" + input_type: ".docker.swarmkit.v1.GetRootCACertificateRequest" + output_type: ".docker.swarmkit.v1.GetRootCACertificateResponse" + options { + 73626345 { + 2: 1 + } + } + } + method { + name: "GetUnlockKey" + input_type: ".docker.swarmkit.v1.GetUnlockKeyRequest" + output_type: ".docker.swarmkit.v1.GetUnlockKeyResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + } + service { + name: "NodeCA" + method { + name: "IssueNodeCertificate" + input_type: ".docker.swarmkit.v1.IssueNodeCertificateRequest" + output_type: ".docker.swarmkit.v1.IssueNodeCertificateResponse" + options { + 73626345 { + 2: 1 + } + } + } + method { + name: "NodeCertificateStatus" + input_type: ".docker.swarmkit.v1.NodeCertificateStatusRequest" + output_type: ".docker.swarmkit.v1.NodeCertificateStatusResponse" + options { + 73626345 { + 2: 1 + } + } + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/objects.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "github.com/docker/swarmkit/api/specs.proto" + dependency: "google/protobuf/timestamp.proto" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/any.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "Meta" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + options { + 65001: 0 + } + json_name: "version" + } + field { + name: "created_at" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "createdAt" + } + field { + name: "updated_at" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "updatedAt" + } + } + message_type { + name: "Node" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NodeSpec" + options { + 65001: 0 + } + json_name: "spec" + } + field { + name: "description" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NodeDescription" + json_name: "description" + } + field { + name: "status" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NodeStatus" + options { + 65001: 0 + } + json_name: "status" + } + field { + name: "manager_status" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ManagerStatus" + json_name: "managerStatus" + } + field { + name: "attachment" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachment" + options { + deprecated: true + } + json_name: "attachment" + } + field { + name: "certificate" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Certificate" + options { + 65001: 0 + } + json_name: "certificate" + } + field { + name: "role" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + json_name: "role" + } + field { + name: "attachments" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachment" + json_name: "attachments" + } + field { + name: "VXLANUDPPort" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "VXLANUDPPort" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + 11: 1 + 12: 1 + } + } + } + } + message_type { + name: "Service" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ServiceSpec" + options { + 65001: 0 + } + json_name: "spec" + } + field { + name: "spec_version" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "specVersion" + } + field { + name: "previous_spec" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ServiceSpec" + json_name: "previousSpec" + } + field { + name: "previous_spec_version" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "previousSpecVersion" + } + field { + name: "endpoint" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Endpoint" + json_name: "endpoint" + } + field { + name: "update_status" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.UpdateStatus" + json_name: "updateStatus" + } + field { + name: "job_status" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.JobStatus" + json_name: "jobStatus" + } + field { + name: "pending_delete" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "pendingDelete" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + } + } + } + } + message_type { + name: "Endpoint" + field { + name: "spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EndpointSpec" + json_name: "spec" + } + field { + name: "ports" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.PortConfig" + json_name: "ports" + } + field { + name: "virtual_ips" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Endpoint.VirtualIP" + options { + 65004: "VirtualIPs" + } + json_name: "virtualIps" + } + nested_type { + name: "VirtualIP" + field { + name: "network_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "networkId" + } + field { + name: "addr" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + } + } + message_type { + name: "Task" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.TaskSpec" + options { + 65001: 0 + } + json_name: "spec" + } + field { + name: "spec_version" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "specVersion" + } + field { + name: "service_id" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "serviceId" + } + field { + name: "slot" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "slot" + } + field { + name: "node_id" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "annotations" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "service_annotations" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "serviceAnnotations" + } + field { + name: "status" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.TaskStatus" + options { + 65001: 0 + } + json_name: "status" + } + field { + name: "desired_state" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.TaskState" + json_name: "desiredState" + } + field { + name: "networks" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachment" + json_name: "networks" + } + field { + name: "endpoint" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Endpoint" + json_name: "endpoint" + } + field { + name: "log_driver" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "logDriver" + } + field { + name: "assigned_generic_resources" + number: 15 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.GenericResource" + json_name: "assignedGenericResources" + } + field { + name: "job_iteration" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "jobIteration" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + 7: 1 + 8: 1 + 9: 1 + 10: 1 + } + } + } + } + message_type { + name: "NetworkAttachment" + field { + name: "network" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + json_name: "network" + } + field { + name: "addresses" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "addresses" + } + field { + name: "aliases" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "aliases" + } + field { + name: "driver_attachment_opts" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachment.DriverAttachmentOptsEntry" + json_name: "driverAttachmentOpts" + } + nested_type { + name: "DriverAttachmentOptsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + message_type { + name: "Network" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkSpec" + options { + 65001: 0 + } + json_name: "spec" + } + field { + name: "driver_state" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Driver" + json_name: "driverState" + } + field { + name: "ipam" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.IPAMOptions" + options { + 65004: "IPAM" + } + json_name: "ipam" + } + field { + name: "pending_delete" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "pendingDelete" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + } + } + } + } + message_type { + name: "Cluster" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ClusterSpec" + options { + 65001: 0 + } + json_name: "spec" + } + field { + name: "root_ca" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RootCA" + options { + 65001: 0 + 65004: "RootCA" + } + json_name: "rootCa" + } + field { + name: "network_bootstrap_keys" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EncryptionKey" + json_name: "networkBootstrapKeys" + } + field { + name: "encryption_key_lamport_clock" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "encryptionKeyLamportClock" + } + field { + name: "blacklisted_certificates" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster.BlacklistedCertificatesEntry" + json_name: "blacklistedCertificates" + } + field { + name: "unlock_keys" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EncryptionKey" + json_name: "unlockKeys" + } + field { + name: "fips" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65004: "FIPS" + } + json_name: "fips" + } + field { + name: "defaultAddressPool" + number: 11 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "defaultAddressPool" + } + field { + name: "subnetSize" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "subnetSize" + } + field { + name: "VXLANUDPPort" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "VXLANUDPPort" + } + nested_type { + name: "BlacklistedCertificatesEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.BlacklistedCertificate" + json_name: "value" + } + options { + map_entry: true + } + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + } + } + } + } + message_type { + name: "Secret" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SecretSpec" + options { + 65001: 0 + } + json_name: "spec" + } + field { + name: "internal" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "internal" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + } + } + } + } + message_type { + name: "Config" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ConfigSpec" + options { + 65001: 0 + } + json_name: "spec" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + } + } + } + } + message_type { + name: "Resource" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ID" + } + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "annotations" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "kind" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "payload" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Any" + json_name: "payload" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + 13: 1 + } + } + } + } + message_type { + name: "Extension" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ID" + } + json_name: "id" + } + field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Meta" + options { + 65001: 0 + } + json_name: "meta" + } + field { + name: "annotations" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + options { + 65001: 0 + } + json_name: "annotations" + } + field { + name: "description" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "description" + } + options { + 70001 { + 1 { + 1: 1 + 2: 1 + 3: 1 + 4: 1 + 5: 1 + 6: 1 + } + } + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/control.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/specs.proto" + dependency: "github.com/docker/swarmkit/api/objects.proto" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/any.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "GetNodeRequest" + field { + name: "node_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + } + message_type { + name: "GetNodeResponse" + field { + name: "node" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + json_name: "node" + } + } + message_type { + name: "ListNodesRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListNodesRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListNodesRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "node_labels" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListNodesRequest.Filters.NodeLabelsEntry" + json_name: "nodeLabels" + } + field { + name: "memberships" + number: 4 + label: LABEL_REPEATED + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeSpec.Membership" + options { + packed: false + } + json_name: "memberships" + } + field { + name: "roles" + number: 5 + label: LABEL_REPEATED + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + options { + packed: false + } + json_name: "roles" + } + field { + name: "name_prefixes" + number: 6 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + nested_type { + name: "NodeLabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListNodesResponse" + field { + name: "nodes" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + json_name: "nodes" + } + } + message_type { + name: "UpdateNodeRequest" + field { + name: "node_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "node_version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "nodeVersion" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NodeSpec" + json_name: "spec" + } + } + message_type { + name: "UpdateNodeResponse" + field { + name: "node" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + json_name: "node" + } + } + message_type { + name: "RemoveNodeRequest" + field { + name: "node_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "force" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "force" + } + } + message_type { + name: "RemoveNodeResponse" + } + message_type { + name: "GetTaskRequest" + field { + name: "task_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "taskId" + } + } + message_type { + name: "GetTaskResponse" + field { + name: "task" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + json_name: "task" + } + } + message_type { + name: "RemoveTaskRequest" + field { + name: "task_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "taskId" + } + } + message_type { + name: "RemoveTaskResponse" + } + message_type { + name: "ListTasksRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListTasksRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListTasksRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "service_ids" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "serviceIds" + } + field { + name: "node_ids" + number: 5 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "nodeIds" + } + field { + name: "desired_states" + number: 6 + label: LABEL_REPEATED + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.TaskState" + options { + packed: false + } + json_name: "desiredStates" + } + field { + name: "name_prefixes" + number: 7 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + field { + name: "runtimes" + number: 9 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "runtimes" + } + field { + name: "up_to_date" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "upToDate" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListTasksResponse" + field { + name: "tasks" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + json_name: "tasks" + } + } + message_type { + name: "CreateServiceRequest" + field { + name: "spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ServiceSpec" + json_name: "spec" + } + } + message_type { + name: "CreateServiceResponse" + field { + name: "service" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + json_name: "service" + } + } + message_type { + name: "GetServiceRequest" + field { + name: "service_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "serviceId" + } + field { + name: "insert_defaults" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "insertDefaults" + } + } + message_type { + name: "GetServiceResponse" + field { + name: "service" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + json_name: "service" + } + } + message_type { + name: "UpdateServiceRequest" + field { + name: "service_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "serviceId" + } + field { + name: "service_version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "serviceVersion" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ServiceSpec" + json_name: "spec" + } + field { + name: "rollback" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.UpdateServiceRequest.Rollback" + json_name: "rollback" + } + enum_type { + name: "Rollback" + value { + name: "NONE" + number: 0 + } + value { + name: "PREVIOUS" + number: 1 + } + } + } + message_type { + name: "UpdateServiceResponse" + field { + name: "service" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + json_name: "service" + } + } + message_type { + name: "RemoveServiceRequest" + field { + name: "service_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "serviceId" + } + } + message_type { + name: "RemoveServiceResponse" + } + message_type { + name: "ListServicesRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListServicesRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListServicesRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "name_prefixes" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + field { + name: "runtimes" + number: 5 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "runtimes" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListServicesResponse" + field { + name: "services" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + json_name: "services" + } + } + message_type { + name: "ListServiceStatusesRequest" + field { + name: "services" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "services" + } + } + message_type { + name: "ListServiceStatusesResponse" + field { + name: "statuses" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListServiceStatusesResponse.ServiceStatus" + json_name: "statuses" + } + nested_type { + name: "ServiceStatus" + field { + name: "service_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "serviceId" + } + field { + name: "desired_tasks" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "desiredTasks" + } + field { + name: "running_tasks" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "runningTasks" + } + field { + name: "completed_tasks" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "completedTasks" + } + } + } + message_type { + name: "CreateNetworkRequest" + field { + name: "spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkSpec" + json_name: "spec" + } + } + message_type { + name: "CreateNetworkResponse" + field { + name: "network" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + json_name: "network" + } + } + message_type { + name: "GetNetworkRequest" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "network_id" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "networkId" + } + } + message_type { + name: "GetNetworkResponse" + field { + name: "network" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + json_name: "network" + } + } + message_type { + name: "RemoveNetworkRequest" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "network_id" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "networkId" + } + } + message_type { + name: "RemoveNetworkResponse" + } + message_type { + name: "ListNetworksRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListNetworksRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListNetworksRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "name_prefixes" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListNetworksResponse" + field { + name: "networks" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + json_name: "networks" + } + } + message_type { + name: "GetClusterRequest" + field { + name: "cluster_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "clusterId" + } + } + message_type { + name: "GetClusterResponse" + field { + name: "cluster" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster" + json_name: "cluster" + } + } + message_type { + name: "ListClustersRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListClustersRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListClustersRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "name_prefixes" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListClustersResponse" + field { + name: "clusters" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster" + json_name: "clusters" + } + } + message_type { + name: "KeyRotation" + field { + name: "worker_join_token" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "workerJoinToken" + } + field { + name: "manager_join_token" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "managerJoinToken" + } + field { + name: "manager_unlock_key" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "managerUnlockKey" + } + } + message_type { + name: "UpdateClusterRequest" + field { + name: "cluster_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "clusterId" + } + field { + name: "cluster_version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "clusterVersion" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ClusterSpec" + json_name: "spec" + } + field { + name: "rotation" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.KeyRotation" + options { + 65001: 0 + } + json_name: "rotation" + } + } + message_type { + name: "UpdateClusterResponse" + field { + name: "cluster" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster" + json_name: "cluster" + } + } + message_type { + name: "GetSecretRequest" + field { + name: "secret_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "secretId" + } + } + message_type { + name: "GetSecretResponse" + field { + name: "secret" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + json_name: "secret" + } + } + message_type { + name: "UpdateSecretRequest" + field { + name: "secret_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "secretId" + } + field { + name: "secret_version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "secretVersion" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SecretSpec" + json_name: "spec" + } + } + message_type { + name: "UpdateSecretResponse" + field { + name: "secret" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + json_name: "secret" + } + } + message_type { + name: "ListSecretsRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListSecretsRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListSecretsRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "name_prefixes" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListSecretsResponse" + field { + name: "secrets" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + json_name: "secrets" + } + } + message_type { + name: "CreateSecretRequest" + field { + name: "spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SecretSpec" + json_name: "spec" + } + } + message_type { + name: "CreateSecretResponse" + field { + name: "secret" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + json_name: "secret" + } + } + message_type { + name: "RemoveSecretRequest" + field { + name: "secret_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "secretId" + } + } + message_type { + name: "RemoveSecretResponse" + } + message_type { + name: "GetConfigRequest" + field { + name: "config_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "configId" + } + } + message_type { + name: "GetConfigResponse" + field { + name: "config" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + json_name: "config" + } + } + message_type { + name: "UpdateConfigRequest" + field { + name: "config_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "configId" + } + field { + name: "config_version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "configVersion" + } + field { + name: "spec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ConfigSpec" + json_name: "spec" + } + } + message_type { + name: "UpdateConfigResponse" + field { + name: "config" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + json_name: "config" + } + } + message_type { + name: "ListConfigsRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListConfigsRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListConfigsRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "name_prefixes" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListConfigsResponse" + field { + name: "configs" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + json_name: "configs" + } + } + message_type { + name: "CreateConfigRequest" + field { + name: "spec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ConfigSpec" + json_name: "spec" + } + } + message_type { + name: "CreateConfigResponse" + field { + name: "config" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + json_name: "config" + } + } + message_type { + name: "RemoveConfigRequest" + field { + name: "config_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "configId" + } + } + message_type { + name: "RemoveConfigResponse" + } + message_type { + name: "CreateExtensionRequest" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + json_name: "annotations" + } + field { + name: "description" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "description" + } + } + message_type { + name: "CreateExtensionResponse" + field { + name: "extension" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Extension" + json_name: "extension" + } + } + message_type { + name: "RemoveExtensionRequest" + field { + name: "extension_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "extensionId" + } + } + message_type { + name: "RemoveExtensionResponse" + } + message_type { + name: "GetExtensionRequest" + field { + name: "extension_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "extensionId" + } + } + message_type { + name: "GetExtensionResponse" + field { + name: "extension" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Extension" + json_name: "extension" + } + } + message_type { + name: "CreateResourceRequest" + field { + name: "annotations" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + json_name: "annotations" + } + field { + name: "kind" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "payload" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Any" + json_name: "payload" + } + } + message_type { + name: "CreateResourceResponse" + field { + name: "resource" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + json_name: "resource" + } + } + message_type { + name: "RemoveResourceRequest" + field { + name: "resource_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "resourceId" + } + } + message_type { + name: "RemoveResourceResponse" + } + message_type { + name: "UpdateResourceRequest" + field { + name: "resource_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "resourceId" + } + field { + name: "resource_version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "resourceVersion" + } + field { + name: "annotations" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Annotations" + json_name: "annotations" + } + field { + name: "payload" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Any" + json_name: "payload" + } + } + message_type { + name: "UpdateResourceResponse" + field { + name: "resource" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + json_name: "resource" + } + } + message_type { + name: "GetResourceRequest" + field { + name: "resource_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "resourceId" + } + } + message_type { + name: "GetResourceResponse" + field { + name: "resource" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + json_name: "resource" + } + } + message_type { + name: "ListResourcesRequest" + field { + name: "filters" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListResourcesRequest.Filters" + json_name: "filters" + } + nested_type { + name: "Filters" + field { + name: "names" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "names" + } + field { + name: "id_prefixes" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "idPrefixes" + } + field { + name: "labels" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ListResourcesRequest.Filters.LabelsEntry" + json_name: "labels" + } + field { + name: "name_prefixes" + number: 4 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "namePrefixes" + } + field { + name: "kind" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + nested_type { + name: "LabelsEntry" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + options { + map_entry: true + } + } + } + } + message_type { + name: "ListResourcesResponse" + field { + name: "resources" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + json_name: "resources" + } + } + service { + name: "Control" + method { + name: "GetNode" + input_type: ".docker.swarmkit.v1.GetNodeRequest" + output_type: ".docker.swarmkit.v1.GetNodeResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListNodes" + input_type: ".docker.swarmkit.v1.ListNodesRequest" + output_type: ".docker.swarmkit.v1.ListNodesResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "UpdateNode" + input_type: ".docker.swarmkit.v1.UpdateNodeRequest" + output_type: ".docker.swarmkit.v1.UpdateNodeResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveNode" + input_type: ".docker.swarmkit.v1.RemoveNodeRequest" + output_type: ".docker.swarmkit.v1.RemoveNodeResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetTask" + input_type: ".docker.swarmkit.v1.GetTaskRequest" + output_type: ".docker.swarmkit.v1.GetTaskResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListTasks" + input_type: ".docker.swarmkit.v1.ListTasksRequest" + output_type: ".docker.swarmkit.v1.ListTasksResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveTask" + input_type: ".docker.swarmkit.v1.RemoveTaskRequest" + output_type: ".docker.swarmkit.v1.RemoveTaskResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetService" + input_type: ".docker.swarmkit.v1.GetServiceRequest" + output_type: ".docker.swarmkit.v1.GetServiceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListServices" + input_type: ".docker.swarmkit.v1.ListServicesRequest" + output_type: ".docker.swarmkit.v1.ListServicesResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "CreateService" + input_type: ".docker.swarmkit.v1.CreateServiceRequest" + output_type: ".docker.swarmkit.v1.CreateServiceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "UpdateService" + input_type: ".docker.swarmkit.v1.UpdateServiceRequest" + output_type: ".docker.swarmkit.v1.UpdateServiceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveService" + input_type: ".docker.swarmkit.v1.RemoveServiceRequest" + output_type: ".docker.swarmkit.v1.RemoveServiceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListServiceStatuses" + input_type: ".docker.swarmkit.v1.ListServiceStatusesRequest" + output_type: ".docker.swarmkit.v1.ListServiceStatusesResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetNetwork" + input_type: ".docker.swarmkit.v1.GetNetworkRequest" + output_type: ".docker.swarmkit.v1.GetNetworkResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListNetworks" + input_type: ".docker.swarmkit.v1.ListNetworksRequest" + output_type: ".docker.swarmkit.v1.ListNetworksResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "CreateNetwork" + input_type: ".docker.swarmkit.v1.CreateNetworkRequest" + output_type: ".docker.swarmkit.v1.CreateNetworkResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveNetwork" + input_type: ".docker.swarmkit.v1.RemoveNetworkRequest" + output_type: ".docker.swarmkit.v1.RemoveNetworkResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetCluster" + input_type: ".docker.swarmkit.v1.GetClusterRequest" + output_type: ".docker.swarmkit.v1.GetClusterResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListClusters" + input_type: ".docker.swarmkit.v1.ListClustersRequest" + output_type: ".docker.swarmkit.v1.ListClustersResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "UpdateCluster" + input_type: ".docker.swarmkit.v1.UpdateClusterRequest" + output_type: ".docker.swarmkit.v1.UpdateClusterResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetSecret" + input_type: ".docker.swarmkit.v1.GetSecretRequest" + output_type: ".docker.swarmkit.v1.GetSecretResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "UpdateSecret" + input_type: ".docker.swarmkit.v1.UpdateSecretRequest" + output_type: ".docker.swarmkit.v1.UpdateSecretResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListSecrets" + input_type: ".docker.swarmkit.v1.ListSecretsRequest" + output_type: ".docker.swarmkit.v1.ListSecretsResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "CreateSecret" + input_type: ".docker.swarmkit.v1.CreateSecretRequest" + output_type: ".docker.swarmkit.v1.CreateSecretResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveSecret" + input_type: ".docker.swarmkit.v1.RemoveSecretRequest" + output_type: ".docker.swarmkit.v1.RemoveSecretResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetConfig" + input_type: ".docker.swarmkit.v1.GetConfigRequest" + output_type: ".docker.swarmkit.v1.GetConfigResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "UpdateConfig" + input_type: ".docker.swarmkit.v1.UpdateConfigRequest" + output_type: ".docker.swarmkit.v1.UpdateConfigResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListConfigs" + input_type: ".docker.swarmkit.v1.ListConfigsRequest" + output_type: ".docker.swarmkit.v1.ListConfigsResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "CreateConfig" + input_type: ".docker.swarmkit.v1.CreateConfigRequest" + output_type: ".docker.swarmkit.v1.CreateConfigResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveConfig" + input_type: ".docker.swarmkit.v1.RemoveConfigRequest" + output_type: ".docker.swarmkit.v1.RemoveConfigResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetExtension" + input_type: ".docker.swarmkit.v1.GetExtensionRequest" + output_type: ".docker.swarmkit.v1.GetExtensionResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "CreateExtension" + input_type: ".docker.swarmkit.v1.CreateExtensionRequest" + output_type: ".docker.swarmkit.v1.CreateExtensionResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveExtension" + input_type: ".docker.swarmkit.v1.RemoveExtensionRequest" + output_type: ".docker.swarmkit.v1.RemoveExtensionResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "GetResource" + input_type: ".docker.swarmkit.v1.GetResourceRequest" + output_type: ".docker.swarmkit.v1.GetResourceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "UpdateResource" + input_type: ".docker.swarmkit.v1.UpdateResourceRequest" + output_type: ".docker.swarmkit.v1.UpdateResourceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "ListResources" + input_type: ".docker.swarmkit.v1.ListResourcesRequest" + output_type: ".docker.swarmkit.v1.ListResourcesResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "CreateResource" + input_type: ".docker.swarmkit.v1.CreateResourceRequest" + output_type: ".docker.swarmkit.v1.CreateResourceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "RemoveResource" + input_type: ".docker.swarmkit.v1.RemoveResourceRequest" + output_type: ".docker.swarmkit.v1.RemoveResourceResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/dispatcher.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "github.com/docker/swarmkit/api/objects.proto" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + dependency: "google/protobuf/duration.proto" + message_type { + name: "SessionRequest" + field { + name: "description" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NodeDescription" + json_name: "description" + } + field { + name: "session_id" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sessionId" + } + } + message_type { + name: "SessionMessage" + field { + name: "session_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sessionId" + } + field { + name: "node" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + json_name: "node" + } + field { + name: "managers" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.WeightedPeer" + json_name: "managers" + } + field { + name: "network_bootstrap_keys" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.EncryptionKey" + json_name: "networkBootstrapKeys" + } + field { + name: "RootCA" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "RootCA" + } + } + message_type { + name: "HeartbeatRequest" + field { + name: "session_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sessionId" + } + } + message_type { + name: "HeartbeatResponse" + field { + name: "period" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Duration" + options { + 65001: 0 + 65011: 1 + } + json_name: "period" + } + } + message_type { + name: "UpdateTaskStatusRequest" + field { + name: "session_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sessionId" + } + field { + name: "updates" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.UpdateTaskStatusRequest.TaskStatusUpdate" + json_name: "updates" + } + nested_type { + name: "TaskStatusUpdate" + field { + name: "task_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "taskId" + } + field { + name: "status" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.TaskStatus" + json_name: "status" + } + } + } + message_type { + name: "UpdateTaskStatusResponse" + } + message_type { + name: "TasksRequest" + field { + name: "session_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sessionId" + } + } + message_type { + name: "TasksMessage" + field { + name: "tasks" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + json_name: "tasks" + } + } + message_type { + name: "AssignmentsRequest" + field { + name: "session_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sessionId" + } + } + message_type { + name: "Assignment" + field { + name: "task" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + oneof_index: 0 + json_name: "task" + } + field { + name: "secret" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + oneof_index: 0 + json_name: "secret" + } + field { + name: "config" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + oneof_index: 0 + json_name: "config" + } + oneof_decl { + name: "item" + } + } + message_type { + name: "AssignmentChange" + field { + name: "assignment" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Assignment" + json_name: "assignment" + } + field { + name: "action" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.AssignmentChange.AssignmentAction" + json_name: "action" + } + enum_type { + name: "AssignmentAction" + value { + name: "UPDATE" + number: 0 + options { + 66001: "AssignmentActionUpdate" + } + } + value { + name: "REMOVE" + number: 1 + options { + 66001: "AssignmentActionRemove" + } + } + } + } + message_type { + name: "AssignmentsMessage" + field { + name: "type" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.AssignmentsMessage.Type" + json_name: "type" + } + field { + name: "applies_to" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "appliesTo" + } + field { + name: "results_in" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "resultsIn" + } + field { + name: "changes" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.AssignmentChange" + json_name: "changes" + } + enum_type { + name: "Type" + value { + name: "COMPLETE" + number: 0 + } + value { + name: "INCREMENTAL" + number: 1 + } + } + } + service { + name: "Dispatcher" + method { + name: "Session" + input_type: ".docker.swarmkit.v1.SessionRequest" + output_type: ".docker.swarmkit.v1.SessionMessage" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + server_streaming: true + } + method { + name: "Heartbeat" + input_type: ".docker.swarmkit.v1.HeartbeatRequest" + output_type: ".docker.swarmkit.v1.HeartbeatResponse" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + } + method { + name: "UpdateTaskStatus" + input_type: ".docker.swarmkit.v1.UpdateTaskStatusRequest" + output_type: ".docker.swarmkit.v1.UpdateTaskStatusResponse" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + } + method { + name: "Tasks" + input_type: ".docker.swarmkit.v1.TasksRequest" + output_type: ".docker.swarmkit.v1.TasksMessage" + options { + deprecated: true + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + server_streaming: true + } + method { + name: "Assignments" + input_type: ".docker.swarmkit.v1.AssignmentsRequest" + output_type: ".docker.swarmkit.v1.AssignmentsMessage" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + server_streaming: true + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/health.proto" + package: "docker.swarmkit.v1" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "HealthCheckRequest" + field { + name: "service" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "service" + } + } + message_type { + name: "HealthCheckResponse" + field { + name: "status" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.HealthCheckResponse.ServingStatus" + json_name: "status" + } + enum_type { + name: "ServingStatus" + value { + name: "UNKNOWN" + number: 0 + } + value { + name: "SERVING" + number: 1 + } + value { + name: "NOT_SERVING" + number: 2 + } + } + } + service { + name: "Health" + method { + name: "Check" + input_type: ".docker.swarmkit.v1.HealthCheckRequest" + output_type: ".docker.swarmkit.v1.HealthCheckResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/logbroker.proto" + package: "docker.swarmkit.v1" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/timestamp.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "LogSubscriptionOptions" + field { + name: "streams" + number: 1 + label: LABEL_REPEATED + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.LogStream" + options { + packed: false + } + json_name: "streams" + } + field { + name: "follow" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "follow" + } + field { + name: "tail" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "tail" + } + field { + name: "since" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "since" + } + } + message_type { + name: "LogSelector" + field { + name: "service_ids" + number: 1 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "serviceIds" + } + field { + name: "node_ids" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "nodeIds" + } + field { + name: "task_ids" + number: 3 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "taskIds" + } + } + message_type { + name: "LogContext" + field { + name: "service_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "serviceId" + } + field { + name: "node_id" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "task_id" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "taskId" + } + } + message_type { + name: "LogAttr" + field { + name: "key" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "key" + } + field { + name: "value" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + } + message_type { + name: "LogMessage" + field { + name: "context" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogContext" + options { + 65001: 0 + } + json_name: "context" + } + field { + name: "timestamp" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + json_name: "timestamp" + } + field { + name: "stream" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.LogStream" + json_name: "stream" + } + field { + name: "data" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "data" + } + field { + name: "attrs" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogAttr" + options { + 65001: 0 + } + json_name: "attrs" + } + } + message_type { + name: "SubscribeLogsRequest" + field { + name: "selector" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogSelector" + json_name: "selector" + } + field { + name: "options" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogSubscriptionOptions" + json_name: "options" + } + } + message_type { + name: "SubscribeLogsMessage" + field { + name: "messages" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogMessage" + options { + 65001: 0 + } + json_name: "messages" + } + } + message_type { + name: "ListenSubscriptionsRequest" + } + message_type { + name: "SubscriptionMessage" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "id" + } + field { + name: "selector" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogSelector" + json_name: "selector" + } + field { + name: "options" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogSubscriptionOptions" + json_name: "options" + } + field { + name: "close" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "close" + } + } + message_type { + name: "PublishLogsMessage" + field { + name: "subscription_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "subscriptionId" + } + field { + name: "messages" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.LogMessage" + options { + 65001: 0 + } + json_name: "messages" + } + field { + name: "close" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "close" + } + } + message_type { + name: "PublishLogsResponse" + } + enum_type { + name: "LogStream" + value { + name: "LOG_STREAM_UNKNOWN" + number: 0 + options { + 66001: "LogStreamUnknown" + } + } + value { + name: "LOG_STREAM_STDOUT" + number: 1 + options { + 66001: "LogStreamStdout" + } + } + value { + name: "LOG_STREAM_STDERR" + number: 2 + options { + 66001: "LogStreamStderr" + } + } + options { + 62001: 0 + 62023: "LogStream" + } + } + service { + name: "Logs" + method { + name: "SubscribeLogs" + input_type: ".docker.swarmkit.v1.SubscribeLogsRequest" + output_type: ".docker.swarmkit.v1.SubscribeLogsMessage" + options { + 73626345 { + 1: "swarm-manager" + } + } + server_streaming: true + } + } + service { + name: "LogBroker" + method { + name: "ListenSubscriptions" + input_type: ".docker.swarmkit.v1.ListenSubscriptionsRequest" + output_type: ".docker.swarmkit.v1.SubscriptionMessage" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + server_streaming: true + } + method { + name: "PublishLogs" + input_type: ".docker.swarmkit.v1.PublishLogsMessage" + output_type: ".docker.swarmkit.v1.PublishLogsResponse" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + client_streaming: true + } + } + syntax: "proto3" +} +file { + name: "github.com/coreos/etcd/raft/raftpb/raft.proto" + package: "raftpb" + dependency: "gogoproto/gogo.proto" + message_type { + name: "Entry" + field { + name: "Term" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "Term" + } + field { + name: "Index" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "Index" + } + field { + name: "Type" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".raftpb.EntryType" + options { + 65001: 0 + } + json_name: "Type" + } + field { + name: "Data" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "Data" + } + } + message_type { + name: "SnapshotMetadata" + field { + name: "conf_state" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".raftpb.ConfState" + options { + 65001: 0 + } + json_name: "confState" + } + field { + name: "index" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "index" + } + field { + name: "term" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "term" + } + } + message_type { + name: "Snapshot" + field { + name: "data" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "data" + } + field { + name: "metadata" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".raftpb.SnapshotMetadata" + options { + 65001: 0 + } + json_name: "metadata" + } + } + message_type { + name: "Message" + field { + name: "type" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".raftpb.MessageType" + options { + 65001: 0 + } + json_name: "type" + } + field { + name: "to" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "to" + } + field { + name: "from" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "from" + } + field { + name: "term" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "term" + } + field { + name: "logTerm" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "logTerm" + } + field { + name: "index" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "index" + } + field { + name: "entries" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".raftpb.Entry" + options { + 65001: 0 + } + json_name: "entries" + } + field { + name: "commit" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "commit" + } + field { + name: "snapshot" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".raftpb.Snapshot" + options { + 65001: 0 + } + json_name: "snapshot" + } + field { + name: "reject" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_BOOL + options { + 65001: 0 + } + json_name: "reject" + } + field { + name: "rejectHint" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "rejectHint" + } + field { + name: "context" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "context" + } + } + message_type { + name: "HardState" + field { + name: "term" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "term" + } + field { + name: "vote" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "vote" + } + field { + name: "commit" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "commit" + } + } + message_type { + name: "ConfState" + field { + name: "nodes" + number: 1 + label: LABEL_REPEATED + type: TYPE_UINT64 + json_name: "nodes" + } + field { + name: "learners" + number: 2 + label: LABEL_REPEATED + type: TYPE_UINT64 + json_name: "learners" + } + } + message_type { + name: "ConfChange" + field { + name: "ID" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "ID" + } + field { + name: "Type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".raftpb.ConfChangeType" + options { + 65001: 0 + } + json_name: "Type" + } + field { + name: "NodeID" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65001: 0 + } + json_name: "NodeID" + } + field { + name: "Context" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BYTES + json_name: "Context" + } + } + enum_type { + name: "EntryType" + value { + name: "EntryNormal" + number: 0 + } + value { + name: "EntryConfChange" + number: 1 + } + } + enum_type { + name: "MessageType" + value { + name: "MsgHup" + number: 0 + } + value { + name: "MsgBeat" + number: 1 + } + value { + name: "MsgProp" + number: 2 + } + value { + name: "MsgApp" + number: 3 + } + value { + name: "MsgAppResp" + number: 4 + } + value { + name: "MsgVote" + number: 5 + } + value { + name: "MsgVoteResp" + number: 6 + } + value { + name: "MsgSnap" + number: 7 + } + value { + name: "MsgHeartbeat" + number: 8 + } + value { + name: "MsgHeartbeatResp" + number: 9 + } + value { + name: "MsgUnreachable" + number: 10 + } + value { + name: "MsgSnapStatus" + number: 11 + } + value { + name: "MsgCheckQuorum" + number: 12 + } + value { + name: "MsgTransferLeader" + number: 13 + } + value { + name: "MsgTimeoutNow" + number: 14 + } + value { + name: "MsgReadIndex" + number: 15 + } + value { + name: "MsgReadIndexResp" + number: 16 + } + value { + name: "MsgPreVote" + number: 17 + } + value { + name: "MsgPreVoteResp" + number: 18 + } + } + enum_type { + name: "ConfChangeType" + value { + name: "ConfChangeAddNode" + number: 0 + } + value { + name: "ConfChangeRemoveNode" + number: 1 + } + value { + name: "ConfChangeUpdateNode" + number: 2 + } + value { + name: "ConfChangeAddLearnerNode" + number: 3 + } + } + options { + 63001: 0 + 63002: 0 + 63017: 1 + 63018: 1 + 63020: 1 + } +} +file { + name: "github.com/docker/swarmkit/api/raft.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/objects.proto" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "github.com/coreos/etcd/raft/raftpb/raft.proto" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "RaftMember" + field { + name: "raft_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "raftId" + } + field { + name: "node_id" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "nodeId" + } + field { + name: "addr" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + field { + name: "status" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RaftMemberStatus" + options { + 65001: 0 + } + json_name: "status" + } + } + message_type { + name: "JoinRequest" + field { + name: "addr" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + } + message_type { + name: "JoinResponse" + field { + name: "raft_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "raftId" + } + field { + name: "members" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RaftMember" + json_name: "members" + } + field { + name: "removed_members" + number: 3 + label: LABEL_REPEATED + type: TYPE_UINT64 + options { + packed: false + } + json_name: "removedMembers" + } + } + message_type { + name: "LeaveRequest" + field { + name: "node" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RaftMember" + json_name: "node" + } + } + message_type { + name: "LeaveResponse" + } + message_type { + name: "ProcessRaftMessageRequest" + field { + name: "message" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".raftpb.Message" + json_name: "message" + } + options { + 70000: 0 + } + } + message_type { + name: "ProcessRaftMessageResponse" + } + message_type { + name: "StreamRaftMessageRequest" + field { + name: "message" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".raftpb.Message" + json_name: "message" + } + options { + 70000: 0 + } + } + message_type { + name: "StreamRaftMessageResponse" + } + message_type { + name: "ResolveAddressRequest" + field { + name: "raft_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "raftId" + } + } + message_type { + name: "ResolveAddressResponse" + field { + name: "addr" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "addr" + } + } + message_type { + name: "InternalRaftRequest" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "id" + } + field { + name: "action" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.StoreAction" + options { + 65001: 0 + } + json_name: "action" + } + } + message_type { + name: "StoreAction" + field { + name: "action" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.StoreActionKind" + json_name: "action" + } + field { + name: "node" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + oneof_index: 0 + json_name: "node" + } + field { + name: "service" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + oneof_index: 0 + json_name: "service" + } + field { + name: "task" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + oneof_index: 0 + json_name: "task" + } + field { + name: "network" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + oneof_index: 0 + json_name: "network" + } + field { + name: "cluster" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster" + oneof_index: 0 + json_name: "cluster" + } + field { + name: "secret" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + oneof_index: 0 + json_name: "secret" + } + field { + name: "resource" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + oneof_index: 0 + json_name: "resource" + } + field { + name: "extension" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Extension" + oneof_index: 0 + json_name: "extension" + } + field { + name: "config" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + oneof_index: 0 + json_name: "config" + } + oneof_decl { + name: "target" + } + } + enum_type { + name: "StoreActionKind" + value { + name: "UNKNOWN" + number: 0 + options { + 66001: "StoreActionKindUnknown" + } + } + value { + name: "STORE_ACTION_CREATE" + number: 1 + options { + 66001: "StoreActionKindCreate" + } + } + value { + name: "STORE_ACTION_UPDATE" + number: 2 + options { + 66001: "StoreActionKindUpdate" + } + } + value { + name: "STORE_ACTION_REMOVE" + number: 3 + options { + 66001: "StoreActionKindRemove" + } + } + options { + 62001: 0 + 62023: "StoreActionKind" + } + } + service { + name: "Raft" + method { + name: "ProcessRaftMessage" + input_type: ".docker.swarmkit.v1.ProcessRaftMessageRequest" + output_type: ".docker.swarmkit.v1.ProcessRaftMessageResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "StreamRaftMessage" + input_type: ".docker.swarmkit.v1.StreamRaftMessageRequest" + output_type: ".docker.swarmkit.v1.StreamRaftMessageResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + client_streaming: true + } + method { + name: "ResolveAddress" + input_type: ".docker.swarmkit.v1.ResolveAddressRequest" + output_type: ".docker.swarmkit.v1.ResolveAddressResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + } + service { + name: "RaftMembership" + method { + name: "Join" + input_type: ".docker.swarmkit.v1.JoinRequest" + output_type: ".docker.swarmkit.v1.JoinResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + method { + name: "Leave" + input_type: ".docker.swarmkit.v1.LeaveRequest" + output_type: ".docker.swarmkit.v1.LeaveResponse" + options { + 73626345 { + 1: "swarm-manager" + } + } + } + } + weak_dependency: 3 + weak_dependency: 4 + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/resource.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "AttachNetworkRequest" + field { + name: "config" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.NetworkAttachmentConfig" + json_name: "config" + } + field { + name: "container_id" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + } + message_type { + name: "AttachNetworkResponse" + field { + name: "attachment_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "attachmentId" + } + } + message_type { + name: "DetachNetworkRequest" + field { + name: "attachment_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "attachmentId" + } + } + message_type { + name: "DetachNetworkResponse" + } + service { + name: "ResourceAllocator" + method { + name: "AttachNetwork" + input_type: ".docker.swarmkit.v1.AttachNetworkRequest" + output_type: ".docker.swarmkit.v1.AttachNetworkResponse" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + } + method { + name: "DetachNetwork" + input_type: ".docker.swarmkit.v1.DetachNetworkRequest" + output_type: ".docker.swarmkit.v1.DetachNetworkResponse" + options { + 73626345 { + 1: "swarm-worker" + 1: "swarm-manager" + } + } + } + } + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/snapshot.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/objects.proto" + dependency: "github.com/docker/swarmkit/api/raft.proto" + dependency: "gogoproto/gogo.proto" + message_type { + name: "StoreSnapshot" + field { + name: "nodes" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + json_name: "nodes" + } + field { + name: "services" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + json_name: "services" + } + field { + name: "networks" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + json_name: "networks" + } + field { + name: "tasks" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + json_name: "tasks" + } + field { + name: "clusters" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster" + json_name: "clusters" + } + field { + name: "secrets" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + json_name: "secrets" + } + field { + name: "resources" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + json_name: "resources" + } + field { + name: "extensions" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Extension" + json_name: "extensions" + } + field { + name: "configs" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + json_name: "configs" + } + } + message_type { + name: "ClusterSnapshot" + field { + name: "members" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.RaftMember" + json_name: "members" + } + field { + name: "removed" + number: 2 + label: LABEL_REPEATED + type: TYPE_UINT64 + options { + packed: false + } + json_name: "removed" + } + } + message_type { + name: "Snapshot" + field { + name: "version" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.Snapshot.Version" + json_name: "version" + } + field { + name: "membership" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.ClusterSnapshot" + options { + 65001: 0 + } + json_name: "membership" + } + field { + name: "store" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.StoreSnapshot" + options { + 65001: 0 + } + json_name: "store" + } + enum_type { + name: "Version" + value { + name: "V0" + number: 0 + } + } + } + weak_dependency: 2 + syntax: "proto3" +} +file { + name: "github.com/docker/swarmkit/api/watch.proto" + package: "docker.swarmkit.v1" + dependency: "github.com/docker/swarmkit/api/specs.proto" + dependency: "github.com/docker/swarmkit/api/objects.proto" + dependency: "github.com/docker/swarmkit/api/types.proto" + dependency: "gogoproto/gogo.proto" + dependency: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto" + message_type { + name: "Object" + field { + name: "node" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Node" + oneof_index: 0 + json_name: "node" + } + field { + name: "service" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Service" + oneof_index: 0 + json_name: "service" + } + field { + name: "network" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Network" + oneof_index: 0 + json_name: "network" + } + field { + name: "task" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Task" + oneof_index: 0 + json_name: "task" + } + field { + name: "cluster" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Cluster" + oneof_index: 0 + json_name: "cluster" + } + field { + name: "secret" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Secret" + oneof_index: 0 + json_name: "secret" + } + field { + name: "resource" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Resource" + oneof_index: 0 + json_name: "resource" + } + field { + name: "extension" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Extension" + oneof_index: 0 + json_name: "extension" + } + field { + name: "config" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Config" + oneof_index: 0 + json_name: "config" + } + oneof_decl { + name: "Object" + } + } + message_type { + name: "SelectBySlot" + field { + name: "service_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ServiceID" + } + json_name: "serviceId" + } + field { + name: "slot" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "slot" + } + } + message_type { + name: "SelectByCustom" + field { + name: "kind" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "index" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "index" + } + field { + name: "value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "value" + } + } + message_type { + name: "SelectBy" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ID" + } + oneof_index: 0 + json_name: "id" + } + field { + name: "id_prefix" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "IDPrefix" + } + oneof_index: 0 + json_name: "idPrefix" + } + field { + name: "name" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "name" + } + field { + name: "name_prefix" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "namePrefix" + } + field { + name: "custom" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SelectByCustom" + oneof_index: 0 + json_name: "custom" + } + field { + name: "custom_prefix" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SelectByCustom" + oneof_index: 0 + json_name: "customPrefix" + } + field { + name: "service_id" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ServiceID" + } + oneof_index: 0 + json_name: "serviceId" + } + field { + name: "node_id" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "NodeID" + } + oneof_index: 0 + json_name: "nodeId" + } + field { + name: "slot" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SelectBySlot" + oneof_index: 0 + json_name: "slot" + } + field { + name: "desired_state" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.TaskState" + oneof_index: 0 + json_name: "desiredState" + } + field { + name: "role" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeRole" + oneof_index: 0 + json_name: "role" + } + field { + name: "membership" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.NodeSpec.Membership" + oneof_index: 0 + json_name: "membership" + } + field { + name: "referenced_network_id" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ReferencedNetworkID" + } + oneof_index: 0 + json_name: "referencedNetworkId" + } + field { + name: "referenced_secret_id" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ReferencedSecretID" + } + oneof_index: 0 + json_name: "referencedSecretId" + } + field { + name: "referenced_config_id" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_STRING + options { + 65004: "ReferencedConfigID" + } + oneof_index: 0 + json_name: "referencedConfigId" + } + field { + name: "kind" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_STRING + oneof_index: 0 + json_name: "kind" + } + oneof_decl { + name: "By" + } + } + message_type { + name: "WatchRequest" + field { + name: "entries" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.WatchRequest.WatchEntry" + json_name: "entries" + } + field { + name: "resume_from" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "resumeFrom" + } + field { + name: "include_old_object" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "includeOldObject" + } + nested_type { + name: "WatchEntry" + field { + name: "kind" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "kind" + } + field { + name: "action" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.WatchActionKind" + json_name: "action" + } + field { + name: "filters" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.SelectBy" + json_name: "filters" + } + } + } + message_type { + name: "WatchMessage" + field { + name: "events" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.WatchMessage.Event" + json_name: "events" + } + field { + name: "version" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Version" + json_name: "version" + } + nested_type { + name: "Event" + field { + name: "action" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".docker.swarmkit.v1.WatchActionKind" + json_name: "action" + } + field { + name: "object" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Object" + json_name: "object" + } + field { + name: "old_object" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".docker.swarmkit.v1.Object" + json_name: "oldObject" + } + } + } + enum_type { + name: "WatchActionKind" + value { + name: "WATCH_ACTION_UNKNOWN" + number: 0 + options { + 66001: "WatchActionKindUnknown" + } + } + value { + name: "WATCH_ACTION_CREATE" + number: 1 + options { + 66001: "WatchActionKindCreate" + } + } + value { + name: "WATCH_ACTION_UPDATE" + number: 2 + options { + 66001: "WatchActionKindUpdate" + } + } + value { + name: "WATCH_ACTION_REMOVE" + number: 4 + options { + 66001: "WatchActionKindRemove" + } + } + options { + 62001: 0 + 62023: "WatchActionKind" + } + } + service { + name: "Watch" + method { + name: "Watch" + input_type: ".docker.swarmkit.v1.WatchRequest" + output_type: ".docker.swarmkit.v1.WatchMessage" + options { + 73626345 { + 1: "swarm-manager" + } + } + server_streaming: true + } + } + syntax: "proto3" +} diff --git a/vendor/github.com/docker/swarmkit/vendor.conf b/vendor/github.com/docker/swarmkit/vendor.conf deleted file mode 100644 index fe8a3cd498..0000000000 --- a/vendor/github.com/docker/swarmkit/vendor.conf +++ /dev/null @@ -1,79 +0,0 @@ -# grpc and protobuf -# -# NOTE(dperny,cyli): there is some error handling, found in the -# (*firstSessionErrorTracker).SessionClosed method in node/node.go, which -# relies on string matching to handle x509 errors. between grpc versions 1.3.0 -# and 1.7.5, the error string we were matching changed, breaking swarmkit. -# In 1.10.x, GRPC stopped surfacing those errors entirely, breaking swarmkit. -# In >=1.11, those errors were brought back but the string had changed again. -# After updating GRPC, if integration test failures occur, verify that the -# string matching there is correct. -google.golang.org/grpc f495f5b15ae7ccda3b38c53a1bfcde4c1a58a2bc # v1.27.1 -github.com/gogo/protobuf b03c65ea87cdc3521ede29f62fe3ce239267c1bc # v1.3.2 -github.com/golang/protobuf 84668698ea25b64748563aa20726db66a6b8d299 # v1.3.5 -github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1 -google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6c7065a3160e8 - -# metrics -github.com/grpc-ecosystem/go-grpc-prometheus c225b8c3b01faf2899099b768856a9e916e5087b # v1.2.0 -github.com/docker/go-metrics b619b3592b65de4f087d9f16863a7e6ff905973c # v0.0.1 - -# etcd/raft -github.com/coreos/etcd 2c834459e1aab78a5d5219c7dfe42335fc4b617a # v3.3.25 - -# go-systemd v17 is required by github.com/coreos/pkg/capnslog/journald_formatter.go -github.com/coreos/go-systemd 39ca1b05acc7ad1220e09f133283b8859a8b71ab # v17 -github.com/coreos/pkg 97fdf19511ea361ae1c100dd393cc47f8dcfa1e1 # v4 -github.com/prometheus/client_golang 6edbbd9e560190e318cdc5b4d3e630b442858380 # v1.6.0 -github.com/prometheus/client_model 7bc5445566f0fe75b15de23e6b93886e982d7bf9 # v0.2.0 -github.com/prometheus/common d978bcb1309602d68bb4ba69cf3f8ed900e07308 # v0.9.1 -github.com/prometheus/procfs 46159f73e74d1cb8dc223deef9b2d049286f46b1 # v0.0.11 -github.com/cespare/xxhash/v2 d7df74196a9e781ede915320c11c378c1b2f3a1f # v2.1.1 - -github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 -github.com/docker/docker 471fd27709777d2cce3251129887e14e8bb2e0c7 # master / v21.xx-dev -github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0 -github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f -github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca29a810482bfb1 # v0.4.0 -github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b -github.com/opencontainers/runc b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7 # v1.0.0-rc95 -github.com/opencontainers/go-digest ea51bea511f75cfa3ef6098cc253c5c3609b037a # v1.0.0 -github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235 # v1.0.1 -github.com/ishidawataru/sctp f2269e66cdee387bd321445d5d300893449805be -github.com/containerd/containerd 36cc874494a56a253cd181a1a685b44b58a2e34a # v1.5.2 - -github.com/davecgh/go-spew 8991bc29aa16c548c550c7ff78260e27b9ab7c73 # v1.1.1 -github.com/Microsoft/go-winio 5b44b70ab3ab4d291a7c1d28afe7b4afeced0ed4 # v0.4.15 -github.com/sirupsen/logrus 6699a89a232f3db797f2e280639854bbc4b89725 # v1.7.0 -github.com/beorn7/perks 37c8de3658fcb183f997c4e13e8337516ab753e6 # v1.0.1 -github.com/cloudflare/cfssl 5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2 -github.com/dustin/go-humanize 9f541cc9db5d55bce703bd99987c9d5cb8eea45e # v1.0.0 -github.com/fernet/fernet-go 9eac43b88a5efb8651d24de9b68e87567e029736 -github.com/google/certificate-transparency-go 37a384cd035e722ea46e55029093e26687138edf # v1.0.20 -github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git -github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad -github.com/hashicorp/golang-lru 7f827b33c0f158ec5dfbba01bb0b14a4541fd81d # v0.5.3 -github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0 -github.com/phayes/permbits f7e3ac5e859d0b919c5068d581cc4c5d4f4f9bc5 -code.cloudfoundry.org/clock 02e53af36e6c978af692887ed449b74026d76fec # v1.0.0 -github.com/pkg/errors 614d223910a179a466c1767a985424175c39b465 # v0.9.1 -github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2 # v1.0.0 -github.com/rcrowley/go-metrics 51425a2415d21afadfd55cd93432c0bc69e9598d -github.com/spf13/cobra 8380ddd3132bdf8fd77731725b550c181dda0aa8 # v1.1.3 -github.com/spf13/pflag 2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab # v1.0.5 -github.com/stretchr/testify ffdc059bfe9ce6a4e144ba849dbedead332c6053 # v1.3.0 -go.etcd.io/bbolt 232d8fc87f50244f9c808f4745759e08a304c029 # v1.3.5 -golang.org/x/crypto c1f2f97bffc9c53fc40a1a28a5b460094c0050d9 -golang.org/x/net 6772e930b67bb09bf22262c7378e7d2f67cf59d1 -golang.org/x/sys d19ff857e887eacb631721f188c7d365c2331456 -golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3 -golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82 - -# ginkgo is used for testing in some places in the code. this is it and its -# sub-dependencies. -github.com/onsi/ginkgo eea6ad008b96acdaa524f5b409513bf062b500ad # v1.8.0 -github.com/onsi/gomega 90e289841c1ed79b7a598a7cd9959750cb5e89e2 # v1.5.0 -gopkg.in/yaml.v2 7649d4548cb53a614db133b2a8ac1f31859dda8c # v2.4.0 -github.com/hpcloud/tail a30252cb686a21eb2d0b98132633053ec2f7f1e5 # v1.0.0 -gopkg.in/fsnotify.v1 c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9 # v1.4.7 -gopkg.in/tomb.v1 dd632973f1e7218eb1089048e0798ec9ae7dceb8 # v1 diff --git a/vendor/github.com/fernet/fernet-go/generate.json b/vendor/github.com/fernet/fernet-go/generate.json new file mode 100644 index 0000000000..d1f3e083bf --- /dev/null +++ b/vendor/github.com/fernet/fernet-go/generate.json @@ -0,0 +1,9 @@ +[ + { + "token": "gAAAAAAdwJ6wAAECAwQFBgcICQoLDA0ODy021cpGVWKZ_eEwCGM4BLLF_5CV9dOPmrhuVUPgJobwOz7JcbmrR64jVmpU4IwqDA==", + "now": "1985-10-26T01:20:00-07:00", + "iv": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "src": "hello", + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + } +] diff --git a/vendor/github.com/fernet/fernet-go/invalid.json b/vendor/github.com/fernet/fernet-go/invalid.json new file mode 100644 index 0000000000..d80e7b4a35 --- /dev/null +++ b/vendor/github.com/fernet/fernet-go/invalid.json @@ -0,0 +1,58 @@ +[ + { + "desc": "incorrect mac", + "token": "gAAAAAAdwJ6xAAECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPAl1-szkFVzXTuGb4hR8AKtwcaX1YdykQUFBQUFBQUFBQQ==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "too short", + "token": "gAAAAAAdwJ6xAAECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPA==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "invalid base64", + "token": "%%%%%%%%%%%%%AECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPAl1-szkFVzXTuGb4hR8AKtwcaX1YdykRtfsH-p1YsUD2Q==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "payload size not multiple of block size", + "token": "gAAAAAAdwJ6xAAECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPOm73QeoCk9uGib28Xe5vz6oxq5nmxbx_v7mrfyudzUm", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "payload padding error", + "token": "gAAAAAAdwJ6xAAECAwQFBgcICQoLDA0ODz4LEpdELGQAad7aNEHbf-JkLPIpuiYRLQ3RtXatOYREu2FWke6CnJNYIbkuKNqOhw==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "far-future TS (unacceptable clock skew)", + "token": "gAAAAAAdwStRAAECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPAnja1xKYyhd-Y6mSkTOyTGJmw2Xc2a6kBd-iX9b_qXQcw==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "expired TTL", + "token": "gAAAAAAdwJ6xAAECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPAl1-szkFVzXTuGb4hR8AKtwcaX1YdykRtfsH-p1YsUD2Q==", + "now": "1985-10-26T01:21:31-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "desc": "incorrect IV (causes padding error)", + "token": "gAAAAAAdwJ6xBQECAwQFBgcICQoLDA0OD3HkMATM5lFqGaerZ-fWPAkLhFLHpGtDBRLRTZeUfWgHSv49TF2AUEZ1TIvcZjK1zQ==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + } +] diff --git a/vendor/github.com/fernet/fernet-go/verify.json b/vendor/github.com/fernet/fernet-go/verify.json new file mode 100644 index 0000000000..a4878794d7 --- /dev/null +++ b/vendor/github.com/fernet/fernet-go/verify.json @@ -0,0 +1,16 @@ +[ + { + "token": "gAAAAAAdwJ6wAAECAwQFBgcICQoLDA0ODy021cpGVWKZ_eEwCGM4BLLF_5CV9dOPmrhuVUPgJobwOz7JcbmrR64jVmpU4IwqDA==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": 60, + "src": "hello", + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + }, + { + "token": "gAAAAAAdwJ6wAAECAwQFBgcICQoLDA0ODy021cpGVWKZ_eEwCGM4BLLF_5CV9dOPmrhuVUPgJobwOz7JcbmrR64jVmpU4IwqDA==", + "now": "1985-10-26T01:20:01-07:00", + "ttl_sec": -1, + "src": "hello", + "secret": "cw_0x689RpI-jtRR7oE8h_eQsKImvJapLeSbXpwF4e4=" + } +] diff --git a/vendor/github.com/fluent/fluent-logger-golang/README.md b/vendor/github.com/fluent/fluent-logger-golang/README.md deleted file mode 100644 index d0b6b23161..0000000000 --- a/vendor/github.com/fluent/fluent-logger-golang/README.md +++ /dev/null @@ -1,187 +0,0 @@ -fluent-logger-golang -==== - -[![Build Status](https://github.com/fluent/fluent-logger-golang/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/fluent/fluent-logger-golang/actions) -[![GoDoc](https://godoc.org/github.com/fluent/fluent-logger-golang/fluent?status.svg)](https://godoc.org/github.com/fluent/fluent-logger-golang/fluent) - -## A structured event logger for Fluentd (Golang) - -## How to install - -``` -go get github.com/fluent/fluent-logger-golang/fluent -``` - -## Usage - -Install the package with `go get` and use `import` to include it in your project. - -``` -import "github.com/fluent/fluent-logger-golang/fluent" -``` - -## Example - -```go -package main - -import ( - "github.com/fluent/fluent-logger-golang/fluent" - "fmt" - //"time" -) - -func main() { - logger, err := fluent.New(fluent.Config{}) - if err != nil { - fmt.Println(err) - } - defer logger.Close() - tag := "myapp.access" - var data = map[string]string{ - "foo": "bar", - "hoge": "hoge", - } - error := logger.Post(tag, data) - // error := logger.PostWithTime(tag, time.Now(), data) - if error != nil { - panic(error) - } -} -``` - -`data` must be a value like `map[string]literal`, `map[string]interface{}`, `struct` or [`msgp.Marshaler`](http://godoc.org/github.com/tinylib/msgp/msgp#Marshaler). Logger refers tags `msg` or `codec` of each fields of structs. - -## Setting config values - -```go -f := fluent.New(fluent.Config{FluentPort: 80, FluentHost: "example.com"}) -``` - -### FluentNetwork - -Specify the network protocol. The supported values are: - - * "tcp" (use `FluentHost` and `FluentPort`) - * "tls" (use`FluentHost` and `FluentPort`) - * "unix" (use `FluentSocketPath`) - -The default is "tcp". - -### FluentHost - -Specify a hostname or IP address as a string for the destination of the "tcp" protocol. -The default is "127.0.0.1". - -### FluentPort - -Specify the TCP port of the destination. The default is 24224. - -### FluentSocketPath - -Specify the unix socket path when `FluentNetwork` is "unix". - -### Timeout - -Set the timeout value of `time.Duration` to connect to the destination. -The default is 3 seconds. - -### WriteTimeout - -Sets the timeout value of `time.Duration` for Write call of `logger.Post`. -Since the default is zero value, Write will not time out. - -### BufferLimit - -Sets the number of events buffered on the memory. Records will be stored in memory up to this number. If the buffer is full, the call to record logs will fail. -The default is 8192. - -### RetryWait - -Set the duration of the initial wait for the first retry, in milliseconds. The actual retry wait will be `r * 1.5^(N-1)` (r: this value, N: the number of retries). -The default is 500. - -### MaxRetry - -Sets the maximum number of retries. If the number of retries become larger than this value, the write/send operation will fail. -The default is 13. - -### MaxRetryWait - -The maximum duration of wait between retries, in milliseconds. If the calculated retry wait is larger than this value, the actual retry wait will be this value. -The default is 60,000 (60 seconds). - -### TagPrefix - -Sets the prefix string of the tag. Prefix will be appended with a dot `.`, like `ppp.tag` (ppp: the value of this parameter, tag: the tag string specified in a call). -The default is blank. - -### Async - -Enable asynchronous I/O (connect and write) for sending events to Fluentd. -The default is false. - -### ForceStopAsyncSend - -When Async is enabled, immediately discard the event queue on close() and return (instead of trying MaxRetry times for each event in the queue before returning) -The default is false. - -### AsyncResultCallback - -When Async is enabled, if this is callback is provided, it will be called on every write to Fluentd. The callback function -takes two arguments - a `[]byte` of the message that was to be sent and an `error`. If the `error` is not nil this means the -delivery of the message was unsuccessful. - -### AsyncReconnectInterval -When async is enabled, this option defines the interval (ms) at which the connection -to the fluentd-address is re-established. This option is useful if the address -may resolve to one or more IP addresses, e.g. a Consul service address. - -### SubSecondPrecision - -Enable time encoding as EventTime, which contains sub-second precision values. The messages encoded with this option can be received only by Fluentd v0.14 or later. -The default is false. - -### MarshalAsJson - -Enable Json data marshaling to send messages using Json format (instead of the standard MessagePack). It is supported by Fluentd `in_forward` plugin. -The default is false. - -### RequestAck - -Sets whether to request acknowledgment from Fluentd to increase the reliability -of the connection. The default is false. - -### TlsInsecureSkipVerify - -Skip verifying the server certificate. Useful for development and testing. The default is false. - -## FAQ - -### Does this logger support the features of Fluentd Forward Protocol v1? - -"the features" includes heartbeat messages (for TCP keepalive), TLS transport and shared key authentication. - -This logger doesn't support those features. Patches are welcome! - -### Is it allowed to call `Fluent.Post()` after connection close? - -Before v1.8.0, the Fluent logger silently reopened connections whenever -`Fluent.Post()` was called. - -```go -logger, _ := fluent.New(fluent.Config{}) -logger.Post(tag, data) -logger.Close() -logger.Post(tag, data) /* reopen connection */ -``` - -However, this behavior was confusing, in particular when multiple goroutines -were involved. Starting v1.8.0, the logger no longer accepts `Fluent.Post()` -after `Fluent.Close()`, and instead returns a "Logger already closed" error. - -## Tests -``` - -go test -``` diff --git a/vendor/github.com/fsnotify/fsnotify/.gitattributes b/vendor/github.com/fsnotify/fsnotify/.gitattributes new file mode 100644 index 0000000000..32f1001be0 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.gitattributes @@ -0,0 +1 @@ +go.sum linguist-generated diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore new file mode 100644 index 0000000000..4cd0cbaf43 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.gitignore @@ -0,0 +1,6 @@ +# Setup a Global .gitignore for OS and editor generated files: +# https://help.github.com/articles/ignoring-files +# git config --global core.excludesfile ~/.gitignore_global + +.vagrant +*.sublime-project diff --git a/vendor/github.com/fsnotify/fsnotify/.travis.yml b/vendor/github.com/fsnotify/fsnotify/.travis.yml new file mode 100644 index 0000000000..a9c30165cd --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.travis.yml @@ -0,0 +1,36 @@ +sudo: false +language: go + +go: + - "stable" + - "1.11.x" + - "1.10.x" + - "1.9.x" + +matrix: + include: + - go: "stable" + env: GOLINT=true + allow_failures: + - go: tip + fast_finish: true + + +before_install: + - if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi + +script: + - go test --race ./... + +after_script: + - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" + - if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi + - go vet ./... + +os: + - linux + - osx + - windows + +notifications: + email: false diff --git a/vendor/github.com/fsnotify/fsnotify/AUTHORS b/vendor/github.com/fsnotify/fsnotify/AUTHORS new file mode 100644 index 0000000000..5ab5d41c54 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/AUTHORS @@ -0,0 +1,52 @@ +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# You can update this list using the following command: +# +# $ git shortlog -se | awk '{print $2 " " $3 " " $4}' + +# Please keep the list sorted. + +Aaron L +Adrien Bustany +Amit Krishnan +Anmol Sethi +Bjørn Erik Pedersen +Bruno Bigras +Caleb Spare +Case Nelson +Chris Howey +Christoffer Buchholz +Daniel Wagner-Hall +Dave Cheney +Evan Phoenix +Francisco Souza +Hari haran +John C Barstow +Kelvin Fo +Ken-ichirou MATSUZAWA +Matt Layher +Nathan Youngman +Nickolai Zeldovich +Patrick +Paul Hammond +Pawel Knap +Pieter Droogendijk +Pursuit92 +Riku Voipio +Rob Figueiredo +Rodrigo Chiossi +Slawek Ligus +Soge Zhang +Tiffany Jernigan +Tilak Sharma +Tom Payne +Travis Cline +Tudor Golubenco +Vahe Khachikyan +Yukang +bronze1man +debrando +henrikedwards +铁哥 diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md new file mode 100644 index 0000000000..be4d7ea2c1 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md @@ -0,0 +1,317 @@ +# Changelog + +## v1.4.7 / 2018-01-09 + +* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine) +* Tests: Fix missing verb on format string (thanks @rchiossi) +* Linux: Fix deadlock in Remove (thanks @aarondl) +* Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne) +* Docs: Moved FAQ into the README (thanks @vahe) +* Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich) +* Docs: replace references to OS X with macOS + +## v1.4.2 / 2016-10-10 + +* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) + +## v1.4.1 / 2016-10-04 + +* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) + +## v1.4.0 / 2016-10-01 + +* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) + +## v1.3.1 / 2016-06-28 + +* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) + +## v1.3.0 / 2016-04-19 + +* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) + +## v1.2.10 / 2016-03-02 + +* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) + +## v1.2.9 / 2016-01-13 + +kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) + +## v1.2.8 / 2015-12-17 + +* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) +* inotify: fix race in test +* enable race detection for continuous integration (Linux, Mac, Windows) + +## v1.2.5 / 2015-10-17 + +* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) +* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) +* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) +* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) + +## v1.2.1 / 2015-10-14 + +* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) + +## v1.2.0 / 2015-02-08 + +* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) +* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) +* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) + +## v1.1.1 / 2015-02-05 + +* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) + +## v1.1.0 / 2014-12-12 + +* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) + * add low-level functions + * only need to store flags on directories + * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) + * done can be an unbuffered channel + * remove calls to os.NewSyscallError +* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) +* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) +* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) + +## v1.0.4 / 2014-09-07 + +* kqueue: add dragonfly to the build tags. +* Rename source code files, rearrange code so exported APIs are at the top. +* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) + +## v1.0.3 / 2014-08-19 + +* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) + +## v1.0.2 / 2014-08-17 + +* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) +* [Fix] Make ./path and path equivalent. (thanks @zhsso) + +## v1.0.0 / 2014-08-15 + +* [API] Remove AddWatch on Windows, use Add. +* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) +* Minor updates based on feedback from golint. + +## dev / 2014-07-09 + +* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). +* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) + +## dev / 2014-07-04 + +* kqueue: fix incorrect mutex used in Close() +* Update example to demonstrate usage of Op. + +## dev / 2014-06-28 + +* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) +* Fix for String() method on Event (thanks Alex Brainman) +* Don't build on Plan 9 or Solaris (thanks @4ad) + +## dev / 2014-06-21 + +* Events channel of type Event rather than *Event. +* [internal] use syscall constants directly for inotify and kqueue. +* [internal] kqueue: rename events to kevents and fileEvent to event. + +## dev / 2014-06-19 + +* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). +* [internal] remove cookie from Event struct (unused). +* [internal] Event struct has the same definition across every OS. +* [internal] remove internal watch and removeWatch methods. + +## dev / 2014-06-12 + +* [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). +* [API] Pluralized channel names: Events and Errors. +* [API] Renamed FileEvent struct to Event. +* [API] Op constants replace methods like IsCreate(). + +## dev / 2014-06-12 + +* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) + +## dev / 2014-05-23 + +* [API] Remove current implementation of WatchFlags. + * current implementation doesn't take advantage of OS for efficiency + * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes + * no tests for the current implementation + * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) + +## v0.9.3 / 2014-12-31 + +* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) + +## v0.9.2 / 2014-08-17 + +* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) + +## v0.9.1 / 2014-06-12 + +* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) + +## v0.9.0 / 2014-01-17 + +* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) +* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) +* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. + +## v0.8.12 / 2013-11-13 + +* [API] Remove FD_SET and friends from Linux adapter + +## v0.8.11 / 2013-11-02 + +* [Doc] Add Changelog [#72][] (thanks @nathany) +* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) + +## v0.8.10 / 2013-10-19 + +* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) +* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) +* [Doc] specify OS-specific limits in README (thanks @debrando) + +## v0.8.9 / 2013-09-08 + +* [Doc] Contributing (thanks @nathany) +* [Doc] update package path in example code [#63][] (thanks @paulhammond) +* [Doc] GoCI badge in README (Linux only) [#60][] +* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) + +## v0.8.8 / 2013-06-17 + +* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) + +## v0.8.7 / 2013-06-03 + +* [API] Make syscall flags internal +* [Fix] inotify: ignore event changes +* [Fix] race in symlink test [#45][] (reported by @srid) +* [Fix] tests on Windows +* lower case error messages + +## v0.8.6 / 2013-05-23 + +* kqueue: Use EVT_ONLY flag on Darwin +* [Doc] Update README with full example + +## v0.8.5 / 2013-05-09 + +* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) + +## v0.8.4 / 2013-04-07 + +* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) + +## v0.8.3 / 2013-03-13 + +* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) +* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) + +## v0.8.2 / 2013-02-07 + +* [Doc] add Authors +* [Fix] fix data races for map access [#29][] (thanks @fsouza) + +## v0.8.1 / 2013-01-09 + +* [Fix] Windows path separators +* [Doc] BSD License + +## v0.8.0 / 2012-11-09 + +* kqueue: directory watching improvements (thanks @vmirage) +* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) +* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) + +## v0.7.4 / 2012-10-09 + +* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) +* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) +* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) +* [Fix] kqueue: modify after recreation of file + +## v0.7.3 / 2012-09-27 + +* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) +* [Fix] kqueue: no longer get duplicate CREATE events + +## v0.7.2 / 2012-09-01 + +* kqueue: events for created directories + +## v0.7.1 / 2012-07-14 + +* [Fix] for renaming files + +## v0.7.0 / 2012-07-02 + +* [Feature] FSNotify flags +* [Fix] inotify: Added file name back to event path + +## v0.6.0 / 2012-06-06 + +* kqueue: watch files after directory created (thanks @tmc) + +## v0.5.1 / 2012-05-22 + +* [Fix] inotify: remove all watches before Close() + +## v0.5.0 / 2012-05-03 + +* [API] kqueue: return errors during watch instead of sending over channel +* kqueue: match symlink behavior on Linux +* inotify: add `DELETE_SELF` (requested by @taralx) +* [Fix] kqueue: handle EINTR (reported by @robfig) +* [Doc] Godoc example [#1][] (thanks @davecheney) + +## v0.4.0 / 2012-03-30 + +* Go 1 released: build with go tool +* [Feature] Windows support using winfsnotify +* Windows does not have attribute change notifications +* Roll attribute notifications into IsModify + +## v0.3.0 / 2012-02-19 + +* kqueue: add files when watch directory + +## v0.2.0 / 2011-12-30 + +* update to latest Go weekly code + +## v0.1.0 / 2011-10-19 + +* kqueue: add watch on file creation to match inotify +* kqueue: create file event +* inotify: ignore `IN_IGNORED` events +* event String() +* linux: common FileEvent functions +* initial commit + +[#79]: https://github.com/howeyc/fsnotify/pull/79 +[#77]: https://github.com/howeyc/fsnotify/pull/77 +[#72]: https://github.com/howeyc/fsnotify/issues/72 +[#71]: https://github.com/howeyc/fsnotify/issues/71 +[#70]: https://github.com/howeyc/fsnotify/issues/70 +[#63]: https://github.com/howeyc/fsnotify/issues/63 +[#62]: https://github.com/howeyc/fsnotify/issues/62 +[#60]: https://github.com/howeyc/fsnotify/issues/60 +[#59]: https://github.com/howeyc/fsnotify/issues/59 +[#49]: https://github.com/howeyc/fsnotify/issues/49 +[#45]: https://github.com/howeyc/fsnotify/issues/45 +[#40]: https://github.com/howeyc/fsnotify/issues/40 +[#36]: https://github.com/howeyc/fsnotify/issues/36 +[#33]: https://github.com/howeyc/fsnotify/issues/33 +[#29]: https://github.com/howeyc/fsnotify/issues/29 +[#25]: https://github.com/howeyc/fsnotify/issues/25 +[#24]: https://github.com/howeyc/fsnotify/issues/24 +[#21]: https://github.com/howeyc/fsnotify/issues/21 diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md new file mode 100644 index 0000000000..828a60b24b --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md @@ -0,0 +1,77 @@ +# Contributing + +## Issues + +* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues). +* Please indicate the platform you are using fsnotify on. +* A code example to reproduce the problem is appreciated. + +## Pull Requests + +### Contributor License Agreement + +fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual). + +Please indicate that you have signed the CLA in your pull request. + +### How fsnotify is Developed + +* Development is done on feature branches. +* Tests are run on BSD, Linux, macOS and Windows. +* Pull requests are reviewed and [applied to master][am] using [hub][]. + * Maintainers may modify or squash commits rather than asking contributors to. +* To issue a new release, the maintainers will: + * Update the CHANGELOG + * Tag a version, which will become available through gopkg.in. + +### How to Fork + +For smooth sailing, always use the original import path. Installing with `go get` makes this easy. + +1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`) +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Ensure everything works and the tests pass (see below) +4. Commit your changes (`git commit -am 'Add some feature'`) + +Contribute upstream: + +1. Fork fsnotify on GitHub +2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`) +3. Push to the branch (`git push fork my-new-feature`) +4. Create a new Pull Request on GitHub + +This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/). + +### Testing + +fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows. + +Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on. + +To aid in cross-platform testing there is a Vagrantfile for Linux and BSD. + +* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) +* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder. +* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password) +* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`. +* When you're done, you will want to halt or destroy the Vagrant boxes. + +Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory. + +Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads). + +### Maintainers + +Help maintaining fsnotify is welcome. To be a maintainer: + +* Submit a pull request and sign the CLA as above. +* You must be able to run the test suite on Mac, Windows, Linux and BSD. + +To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][]. + +All code changes should be internal pull requests. + +Releases are tagged using [Semantic Versioning](http://semver.org/). + +[hub]: https://github.com/github/hub +[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs diff --git a/vendor/github.com/fsnotify/fsnotify/go.mod b/vendor/github.com/fsnotify/fsnotify/go.mod deleted file mode 100644 index ff11e13f22..0000000000 --- a/vendor/github.com/fsnotify/fsnotify/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/fsnotify/fsnotify - -go 1.13 - -require golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 diff --git a/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md b/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md new file mode 100644 index 0000000000..c88f9b2bdd --- /dev/null +++ b/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# How to Contribute + +## Getting Started + +- Fork the repository on GitHub +- Read the [README](README.markdown) for build and test instructions +- Play with the project, submit bugs, submit patches! + +## Contribution Flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where you want to base your work (usually master). +- Make commits of logical units. +- Make sure your commit messages are in the proper format (see below). +- Push your changes to a topic branch in your fork of the repository. +- Make sure the tests pass, and add any new tests as appropriate. +- Submit a pull request to the original repository. + +Thanks for your contributions! + +### 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 you can easily kill and +start for debugging. + +Fixes #38 +``` + +The format can be described more formally as follows: + +``` +: + + + +