From 2501f6ef0f90edcaee4643247305e7ed2014eb79 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 12 Oct 2024 14:42:56 +0200 Subject: [PATCH] csi: remove unused startMockServer and github.com/rexray/gocsi dependency This utility was used in manager/volumes/volumes_test.go, which got deleted in b0a1aa66decad17f9be00ecdfcff2f457ddcf10f, making the startMockServer unused. Remove the file, so that we can remove the problematic github.com/rexray/gocsi dependency, which is unmaintained, and required us to use Drew's fork to prevent legacy dependencies from being pulled in through the indirect github.com/coreos/etcd/clientv3 dependency; go: finding module for package github.com/coreos/etcd/clientv3/concurrency go: finding module for package github.com/coreos/etcd/clientv3 go: found github.com/coreos/etcd/clientv3 in github.com/coreos/etcd v3.3.27+incompatible go: found github.com/coreos/etcd/clientv3/concurrency in github.com/coreos/etcd v3.3.27+incompatible go: finding module for package github.com/coreos/go-systemd/journal go: finding module for package github.com/coreos/pkg/capnslog go: found github.com/coreos/pkg/capnslog in github.com/coreos/pkg v0.0.0-20240122114842-bbd7aa9bf6fb go: found github.com/coreos/go-systemd/journal in github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf The above resolution resulted in these legacy versions to be added; 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-20240122114842-bbd7aa9bf6fb // indirect Signed-off-by: Sebastiaan van Stijn --- go.mod | 12 +- go.sum | 12 - manager/csi/csi_mock_test.go | 51 -- swarmd/go.work.sum | 625 +++++++++++++ vendor/github.com/akutz/gosync/.gitignore | 17 - vendor/github.com/akutz/gosync/.travis.yml | 35 - vendor/github.com/akutz/gosync/LICENSE | 201 ----- vendor/github.com/akutz/gosync/README.md | 13 - vendor/github.com/akutz/gosync/VERSION | 1 - vendor/github.com/akutz/gosync/trymutex.go | 80 -- vendor/github.com/akutz/memconn/.gitignore | 414 --------- vendor/github.com/akutz/memconn/.travis.yml | 21 - vendor/github.com/akutz/memconn/LICENSE | 201 ----- vendor/github.com/akutz/memconn/Makefile | 31 - vendor/github.com/akutz/memconn/README.md | 38 - vendor/github.com/akutz/memconn/VERSION | 1 - vendor/github.com/akutz/memconn/memconn.go | 110 --- .../github.com/akutz/memconn/memconn_addr.go | 25 - .../github.com/akutz/memconn/memconn_conn.go | 434 --------- .../akutz/memconn/memconn_listener.go | 105 --- .../github.com/akutz/memconn/memconn_pipe.go | 265 ------ .../akutz/memconn/memconn_provider.go | 245 ------ vendor/github.com/rexray/gocsi/.gitignore | 36 - vendor/github.com/rexray/gocsi/.travis.yml | 45 - .../github.com/rexray/gocsi/CONTRIBUTING.md | 248 ------ vendor/github.com/rexray/gocsi/LICENSE | 201 ----- vendor/github.com/rexray/gocsi/Makefile | 202 ----- vendor/github.com/rexray/gocsi/README.md | 441 ---------- vendor/github.com/rexray/gocsi/VERSION | 1 - .../rexray/gocsi/context/context.go | 128 --- vendor/github.com/rexray/gocsi/envvars.go | 331 ------- vendor/github.com/rexray/gocsi/gocsi.go | 548 ------------ vendor/github.com/rexray/gocsi/gocsi.sh | 362 -------- vendor/github.com/rexray/gocsi/middleware.go | 243 ----- .../middleware/logging/logging_interceptor.go | 199 ----- .../requestid/request_id_injector.go | 108 --- .../serialvolume/default_lock_provider.go | 41 - .../serialvolume/serial_volume_locker.go | 226 ----- .../types/volume_lock_provider.go | 21 - .../specvalidator/spec_validator.go | 827 ------------------ .../rexray/gocsi/mock/provider/provider.go | 49 -- .../rexray/gocsi/mock/service/controller.go | 442 ---------- .../rexray/gocsi/mock/service/identity.go | 55 -- .../rexray/gocsi/mock/service/node.go | 153 ---- .../rexray/gocsi/mock/service/service.go | 115 --- vendor/github.com/rexray/gocsi/usage.go | 269 ------ vendor/github.com/rexray/gocsi/utils/utils.go | 682 --------------- .../rexray/gocsi/utils/utils_middleware.go | 132 --- .../rexray/gocsi/utils/utils_rpcs.go | 26 - vendor/modules.txt | 19 - 50 files changed, 628 insertions(+), 8459 deletions(-) delete mode 100644 manager/csi/csi_mock_test.go delete mode 100644 vendor/github.com/akutz/gosync/.gitignore delete mode 100644 vendor/github.com/akutz/gosync/.travis.yml delete mode 100644 vendor/github.com/akutz/gosync/LICENSE delete mode 100644 vendor/github.com/akutz/gosync/README.md delete mode 100644 vendor/github.com/akutz/gosync/VERSION delete mode 100644 vendor/github.com/akutz/gosync/trymutex.go delete mode 100644 vendor/github.com/akutz/memconn/.gitignore delete mode 100644 vendor/github.com/akutz/memconn/.travis.yml delete mode 100644 vendor/github.com/akutz/memconn/LICENSE delete mode 100644 vendor/github.com/akutz/memconn/Makefile delete mode 100644 vendor/github.com/akutz/memconn/README.md delete mode 100644 vendor/github.com/akutz/memconn/VERSION delete mode 100644 vendor/github.com/akutz/memconn/memconn.go delete mode 100644 vendor/github.com/akutz/memconn/memconn_addr.go delete mode 100644 vendor/github.com/akutz/memconn/memconn_conn.go delete mode 100644 vendor/github.com/akutz/memconn/memconn_listener.go delete mode 100644 vendor/github.com/akutz/memconn/memconn_pipe.go delete mode 100644 vendor/github.com/akutz/memconn/memconn_provider.go delete mode 100644 vendor/github.com/rexray/gocsi/.gitignore delete mode 100644 vendor/github.com/rexray/gocsi/.travis.yml delete mode 100644 vendor/github.com/rexray/gocsi/CONTRIBUTING.md delete mode 100644 vendor/github.com/rexray/gocsi/LICENSE delete mode 100644 vendor/github.com/rexray/gocsi/Makefile delete mode 100644 vendor/github.com/rexray/gocsi/README.md delete mode 100644 vendor/github.com/rexray/gocsi/VERSION delete mode 100644 vendor/github.com/rexray/gocsi/context/context.go delete mode 100644 vendor/github.com/rexray/gocsi/envvars.go delete mode 100644 vendor/github.com/rexray/gocsi/gocsi.go delete mode 100644 vendor/github.com/rexray/gocsi/gocsi.sh delete mode 100644 vendor/github.com/rexray/gocsi/middleware.go delete mode 100644 vendor/github.com/rexray/gocsi/middleware/logging/logging_interceptor.go delete mode 100644 vendor/github.com/rexray/gocsi/middleware/requestid/request_id_injector.go delete mode 100644 vendor/github.com/rexray/gocsi/middleware/serialvolume/default_lock_provider.go delete mode 100644 vendor/github.com/rexray/gocsi/middleware/serialvolume/serial_volume_locker.go delete mode 100644 vendor/github.com/rexray/gocsi/middleware/serialvolume/types/volume_lock_provider.go delete mode 100644 vendor/github.com/rexray/gocsi/middleware/specvalidator/spec_validator.go delete mode 100644 vendor/github.com/rexray/gocsi/mock/provider/provider.go delete mode 100644 vendor/github.com/rexray/gocsi/mock/service/controller.go delete mode 100644 vendor/github.com/rexray/gocsi/mock/service/identity.go delete mode 100644 vendor/github.com/rexray/gocsi/mock/service/node.go delete mode 100644 vendor/github.com/rexray/gocsi/mock/service/service.go delete mode 100644 vendor/github.com/rexray/gocsi/usage.go delete mode 100644 vendor/github.com/rexray/gocsi/utils/utils.go delete mode 100644 vendor/github.com/rexray/gocsi/utils/utils_middleware.go delete mode 100644 vendor/github.com/rexray/gocsi/utils/utils_rpcs.go diff --git a/go.mod b/go.mod index 8a71a6cc12..7c069b65c2 100644 --- a/go.mod +++ b/go.mod @@ -5,14 +5,12 @@ go 1.18 require ( code.cloudfoundry.org/clock v1.1.0 github.com/Microsoft/go-winio v0.6.1 - github.com/akutz/memconn v0.1.0 github.com/bits-and-blooms/bitset v1.13.0 github.com/cloudflare/cfssl v1.6.4 github.com/container-storage-interface/spec v1.2.0 github.com/distribution/reference v0.5.0 github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c github.com/docker/go-metrics v0.0.1 - github.com/dustin/go-humanize v1.0.0 // indirect github.com/fernet/fernet-go v0.0.0-20211208181803-9f70042a33ee github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.3 @@ -23,12 +21,9 @@ require ( github.com/opencontainers/go-digest v1.0.0 github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.14.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a - github.com/rexray/gocsi v1.2.2 // replaced; see replace rules for the version used. github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 - github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.4 go.etcd.io/bbolt v1.3.7 go.etcd.io/etcd/client/pkg/v3 v3.5.6 @@ -56,10 +51,10 @@ require ( ) require ( - github.com/akutz/gosync v0.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/google/certificate-transparency-go v1.1.4 // indirect @@ -71,9 +66,11 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b // indirect github.com/zmap/zcrypto v0.0.0-20210511125630-18f1e0152cfc // indirect github.com/zmap/zlint/v3 v3.1.0 // indirect @@ -90,6 +87,3 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.90.1 // indirect ) - -// Removes etcd dependency -replace github.com/rexray/gocsi => github.com/dperny/gocsi v1.2.3-pre diff --git a/go.sum b/go.sum index d85a0bb411..3e2525d62c 100644 --- a/go.sum +++ b/go.sum @@ -18,10 +18,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/akutz/gosync v0.1.0 h1:naxPT/aDYDh79PMwM3XmencmNQeYmpNFSZy4ZE9zIW0= -github.com/akutz/gosync v0.1.0/go.mod h1:I8I4aiqJI1nqaeYOOB1WS+CgRJVVPqhct9Y4njywM84= -github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A= -github.com/akutz/memconn v0.1.0/go.mod h1:Jo8rI7m0NieZyLI5e2CDlRdRqRRB4S7Xp77ukDjH+Fw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -86,8 +82,6 @@ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ 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/dperny/gocsi v1.2.3-pre h1:GRTvl8G6yEXYPyul1h6YAqtyxzUHTrQHo6G3xZpb9oM= -github.com/dperny/gocsi v1.2.3-pre/go.mod h1:qQw5mIunz1RqMUfZcGJ9/Lt9EDaL0N3wPNYxFTuyLQo= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -271,13 +265,11 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.4.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= -github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= @@ -352,12 +344,10 @@ github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.0/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= @@ -373,8 +363,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tedsuo/ifrit v0.0.0-20230330192023-5cba443a66c4 h1:MGZzzxBuPuK4J0XQo+0uy0NnXQGKzHXhYp5oG1Wy860= -github.com/thecodeteam/gosync v0.1.0 h1:RcD9owCaiK0Jg1rIDPgirdcLCL1jCD6XlDVSg0MfHmE= -github.com/thecodeteam/gosync v0.1.0/go.mod h1:43QHsngcnWc8GE1aCmi7PEypslflHjCzXFleuWKEb00= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/weppos/publicsuffix-go v0.13.1-0.20210123135404-5fd73613514e/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= diff --git a/manager/csi/csi_mock_test.go b/manager/csi/csi_mock_test.go deleted file mode 100644 index 681465d23e..0000000000 --- a/manager/csi/csi_mock_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package csi - -import ( - "context" - "fmt" - "net" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "github.com/akutz/memconn" - "github.com/rexray/gocsi/mock/provider" - "google.golang.org/grpc" -) - -// startMockServer is strongly based on the function of the equivalent name in -// the github.com/rexray/gocsi/testing package. It creates a mock CSI storage -// provider which can be used for testing. name indicates the name of the mock, -// which allows for testing situation with multiple CSI drivers installed. -// -// returns a client connection to a new mock CSI provider, and a cancel -// function to call when cleaing up. -func startMockServer(ctx context.Context, name string) (*grpc.ClientConn, func()) { - sp := provider.New() - // the memconn package lets us avoid the use of a unix domain socket, which - // helps make the tests more portable. - lis, err := memconn.Listen("memu", fmt.Sprintf("csi-test-%v", name)) - Expect(err).To(BeNil()) - - go func() { - defer GinkgoRecover() - if err := sp.Serve(ctx, lis); err != nil { - Expect(err).To(Equal("http: Server closed")) - } - }() - - clientOpts := []grpc.DialOption{ - grpc.WithInsecure(), - grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) { - return memconn.Dial("memu", fmt.Sprintf("csi-test-%v", name)) - }), - } - - client, err := grpc.DialContext(ctx, "", clientOpts...) - Expect(err).ToNot(HaveOccurred()) - - return client, func() { - lis.Close() - sp.GracefulStop(ctx) - } -} diff --git a/swarmd/go.work.sum b/swarmd/go.work.sum index 901cdf599d..02b6cb16da 100644 --- a/swarmd/go.work.sum +++ b/swarmd/go.work.sum @@ -1 +1,626 @@ +bitbucket.org/creachadair/shell v0.0.7 h1:Z96pB6DkSb7F3Y3BBnJeOZH2gazyMTWlvecSD4vDqfk= +bitbucket.org/creachadair/shell v0.0.7/go.mod h1:oqtXSSvSYr4624lnnabXHaBsYW6RD80caLi2b3hJk0U= +bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c h1:bkb2NMGo3/Du52wvYj9Whth5KZfMV6d3O0Vbr3nz/UE= +bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c/go.mod h1:hSVuE3qU7grINVSwrmzHfpg9k87ALBk+XaualNyUzI4= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go/accessapproval v1.6.0 h1:x0cEHro/JFPd7eS4BlEWNTMecIj2HdXjOVB5BtvwER0= +cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= +cloud.google.com/go/accesscontextmanager v1.6.0 h1:r7DpDlWkCMtH/w+gu6Yq//EeYgNWSUbR1+n8ZYr4YWk= +cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= +cloud.google.com/go/aiplatform v1.35.0 h1:8frB0cIswlhVnYnGrMr+JjZaNC7DHZahvoGHpU9n+RY= +cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= +cloud.google.com/go/analytics v0.18.0 h1:uN80RHQeT2jGA3uAFDZSBnKdful4bFw0IHJV6t3EkqU= +cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= +cloud.google.com/go/apigateway v1.5.0 h1:ZI9mVO7x3E9RK/BURm2p1aw9YTBSCQe3klmyP1WxWEg= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +cloud.google.com/go/apigeeconnect v1.5.0 h1:sWOmgDyAsi1AZ48XRHcATC0tsi9SkPT7DA/+VCfkaeA= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeregistry v0.5.0 h1:BwTPDPTBlYIoQGiwtRUsNFRDZ24cT/02Xb3yFH614YQ= +cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= +cloud.google.com/go/apikeys v0.5.0 h1:+77+/BhFuU476/s78kYiWHObxaYBHsC6Us+Gd7W9pJ4= +cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +cloud.google.com/go/appengine v1.6.0 h1:uTDtjzuHpig1lrf8lycxNSKrthiTDgXnadu+WxYEKxQ= +cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= +cloud.google.com/go/area120 v0.7.1 h1:ugckkFh4XkHJMPhTIx0CyvdoBxmOpMe8rNs4Ok8GAag= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= +cloud.google.com/go/artifactregistry v1.11.2 h1:G9kjfHsDto5AdKK93hkHWHsY9Oe+6Nv66i7o/KgUO8E= +cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= +cloud.google.com/go/asset v1.11.1 h1:yObuRcVfexhYQuIWbjNt+9PVPikXIRhERXZxga7qAAY= +cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= +cloud.google.com/go/assuredworkloads v1.10.0 h1:VLGnVFta+N4WM+ASHbhc14ZOItOabDLH1MSoDv+Xuag= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= +cloud.google.com/go/automl v1.12.0 h1:50VugllC+U4IGl3tDNcZaWvApHBTrn/TvyHDJ0wM+Uw= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +cloud.google.com/go/baremetalsolution v0.5.0 h1:2AipdYXL0VxMboelTTw8c1UJ7gYu35LZYUbuRv9Q28s= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/batch v0.7.0 h1:YbMt0E6BtqeD5FvSv1d56jbVsWEzlGm55lYte+M6Mzs= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/beyondcorp v0.4.0 h1:qwXDVYf4fQ9DrKci8/40X1zaKYxzYK07vSdPeI9mEQw= +cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= +cloud.google.com/go/bigquery v1.48.0 h1:u+fhS1jJOkPO9vdM84M8HO5VznTfVUicBeoXNKD26ho= +cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= +cloud.google.com/go/billing v1.12.0 h1:k8pngyiI8uAFhVAhH5+iXSa3Me406XW17LYWZ/3Fr84= +cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= +cloud.google.com/go/binaryauthorization v1.5.0 h1:d3pMDBCCNivxt5a4eaV7FwL7cSH0H7RrEnFrTb1QKWs= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +cloud.google.com/go/certificatemanager v1.6.0 h1:5C5UWeSt8Jkgp7OWn2rCkLmYurar/vIWIoSQ2+LaTOc= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +cloud.google.com/go/channel v1.11.0 h1:/ToBJYu+7wATtd3h8T7hpc4+5NfzlJMDRZjPLIm4EZk= +cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= +cloud.google.com/go/cloudbuild v1.7.0 h1:osBOHQJqLPqNfHfkRQXz6sCKAIEKRrupA9NaAGiLN4s= +cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= +cloud.google.com/go/clouddms v1.5.0 h1:E7v4TpDGUyEm1C/4KIrpVSOCTm0P6vWdHT0I4mostRA= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= +cloud.google.com/go/cloudtasks v1.9.0 h1:Cc2/20hMhGLV2pBGk/i6zNY+eTT9IsV3mrK6TKBu3gs= +cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.6.0 h1:jXIpfcH/VYSE1SYcPzO0n1VVb+sAamiLOgCw45JbOQk= +cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= +cloud.google.com/go/container v1.13.1 h1:q8lTpyAsjcJZQCjGI8JJfcOG4ixl998vwe6TAgQROcM= +cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= +cloud.google.com/go/containeranalysis v0.7.0 h1:kw0dDRJPIN8L50Nwm8qa5VuGKPrbVup5lM3ULrvuWrg= +cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= +cloud.google.com/go/datacatalog v1.12.0 h1:3uaYULZRLByPdbuUvacGeqneudztEM4xqKQsBcxbDnY= +cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= +cloud.google.com/go/dataflow v0.8.0 h1:eYyD9o/8Nm6EttsKZaEGD84xC17bNgSKCu0ZxwqUbpg= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= +cloud.google.com/go/dataform v0.6.0 h1:HBegGOzStIXPWo49FaVTzJOD4EPo8BndPFBUfsuoYe0= +cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= +cloud.google.com/go/datafusion v1.6.0 h1:sZjRnS3TWkGsu1LjYPFD/fHeMLZNXDK6PDHi2s2s/bk= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= +cloud.google.com/go/datalabeling v0.7.0 h1:ch4qA2yvddGRUrlfwrNJCr79qLqhS9QBwofPHfFlDIk= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +cloud.google.com/go/dataplex v1.5.2 h1:uSkmPwbgOWp3IFtCVEM0Xew80dczVyhNXkvAtTapRn8= +cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= +cloud.google.com/go/dataproc v1.12.0 h1:W47qHL3W4BPkAIbk4SWmIERwsWBaNnWm0P2sdx3YgGU= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataqna v0.7.0 h1:yFzi/YU4YAdjyo7pXkBE2FeHbgz5OQQBVDdbErEHmVQ= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= +cloud.google.com/go/datastore v1.10.0 h1:4siQRf4zTiAVt/oeH4GureGkApgb2vtPQAtOmhpqQwE= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= +cloud.google.com/go/datastream v1.6.0 h1:v6j8C4p0TfXA9Wcea3iH7ZUm05Cx4BiPsH4vEkH7A9g= +cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= +cloud.google.com/go/deploy v1.6.0 h1:hdXxUdVw+NOrCQeqg9eQPB3hF1mFEchoS3h+K4IAU9s= +cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= +cloud.google.com/go/dialogflow v1.31.0 h1:TwmxDsdFcQdExfShoLRlTtdPTor8qSxNu9KZ13o+TUQ= +cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= +cloud.google.com/go/dlp v1.9.0 h1:1JoJqezlgu6NWCroBxr4rOZnwNFILXr4cB9dMaSKO4A= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= +cloud.google.com/go/documentai v1.16.0 h1:tHZA9dB2xo3VaCP4JPxs5jHRntJnmg38kZ0UxlT/u90= +cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= +cloud.google.com/go/domains v0.8.0 h1:2ti/o9tlWL4N+wIuWUNH+LbfgpwxPr8J1sv9RHA4bYQ= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= +cloud.google.com/go/edgecontainer v0.3.0 h1:i57Q4zg9j8h4UQoKTD7buXbLCvofmmV8+8owwSmM3ew= +cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= +cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.5.0 h1:gIzEhCoOT7bi+6QZqZIzX1Erj4SswMPIteNvYVlu+pM= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +cloud.google.com/go/eventarc v1.10.0 h1:4cELkxrOYntz1VRNi2deLRkOr+R6u175kF4hUyd/4Ms= +cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= +cloud.google.com/go/filestore v1.5.0 h1:M/iQpbNJw+ELfEvFAW2mAhcHOn1HQQzIkzqmA4njTwg= +cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= +cloud.google.com/go/firestore v1.9.0 h1:IBlRyxgGySXu5VuW0RgGFlTtLukSnNkpDiEOMkQkmpA= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/functions v1.10.0 h1:WC0JiI5ZBTPSgjzFccqZ8TMkhoPRpDClN99KXhHJp6I= +cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= +cloud.google.com/go/gaming v1.9.0 h1:7vEhFnZmd931Mo7sZ6pJy7uQPDxF7m7v8xtBheG08tc= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gkebackup v0.4.0 h1:za3QZvw6ujR0uyqkhomKKKNoXDyqYGPJies3voUK8DA= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkeconnect v0.7.0 h1:gXYKciHS/Lgq0GJ5Kc9SzPA35NGc3yqu6SkjonpEr2Q= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= +cloud.google.com/go/gkehub v0.11.0 h1:C4p1ZboBOexyCgZSCq+QdP+xfta9+puxgHFy8cjbgYI= +cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= +cloud.google.com/go/gkemulticloud v0.5.0 h1:8I84Q4vl02rJRsFiinBxl7WCozfdLlUVBQuSrqr9Wtk= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= +cloud.google.com/go/gsuiteaddons v1.5.0 h1:1mvhXqJzV0Vg5Fa95QwckljODJJfDFXV4pn+iL50zzA= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +cloud.google.com/go/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +cloud.google.com/go/iap v1.6.0 h1:a6Heb3z12tUHJqXvmYqLhr7cWz3zzl566xtlbavD5Q0= +cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= +cloud.google.com/go/ids v1.3.0 h1:fodnCDtOXuMmS8LTC2y3h8t24U8F3eKWfhi+3LY6Qf0= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +cloud.google.com/go/iot v1.5.0 h1:so1XASBu64OWGylrv5xjvsi6U+/CIR2KiRuZt+WLyKk= +cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= +cloud.google.com/go/kms v1.9.0 h1:b0votJQa/9DSsxgHwN33/tTLA7ZHVzfWhDCrfiXijSo= +cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= +cloud.google.com/go/language v1.9.0 h1:7Ulo2mDk9huBoBi8zCE3ONOoBrL6UXfAI71CLQ9GEIM= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= +cloud.google.com/go/lifesciences v0.8.0 h1:uWrMjWTsGjLZpCTWEAzYvyXj+7fhiZST45u9AgasasI= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= +cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= +cloud.google.com/go/managedidentities v1.5.0 h1:ZRQ4k21/jAhrHBVKl/AY7SjgzeJwG1iZa+mJ82P+VNg= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/maps v0.6.0 h1:soPzd0NABgCOGZavyZCAKrJ9L1JAwg3To6n5kuMCm98= +cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= +cloud.google.com/go/mediatranslation v0.7.0 h1:anPxH+/WWt8Yc3EdoEJhPMBRF7EhIdz426A+tuoA0OU= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= +cloud.google.com/go/memcache v1.9.0 h1:8/VEmWCpnETCrBwS3z4MhT+tIdKgR1Z4Tr2tvYH32rg= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= +cloud.google.com/go/metastore v1.10.0 h1:QCFhZVe2289KDBQ7WxaHV2rAmPrmRAdLC6gbjUd3HPo= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +cloud.google.com/go/monitoring v1.12.0 h1:+X79DyOP/Ny23XIqSIb37AvFWSxDN15w/ktklVvPLso= +cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= +cloud.google.com/go/networkconnectivity v1.10.0 h1:DJwVcr97sd9XPc9rei0z1vUI2ExJyXpA11DSi+Yh7h4= +cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= +cloud.google.com/go/networkmanagement v1.6.0 h1:8KWEUNGcpSX9WwZXq7FtciuNGPdPdPN/ruDm769yAEM= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= +cloud.google.com/go/networksecurity v0.7.0 h1:sAKgrzvEslukcwezyEIoXocU2vxWR1Zn7xMTp4uLR0E= +cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= +cloud.google.com/go/notebooks v1.7.0 h1:mMI+/ETVBmCZjdiSYYkN6VFgFTR68kh3frJ8zWvg6go= +cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= +cloud.google.com/go/optimization v1.3.1 h1:dj8O4VOJRB4CUwZXdmwNViH1OtI0WtWL867/lnYH248= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +cloud.google.com/go/orchestration v1.6.0 h1:Vw+CEXo8M/FZ1rb4EjcLv0gJqqw89b7+g+C/EmniTb8= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +cloud.google.com/go/orgpolicy v1.10.0 h1:XDriMWug7sd0kYT1QKofRpRHzjad0bK8Q8uA9q+XrU4= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= +cloud.google.com/go/osconfig v1.11.0 h1:PkSQx4OHit5xz2bNyr11KGcaFccL5oqglFPdTboyqwQ= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= +cloud.google.com/go/oslogin v1.9.0 h1:whP7vhpmc+ufZa90eVpkfbgzJRK/Xomjz+XCD4aGwWw= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= +cloud.google.com/go/phishingprotection v0.7.0 h1:l6tDkT7qAEV49MNEJkEJTB6vOO/onbSOcNtAT09HPuA= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +cloud.google.com/go/policytroubleshooter v1.5.0 h1:/fRzv4eqv9PDCEL7nBgJiA1EZxhdKMQ4/JIfheCdUZI= +cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= +cloud.google.com/go/privatecatalog v0.7.0 h1:7d0gcifTV9As6zzBQo34ZsFiRRlENjD3kw0o3uHn+fY= +cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= +cloud.google.com/go/pubsub v1.28.0 h1:XzabfdPx/+eNrsVVGLFgeUnQQKPGkMb8klRCeYK52is= +cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsublite v1.6.0 h1:qh04RCSOnQDVHYmzT74ANu8WR9czAXG3Jl3TV4iR5no= +cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= +cloud.google.com/go/recaptchaenterprise/v2 v2.6.0 h1:E9VgcQxj9M3HS945E3Jb53qd14xcpHBaEG1LgQhnxW8= +cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= +cloud.google.com/go/recommendationengine v0.7.0 h1:VibRFCwWXrFebEWKHfZAt2kta6pS7Tlimsnms0fjv7k= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= +cloud.google.com/go/recommender v1.9.0 h1:ZnFRY5R6zOVk2IDS1Jbv5Bw+DExCI5rFumsTnMXiu/A= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= +cloud.google.com/go/redis v1.11.0 h1:JoAd3SkeDt3rLFAAxEvw6wV4t+8y4ZzfZcZmddqphQ8= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +cloud.google.com/go/resourcemanager v1.5.0 h1:m2RQU8UzBCIO+wsdwoehpuyAaF1i7ahFhj7TLocxuJE= +cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= +cloud.google.com/go/resourcesettings v1.5.0 h1:8Dua37kQt27CCWHm4h/Q1XqCF6ByD7Ouu49xg95qJzI= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= +cloud.google.com/go/retail v1.12.0 h1:1Dda2OpFNzIb4qWgFZjYlpP7sxX3aLeypKG6A3H4Yys= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +cloud.google.com/go/run v0.8.0 h1:monNAz/FXgo8A31aR9sbrsv+bEbqy6H/arSgLOfA2Fk= +cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= +cloud.google.com/go/scheduler v1.8.0 h1:NRzIXqVxpyoiyonpYOKJmVJ9iif/Acw36Jri+cVHZ9U= +cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= +cloud.google.com/go/secretmanager v1.10.0 h1:pu03bha7ukxF8otyPKTFdDz+rr9sE3YauS5PliDXK60= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +cloud.google.com/go/security v1.12.0 h1:WIyVxhrdex1geaAV0pC/4yXy/sZdurjHXLzMopcjers= +cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= +cloud.google.com/go/securitycenter v1.18.1 h1:DRUo2MFSq3Kt0a4hWRysdMHcu2obPwnSQNgHfOuwR4Q= +cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= +cloud.google.com/go/servicecontrol v1.11.0 h1:iEiMJgD1bzRL9Zu4JYDQUWfqZ+kRLX8wWZSCMBK8Qzs= +cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= +cloud.google.com/go/servicedirectory v1.8.0 h1:DPvPdb6O/lg7xK+BFKlzZN+w6upeJ/bbfcUnnqU66b8= +cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= +cloud.google.com/go/servicemanagement v1.6.0 h1:flWoX0eJy21+34I/7HPUbpr6xTHPVzws1xnecLFlUm0= +cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +cloud.google.com/go/serviceusage v1.5.0 h1:fl1AGgOx7E2eyBmH5ofDXT9w8xGvEaEnHYyNYGkxaqg= +cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +cloud.google.com/go/shell v1.6.0 h1:wT0Uw7ib7+AgZST9eCDygwTJn4+bHMDtZo5fh7kGWDU= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/spanner v1.44.0 h1:fba7k2apz4aI0BE59/kbeaJ78dPOXSz2PSuBIfe7SBM= +cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= +cloud.google.com/go/speech v1.14.1 h1:x4ZJWhop/sLtnIP97IMmPtD6ZF003eD8hykJ0lOgEtw= +cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= +cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= +cloud.google.com/go/storagetransfer v1.7.0 h1:doREJk5f36gq7yJDJ2HVGaYTuQ8Nh6JWm+6tPjdfh+g= +cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= +cloud.google.com/go/talent v1.5.0 h1:nI9sVZPjMKiO2q3Uu0KhTDVov3Xrlpt63fghP9XjyEM= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +cloud.google.com/go/texttospeech v1.6.0 h1:H4g1ULStsbVtalbZGktyzXzw6jP26RjVGYx9RaYjBzc= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +cloud.google.com/go/tpu v1.5.0 h1:/34T6CbSi+kTv5E19Q9zbU/ix8IviInZpzwz3rsFE+A= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +cloud.google.com/go/trace v1.8.0 h1:GFPLxbp5/FzdgTzor3nlNYNxMd6hLmzkE7sA9F0qQcA= +cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= +cloud.google.com/go/translate v1.6.0 h1:oBW4KVgcUq4OAXGdKEdyV7lqWiA3keQ3+8FKreAQv4g= +cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/video v1.13.0 h1:FL+xG+4vgZASVIxcWACxneKPhFOnOX75GJhhTP7yUkQ= +cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= +cloud.google.com/go/videointelligence v1.10.0 h1:Uh5BdoET8XXqXX2uXIahGb+wTKbLkGH7s4GXR58RrG8= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= +cloud.google.com/go/vision/v2 v2.6.0 h1:WKt7VNhMLKaT9NmdisWnU2LVO5CaHvisssTaAqfV3dg= +cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= +cloud.google.com/go/vmmigration v1.5.0 h1:+2zAH2Di1FB02kAv8L9In2chYRP2Mw0bl41MiWwF+Fc= +cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= +cloud.google.com/go/vmwareengine v0.2.2 h1:ZM35wN4xuxDZSpKFypLMTsB02M+NEIZ2wr7/VpT3osw= +cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= +cloud.google.com/go/vpcaccess v1.6.0 h1:FOe6CuiQD3BhHJWt7E8QlbBcaIzVRddupwJlp7eqmn4= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= +cloud.google.com/go/webrisk v1.8.0 h1:IY+L2+UwxcVm2zayMAtBhZleecdIFLiC+QJMzgb0kT0= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +cloud.google.com/go/websecurityscanner v1.5.0 h1:AHC1xmaNMOZtNqxI9Rmm87IJEyPaRkOxeI0gpAacXGk= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= +cloud.google.com/go/workflows v1.10.0 h1:FfGp9w0cYnaKZJhUOMqCOJCYT/WlvYBfTQhFWV3sRKI= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= +contrib.go.opencensus.io/exporter/stackdriver v0.13.12 h1:bjBKzIf7/TAkxd7L2utGaLM78bmUWlCval5K9UeElbY= +contrib.go.opencensus.io/exporter/stackdriver v0.13.12/go.mod h1:mmxnWlrvrFdpiOHOhxBaVi1rkc0WOqhgfknj4Yg0SeQ= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 h1:V8krnnfGj4pV65YLUm3C0/8bl7V5Nry2Pwvy3ru/wLc= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/Microsoft/hcsshim v0.9.8 h1:lf7xxK2+Ikbj9sVf2QZsouGjRjEp2STj1yDHgoVtU5k= +github.com/Microsoft/hcsshim v0.9.8/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/alecthomas/kingpin/v2 v2.3.1 h1:ANLJcKmQm4nIaog7xdr/id6FM6zm5hHnfZrvtKPxqGg= +github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= +github.com/aws/aws-sdk-go v1.37.0 h1:GzFnhOIsrGyQ69s7VgqtrG2BG8v7X7vwB3Xpbd/DBBk= +github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a h1:8d1CEOF1xldesKds5tRG3tExBsMOgWYownMHNCsev54= +github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= +github.com/cloudflare/redoctober v0.0.0-20211013234631-6a74ccc611f6 h1:QKzett0dn5FhjcIHNKSClEilabfhWCnsdijq3ftm9Ms= +github.com/cloudflare/redoctober v0.0.0-20211013234631-6a74ccc611f6/go.mod h1:Ikt4Wfpln1YOrak+auA8BNxgiilj0Y2y7nO+aN2eMzk= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b h1:ACGZRIr7HsgBKHsueQ1yM4WaVaXh21ynwqsF8M8tXhA= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= +github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= +github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +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/go-cni v1.1.6 h1:el5WPymG5nRRLQF1EfB97FWob4Tdc8INg8RZMaXWZlo= +github.com/containerd/go-cni v1.1.6/go.mod h1:BWtoWl5ghVymxu6MBjg79W9NZrCRyHIdUtk4cauMe34= +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.4 h1:iKTstFebwy3Ak5UF0RHSeuCTahC5OIrPJa6vjMAM81s= +github.com/containerd/imgcrypt v1.1.4/go.mod h1:LorQnPtzL/T0IyCeftcsMEO7AqxUDbdO8j/tSUpgxvo= +github.com/containerd/nri v0.1.0 h1:6QioHRlThlKh2RkRTR4kIT3PKAcrLo3gIWnjkM4dQmQ= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/ttrpc v1.1.2 h1:4jH6OQDQqjfVD2b5TJS5TxmGuLGmp5WW7KtW2TWOP7c= +github.com/containerd/ttrpc v1.1.2/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= +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.1.0 h1:n7OZ7jZumLIqNJqXrEc/paBM840mORnmGdJDmAmJZHM= +github.com/containerd/zfs v1.1.0/go.mod h1:oZF9wBnrnQjpWLaPKEinrx3TQ9a+W/RJO7Zb41d8YLE= +github.com/containernetworking/cni v1.1.1 h1:ky20T7c0MvKvbMOwS/FrlbNwjEoqJEUUYfsL4b0mc4k= +github.com/containernetworking/cni v1.1.1/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= +github.com/containernetworking/plugins v1.1.1 h1:+AGfFigZ5TiQH00vhR8qPeSatj53eNGz0C1d3wVYlHE= +github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8= +github.com/containers/ocicrypt v1.1.3 h1:uMxn2wTb4nDR7GqG3rnZSfpJXqWURfzZ7nKydzIeKpA= +github.com/containers/ocicrypt v1.1.3/go.mod h1:xpdkbVAuaH3WzbEabUd5yDsl9SwJA5pABH85425Es2g= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fullstorydev/grpcurl v1.8.7 h1:xJWosq3BQovQ4QrdPO72OrPiWuGgEsxY8ldYsJbPrqI= +github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E= +github.com/getsentry/sentry-go v0.11.0 h1:qro8uttJGvNAMr5CLcFI9CHR0aDzXl0Vs3Pmw/oTPg8= +github.com/getsentry/sentry-go v0.11.0/go.mod h1:KBQIxiZAetw62Cj8Ri964vAEWVdgfaUCn30Q3bCvANo= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= +github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= +github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= +github.com/google/trillian v1.5.1-0.20220819043421-0a389c4bb8d9 h1:GFmzYtwUMi1S2mjLxfrJ/CZ9gWDG+zeLtZByg/QEBkk= +github.com/google/trillian v1.5.1-0.20220819043421-0a389c4bb8d9/go.mod h1:vywkS3p2SgNmPL7oAWqU5PiiknzRMp+ol3a19jfY2PQ= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +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 v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= +github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +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/intel/goresctrl v0.2.0 h1:JyZjdMQu9Kl/wLXe9xA6s1X+tF6BWsQPFGJMEeCfWzE= +github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= +github.com/jhump/protoreflect v1.12.0 h1:1NQ4FpWMgn3by/n1X0fbeKEUxP1wBt7+Oitpv01HR10= +github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmhodges/clock v1.2.0 h1:eq4kys+NI0PLngzaHEe7AmPT90XMGIEySD1JfV1PDIs= +github.com/jmhodges/clock v1.2.0/go.mod h1:qKjhA7x7u/lQpPB1XAqX1b1lCI/w3/fNuYpI/ZjLynI= +github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= +github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46 h1:veS9QfglfvqAw2e+eeNT/SbGySq8ajECXJ9e4fPoLhY= +github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= +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.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/kylelemons/go-gypsy v1.0.0 h1:7/wQ7A3UL1bnqRMnZ6T8cwCOArfZCxFmb1iTxaOOo1s= +github.com/kylelemons/go-gypsy v1.0.0/go.mod h1:chkXM0zjdpXOiqkCW1XcCHDfjfk14PH2KKkQWxfJUcU= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/letsencrypt/pkcs11key/v4 v4.0.0 h1:qLc/OznH7xMr5ARJgkZCCWk+EomQkiNTOoOF5LAgagc= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v1.10.1 h1:6VXZrLU0jHBYyAqrSPa+MgPfnSvTPuMgK+k0o5kVFWo= +github.com/lib/pq v1.10.1/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= +github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= +github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= +github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs/v3 v3.0.1 h1:YaoXgBePoMA12+S1u/ddkv+QqxcfiZK4prI6HPnkFiU= +github.com/mistifyio/go-zfs/v3 v3.0.1/go.mod h1:CzVgeB0RvF2EGzQnytKVvVSDwmKJXxkOTUGbNrTja/k= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +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/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= +github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +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.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= +github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474 h1:oKIteTqeSpenyTrOVj5zkiyCaflLa8B+CD0324otT+o= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= +github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= +github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +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.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= +github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/prometheus/prometheus v2.5.0+incompatible h1:7QPitgO2kOFG8ecuRn9O/4L9+10He72rVRJvMXrE9Hg= +github.com/prometheus/prometheus v2.5.0+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tedsuo/ifrit v0.0.0-20230330192023-5cba443a66c4/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/transparency-dev/merkle v0.0.1 h1:T9/9gYB8uZl7VOJIhdwjALeRWlxUxSfDEysjfmx+L9E= +github.com/transparency-dev/merkle v0.0.1/go.mod h1:B8FIw5LTq6DaULoHsVFRzYIUDkl8yuSwCdZnOZGKL/A= +github.com/urfave/cli v1.22.7 h1:aXiFAgRugfJ27UFDsGJ9DB2FvTC73hlVXFSqq5bo9eU= +github.com/urfave/cli v1.22.7/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 h1:+UB2BJA852UkGH42H+Oee69djmxS3ANzl2b/JtT1YiA= +github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= +github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xhit/go-str2duration v1.2.0 h1:BcV5u025cITWxEQKGWr1URRzrcXtu7uk8+luz3Yuhwc= +github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= +github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521 h1:kKCF7VX/wTmdg2ZjEaqlq99Bjsoiz7vH6sFniF/vI4M= +github.com/zmap/zcertificate v0.0.0-20180516150559-0e3d58b1bac4 h1:17HHAgFKlLcZsDOjBOUrd5hDihb1ggf+1a5dTbkgkIY= +go.etcd.io/etcd/api/v3 v3.5.6 h1:Cy2qx3npLcYqTKqGJzMypnMv2tiRyifZJ17BlWIWA7A= +go.etcd.io/etcd/client/v2 v2.305.6 h1:fIDR0p4KMjw01MJMfUIDWdQbjo06PD6CeYM5z4EHLi0= +go.etcd.io/etcd/client/v3 v3.5.6 h1:coLs69PWCXE9G4FKquzNaSHrRyMCAXwF+IX1tAPVO8E= +go.etcd.io/etcd/etcdctl/v3 v3.5.5 h1:2A+/xUck9vBtimGaU8SQh62wCuvuIuREHSGBXBEY6QE= +go.etcd.io/etcd/etcdctl/v3 v3.5.5/go.mod h1:pNM9+Qv1dTxMUAxxk7hhCuciKjuX34iS1BKJDCDjmYI= +go.etcd.io/etcd/etcdutl/v3 v3.5.5 h1:KpsQnj71ai24ScrGXF0iwdVZmJU61GK1IbH5oDvYy3M= +go.etcd.io/etcd/etcdutl/v3 v3.5.5/go.mod h1:7DFbgeccvoOhQLbX7bI4eep9+t8PSKBFheTB7TVf04s= +go.etcd.io/etcd/tests/v3 v3.5.5 h1:QMfo2twT9Erol77/aypdJGN1vtuQ4VNSGnb5cRiIRo8= +go.etcd.io/etcd/tests/v3 v3.5.5/go.mod h1:WUfOEAmIWBoqOtLmHeCp4WbGw3Q0sRK9ECO24zL1/g8= +go.etcd.io/etcd/v3 v3.5.5 h1:Dd0pMrzlu2T0FsxDSomE4+8PNxpNJFLKP/cMrZiK/9s= +go.etcd.io/etcd/v3 v3.5.5/go.mod h1:LLAaIJ/5esg1ip96fRglrSGlWWGaCo1Hal3CulymK14= +go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 h1:Ky1MObd188aGbgb5OgNnwGuEEwI9MVIcc7rBW6zk5Ak= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0/go.mod h1:hO1KLR7jcKaDDKDkvI9dP/FIhpmna5lkqPUQdEjFAM8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0 h1:VQbUHoJqytHHSJ1OZodPH9tvZZSVzUHjPHpkO85sT6k= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0/go.mod h1:QNX1aly8ehqqX1LEa6YniTU7VY9I6R3X/oPxhGdTceE= +go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= +go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +google.golang.org/api v0.93.0 h1:T2xt9gi0gHdxdnRkVQhT8mIvPaXKNsDNWz+L696M66M= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= +gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +k8s.io/api v0.22.5 h1:xk7C+rMjF/EGELiD560jdmwzrB788mfcHiNbMQLIVI8= +k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= +k8s.io/apimachinery v0.22.5 h1:cIPwldOYm1Slq9VLBRPtEYpyhjIm1C6aAMAoENuvN9s= +k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= +k8s.io/apiserver v0.22.5 h1:71krQxCUz218ecb+nPhfDsNB6QgP1/4EMvi1a2uYBlg= +k8s.io/apiserver v0.22.5/go.mod h1:s2WbtgZAkTKt679sYtSudEQrTGWUSQAPe6MupLnlmaQ= +k8s.io/client-go v0.22.5 h1:I8Zn/UqIdi2r02aZmhaJ1hqMxcpfJ3t5VqvHtctHYFo= +k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y= +k8s.io/component-base v0.22.5 h1:U0eHqZm7mAFE42hFwYhY6ze/MmVaW00JpMrzVsQmzYE= +k8s.io/component-base v0.22.5/go.mod h1:VK3I+TjuF9eaa+Ln67dKxhGar5ynVbwnGrUiNF4MqCI= +k8s.io/cri-api v0.25.0 h1:INwdXsCDSA/0hGNdPxdE2dQD6ft/5K1EaKXZixvSQxg= +k8s.io/cri-api v0.25.0/go.mod h1:J1rAyQkSJ2Q6I+aBMOVgg2/cbbebso6FNa0UagiR0kc= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= diff --git a/vendor/github.com/akutz/gosync/.gitignore b/vendor/github.com/akutz/gosync/.gitignore deleted file mode 100644 index 3aef02675d..0000000000 --- a/vendor/github.com/akutz/gosync/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# 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 - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - -# A macOS metadata file -.DS_Store diff --git a/vendor/github.com/akutz/gosync/.travis.yml b/vendor/github.com/akutz/gosync/.travis.yml deleted file mode 100644 index b4611c5f34..0000000000 --- a/vendor/github.com/akutz/gosync/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Use the newer Travis-CI build templates based on the -# Debian Linux distribution "Trusty" release. -dist: trusty - -# Setting "sudo" to false forces Travis-CI to use its -# container-based build infrastructure, which has shorter -# queue times. -sudo: false - -# Select Go as the language used to run the buid. -language: go -go_import_path: github.com/thecodeteam/gosync - -# Instruct Travis-CI to skip its built-in "go get" -install: true - -jobs: - include: - # Validate sources (tests included) build without errors - - &build-stage - stage: build - go: 1.8.5 - script: go build - - - <<: *build-stage - go: 1.9.2 - - # Run tests - - &test-stage - stage: test - go: 1.8.5 - script: go test -v - - - <<: *test-stage - go: 1.9.2 diff --git a/vendor/github.com/akutz/gosync/LICENSE b/vendor/github.com/akutz/gosync/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/vendor/github.com/akutz/gosync/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/akutz/gosync/README.md b/vendor/github.com/akutz/gosync/README.md deleted file mode 100644 index cf2ef0c01b..0000000000 --- a/vendor/github.com/akutz/gosync/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# GoSync -A synchronization library for Go. - -## Overview -GoSync provides helper functions related to synchronization missing from Go's -standard `sync` package. Please see the related -[GoDocs](https://godoc.org/github.com/thecodeteam/gosync) -for more information on this package and its contents. - -## Support -For any questions or concerns please file an issue with the -[GoSync](https://github.com/thecodeteam/gosync/issues) project or join -the Slack channel #go-questions at codecommunity.slack.com. diff --git a/vendor/github.com/akutz/gosync/VERSION b/vendor/github.com/akutz/gosync/VERSION deleted file mode 100644 index 6e8bf73aa5..0000000000 --- a/vendor/github.com/akutz/gosync/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/vendor/github.com/akutz/gosync/trymutex.go b/vendor/github.com/akutz/gosync/trymutex.go deleted file mode 100644 index c2f576d5b8..0000000000 --- a/vendor/github.com/akutz/gosync/trymutex.go +++ /dev/null @@ -1,80 +0,0 @@ -package gosync - -import ( - "sync" - "time" -) - -// TryLocker represents an object that can be locked, unlocked, and implements -// a variant of its lock function that times out if no lock can be obtained in -// a specified duration. -type TryLocker interface { - sync.Locker - - // TryLock attempts to obtain a lock and times out if no lock - // can be obtained in the specified duration. A flag is returned - // indicating whether or not the lock was obtained. - TryLock(timeout time.Duration) bool -} - -// TryMutex is a mutual exclusion lock that implements the TryLocker interface. -// The zero value for a TryMutex is an unlocked mutex. -// -// A TryMutex may be copied after first use. -type TryMutex struct { - sync.Once - c chan struct{} -} - -func (m *TryMutex) init() { - m.c = make(chan struct{}, 1) -} - -// Lock locks m. If the lock is already in use, the calling goroutine blocks -// until the mutex is available. -func (m *TryMutex) Lock() { - m.Once.Do(m.init) - m.c <- struct{}{} -} - -// Unlock unlocks m. It is a run-time error if m is not locked on entry to -// Unlock. -// -// A locked TryMutex is not associated with a particular goroutine. It is -// allowed for one goroutine to lock a Mutex and then arrange for another -// goroutine to unlock it. -func (m *TryMutex) Unlock() { - m.Once.Do(m.init) - select { - case <-m.c: - return - default: - panic("gosync: unlock of unlocked mutex") - } -} - -// TryLock attempts to lock m. If no lock can be obtained in the specified -// duration then a false value is returned. -func (m *TryMutex) TryLock(timeout time.Duration) bool { - m.Once.Do(m.init) - - // If the timeout is zero then do not create a timer. - if timeout == 0 { - select { - case m.c <- struct{}{}: - return true - default: - return false - } - } - - // Timeout is greater than zero, so a timer is used. - timer := time.NewTimer(timeout) - select { - case m.c <- struct{}{}: - timer.Stop() - return true - case <-timer.C: - } - return false -} diff --git a/vendor/github.com/akutz/memconn/.gitignore b/vendor/github.com/akutz/memconn/.gitignore deleted file mode 100644 index 8dde3e76ec..0000000000 --- a/vendor/github.com/akutz/memconn/.gitignore +++ /dev/null @@ -1,414 +0,0 @@ -*.a -*.out -*.test -*.stderr -*.stdout -*.log -.vscode/ - -# Created by https://www.gitignore.io - -### Windows ### -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - - -### OSX ### -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -### Eclipse ### -*.pydevproject -.metadata -.gradle -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath - -# Eclipse Core -.project - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# JDT-specific (Eclipse Java Development Tools) -.classpath - -# PDT-specific -.buildpath - -# sbteclipse plugin -.target - -# TeXlipse plugin -.texlipse - - -### Go ### -# 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 - - -### SublimeText ### -# cache files for sublime text -*.tmlanguage.cache -*.tmPreferences.cache -*.stTheme.cache - -# workspace files are user-specific -*.sublime-workspace - -# project files should be checked into the repository, unless a significant -# proportion of contributors will probably not be using SublimeText -# *.sublime-project - -# sftp configuration file -sftp-config.json - - -### VisualStudio ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studo 2015 cache/options directory -.vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -*.[Cc]ache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - - -### Maven ### -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties - - -### Java ### -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - - -### Intellij ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm - -*.iml - -## Directory-based project format: -.idea/ -# if you remove the above rule, at least ignore the following: - -# User-specific stuff: -# .idea/workspace.xml -# .idea/tasks.xml -# .idea/dictionaries - -# Sensitive or high-churn files: -# .idea/dataSources.ids -# .idea/dataSources.xml -# .idea/sqlDataSources.xml -# .idea/dynamic.xml -# .idea/uiDesigner.xml - -# Gradle: -# .idea/gradle.xml -# .idea/libraries - -# Mongo Explorer plugin: -# .idea/mongoSettings.xml - -## File-based project format: -*.ipr -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties diff --git a/vendor/github.com/akutz/memconn/.travis.yml b/vendor/github.com/akutz/memconn/.travis.yml deleted file mode 100644 index 7658106285..0000000000 --- a/vendor/github.com/akutz/memconn/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Setting "sudo" to false forces Travis-CI to use its -# container-based build infrastructure, which has shorter -# queue times. -sudo: false - -# Use the newer Travis-CI build templates based on the -# Debian Linux distribution "Trusty" release. -dist: trusty - -# Select Go as the language used to run the buid. -language: go -go: - - 1.8.x - - 1.9.x - - 1.10.x -go_import_path: github.com/akutz/memconn - -install: true -script: - - make test - - make benchmark diff --git a/vendor/github.com/akutz/memconn/LICENSE b/vendor/github.com/akutz/memconn/LICENSE deleted file mode 100644 index 980a15ac24..0000000000 --- a/vendor/github.com/akutz/memconn/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/akutz/memconn/Makefile b/vendor/github.com/akutz/memconn/Makefile deleted file mode 100644 index 0d32c55243..0000000000 --- a/vendor/github.com/akutz/memconn/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -SHELL := /bin/bash - -all: build - -build: memconn.a -memconn.a: $(filter-out %_test.go, $(wildcard *.go)) - go build -o $@ - -GO_VERSION ?= 1.9.4 -IMPORT_PATH := github.com/akutz/memconn - -docker-run: - docker run --rm -it \ - -v $$(pwd):/go/src/$(IMPORT_PATH) \ - golang:$(GO_VERSION) \ - make -C /go/src/$(IMPORT_PATH) $(MAKE_TARGET) - -BENCH ?= . - -benchmark: - go test -bench $(BENCH) -run Bench -benchmem . - -benchmark-go1.9: - MAKE_TARGET=benchmark $(MAKE) docker-run - -test: - go test - go test -race -run 'Race$$' - -test-go1.9: - MAKE_TARGET=test $(MAKE) docker-run \ No newline at end of file diff --git a/vendor/github.com/akutz/memconn/README.md b/vendor/github.com/akutz/memconn/README.md deleted file mode 100644 index a5168c3d9b..0000000000 --- a/vendor/github.com/akutz/memconn/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# MemConn [![GoDoc](https://godoc.org/github.com/akutz/memconn?status.svg)](http://godoc.org/github.com/akutz/memconn) [![Build Status](http://travis-ci.org/akutz/memconn.svg?branch=master)](https://travis-ci.org/akutz/memconn) [![Go Report Card](http://goreportcard.com/badge/akutz/memconn)](http://goreportcard.com/report/akutz/memconn) -MemConn provides named, in-memory network connections for Go. - -## Create a Server -A new `net.Listener` used to serve HTTP, gRPC, etc. is created with -`memconn.Listen`: - -```go -lis, err := memconn.Listen("memu", "UniqueName") -``` - -## Creating a Client (Dial) -Clients can dial any named connection: - -```go -client, err := memconn.Dial("memu", "UniqueName") -``` - -## Network Types -MemCon supports the following network types: - -| Network | Description | -|---------|-------------| -| `memb` | A buffered, in-memory implementation of `net.Conn` | -| `memu` | An unbuffered, in-memory implementation of `net.Conn` | - -## Performance -The benchmark results illustrate MemConn's performance versus TCP -and UNIX domain sockets: - -![ops](https://imgur.com/o8mXla6.png "Ops (Larger is Better)") -![ns/op](https://imgur.com/8YvPmMU.png "Nanoseconds/Op (Smaller is Better)") -![B/op](https://imgur.com/vQSfIR2.png "Bytes/Op (Smaller is Better)") -![allocs/op](https://imgur.com/k263257.png "Allocs/Op (Smaller is Better)") - -MemConn is more performant than TCP and UNIX domain sockets with respect -to the CPU. While MemConn does allocate more memory, this is to be expected -since MemConn is an in-memory implementation of the `net.Conn` interface. diff --git a/vendor/github.com/akutz/memconn/VERSION b/vendor/github.com/akutz/memconn/VERSION deleted file mode 100644 index 6e8bf73aa5..0000000000 --- a/vendor/github.com/akutz/memconn/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/vendor/github.com/akutz/memconn/memconn.go b/vendor/github.com/akutz/memconn/memconn.go deleted file mode 100644 index ae7b544257..0000000000 --- a/vendor/github.com/akutz/memconn/memconn.go +++ /dev/null @@ -1,110 +0,0 @@ -package memconn - -import ( - "context" - "net" -) - -const ( - // networkMemb is a buffered network connection. Write operations - // do not block as they are are buffered instead of waiting on a - // matching Read operation. - networkMemb = "memb" - - // networkMemu is an unbuffered network connection. Write operations - // block until they are matched by a Read operation on the other side - // of the connected pipe. - networkMemu = "memu" - - // addrLocalhost is a reserved address name. It is used when a - // Listen variant omits the local address or a Dial variant omits - // the remote address. - addrLocalhost = "localhost" -) - -// provider is the package's default provider instance. All of the -// package-level functions interact with this object. -var provider Provider - -// MapNetwork enables mapping the network value provided to this Provider's -// Dial and Listen functions from the specified "from" value to the -// specified "to" value. -// -// For example, calling MapNetwork("tcp", "memu") means a subsequent -// Dial("tcp", "address") gets translated to Dial("memu", "address"). -// -// Calling MapNetwork("tcp", "") removes any previous translation for -// the "tcp" network. -func MapNetwork(from, to string) { - provider.MapNetwork(from, to) -} - -// Listen begins listening at address for the specified network. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// When the specified address is already in use on the specified -// network an error is returned. -// -// When the provided network is unknown the operation defers to -// net.Dial. -func Listen(network, address string) (net.Listener, error) { - return provider.Listen(network, address) -} - -// ListenMem begins listening at laddr. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// If laddr is nil then ListenMem listens on "localhost" on the -// specified network. -func ListenMem(network string, laddr *Addr) (*Listener, error) { - return provider.ListenMem(network, laddr) -} - -// Dial dials a named connection. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// When the provided network is unknown the operation defers to -// net.Dial. -func Dial(network, address string) (net.Conn, error) { - return provider.Dial(network, address) -} - -// DialContext dials a named connection using a -// Go context to provide timeout behavior. -// -// Please see Dial for more information. -func DialContext( - ctx context.Context, - network, address string) (net.Conn, error) { - - return provider.DialContext(ctx, network, address) -} - -// DialMem dials a named connection. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// If laddr is nil then a new address is generated using -// time.Now().UnixNano(). Please note that client addresses are -// not required to be unique. -// -// If raddr is nil then the "localhost" endpoint is used on the -// specified network. -func DialMem(network string, laddr, raddr *Addr) (*Conn, error) { - return provider.DialMem(network, laddr, raddr) -} - -// DialMemContext dials a named connection using a -// Go context to provide timeout behavior. -// -// Please see DialMem for more information. -func DialMemContext( - ctx context.Context, - network string, - laddr, raddr *Addr) (*Conn, error) { - - return provider.DialMemContext(ctx, network, laddr, raddr) -} diff --git a/vendor/github.com/akutz/memconn/memconn_addr.go b/vendor/github.com/akutz/memconn/memconn_addr.go deleted file mode 100644 index 6f417877a0..0000000000 --- a/vendor/github.com/akutz/memconn/memconn_addr.go +++ /dev/null @@ -1,25 +0,0 @@ -package memconn - -// Addr represents the address of an in-memory endpoint. -type Addr struct { - // Name is the name of the endpoint. - Name string - - network string -} - -// Buffered indicates whether or not the address refers to a buffered -// network type. -func (a Addr) Buffered() bool { - return a.network == networkMemb -} - -// Network returns the address's network. -func (a Addr) Network() string { - return a.network -} - -// String returns the address's name. -func (a Addr) String() string { - return a.Name -} diff --git a/vendor/github.com/akutz/memconn/memconn_conn.go b/vendor/github.com/akutz/memconn/memconn_conn.go deleted file mode 100644 index 21e2e71b43..0000000000 --- a/vendor/github.com/akutz/memconn/memconn_conn.go +++ /dev/null @@ -1,434 +0,0 @@ -package memconn - -import ( - "net" - "sync" - "time" -) - -// Conn is an in-memory implementation of Golang's "net.Conn" interface. -type Conn struct { - pipe - - laddr Addr - raddr Addr - - // buf contains information about the connection's buffer state if - // the connection is buffered. Otherwise this field is nil. - buf *bufConn -} - -type bufConn struct { - // Please see the SetCopyOnWrite function for more information. - cow bool - - // Please see the SetBufferSize function for more information. - max uint64 - - // cur is the amount of buffered, pending Write data - cur uint64 - - // cond is a condition used to wait when writing buffered data - cond sync.Cond - - // mu is the mutex used by the condition. The mutex is exposed - // directly in order to access RLock and RUnlock for getting the - // buffer size. - mu sync.RWMutex - - // errs is the error channel returned by the Errs() function and - // used to report erros that occur as a result of buffered write - // operations. If the pipe does not use buffered writes then this - // field will always be nil. - errs chan error - - // Please see the SetCloseTimeout function for more information. - closeTimeout time.Duration -} - -func makeNewConns(network string, laddr, raddr Addr) (*Conn, *Conn) { - // This code is duplicated from the Pipe() function from the file - // "memconn_pipe.go". The reason for the duplication is to optimize - // the performance by removing the need to wrap the *pipe values as - // interface{} objects out of the Pipe() function and assert them - // back as *pipe* objects in this function. - cb1 := make(chan []byte) - cb2 := make(chan []byte) - cn1 := make(chan int) - cn2 := make(chan int) - done1 := make(chan struct{}) - done2 := make(chan struct{}) - - // Wrap the pipes with Conn to support: - // - // * The correct address information for the functions LocalAddr() - // and RemoteAddr() return the - // * Errors returns from the internal pipe are checked and - // have their internal OpError addr information replaced with - // the correct address information. - // * A channel can be setup to cause the event of the Listener - // closing closes the remoteConn immediately. - // * Buffered writes - local := &Conn{ - pipe: pipe{ - rdRx: cb1, rdTx: cn1, - wrTx: cb2, wrRx: cn2, - localDone: done1, remoteDone: done2, - readDeadline: makePipeDeadline(), - writeDeadline: makePipeDeadline(), - }, - laddr: laddr, - raddr: raddr, - } - remote := &Conn{ - pipe: pipe{ - rdRx: cb2, rdTx: cn2, - wrTx: cb1, wrRx: cn1, - localDone: done2, remoteDone: done1, - readDeadline: makePipeDeadline(), - writeDeadline: makePipeDeadline(), - }, - laddr: raddr, - raddr: laddr, - } - - if laddr.Buffered() { - local.buf = &bufConn{ - errs: make(chan error), - closeTimeout: 10 * time.Second, - } - local.buf.cond.L = &local.buf.mu - } - - if raddr.Buffered() { - remote.buf = &bufConn{ - errs: make(chan error), - closeTimeout: 10 * time.Second, - } - remote.buf.cond.L = &remote.buf.mu - } - - return local, remote -} - -// LocalBuffered returns a flag indicating whether or not the local side -// of the connection is buffered. -func (c *Conn) LocalBuffered() bool { - return c.laddr.Buffered() -} - -// RemoteBuffered returns a flag indicating whether or not the remote side -// of the connection is buffered. -func (c *Conn) RemoteBuffered() bool { - return c.raddr.Buffered() -} - -// BufferSize gets the number of bytes allowed to be queued for -// asynchrnous Write operations. -// -// Please note that this function will always return zero for unbuffered -// connections. -// -// Please see the function SetBufferSize for more information. -func (c *Conn) BufferSize() uint64 { - if c.laddr.Buffered() { - c.buf.mu.RLock() - defer c.buf.mu.RUnlock() - return c.buf.max - } - return 0 -} - -// SetBufferSize sets the number of bytes allowed to be queued for -// asynchronous Write operations. Once the amount of data pending a Write -// operation exceeds the specified size, subsequent Writes will -// block until the queued data no longer exceeds the allowed ceiling. -// -// A value of zero means no maximum is defined. -// -// If a Write operation's payload length exceeds the buffer size -// (except for zero) then the Write operation is handled synchronously. -// -// Please note that setting the buffer size has no effect on unbuffered -// connections. -func (c *Conn) SetBufferSize(i uint64) { - if c.laddr.Buffered() { - c.buf.cond.L.Lock() - defer c.buf.cond.L.Unlock() - c.buf.max = i - } -} - -// CloseTimeout gets the time.Duration value used when closing buffered -// connections. -// -// Please note that this function will always return zero for -// unbuffered connections. -// -// Please see the function SetCloseTimeout for more information. -func (c *Conn) CloseTimeout() time.Duration { - if c.laddr.Buffered() { - c.buf.mu.RLock() - defer c.buf.mu.RUnlock() - return c.buf.closeTimeout - } - return 0 -} - -// SetCloseTimeout sets a time.Duration value used by the Close function -// to determine the amount of time to wait for pending, buffered Writes -// to complete before closing the connection. -// -// The default timeout value is 10 seconds. A zero value does not -// mean there is no timeout, rather it means the timeout is immediate. -// -// Please note that setting this value has no effect on unbuffered -// connections. -func (c *Conn) SetCloseTimeout(duration time.Duration) { - if c.laddr.Buffered() { - c.buf.cond.L.Lock() - defer c.buf.cond.L.Unlock() - c.buf.closeTimeout = duration - } -} - -// CopyOnWrite gets a flag indicating whether or not copy-on-write is -// enabled for this connection. -// -// Please note that this function will always return false for -// unbuffered connections. -// -// Please see the function SetCopyOnWrite for more information. -func (c *Conn) CopyOnWrite() bool { - if c.laddr.Buffered() { - c.buf.mu.RLock() - defer c.buf.mu.RUnlock() - return c.buf.cow - } - return false -} - -// SetCopyOnWrite sets a flag indicating whether or not copy-on-write -// is enabled for this connection. -// -// When a connection is buffered, data submitted to a Write operation -// is processed in a goroutine and the function returns control to the -// caller immediately. Because of this, it's possible to modify the -// data provided to the Write function before or during the actual -// Write operation. Enabling copy-on-write causes the payload to be -// copied to a new buffer before control is returned to the caller. -// -// Please note that enabling copy-on-write will double the amount of -// memory required for all Write operations. -// -// Please note that enabling copy-on-write has no effect on unbuffered -// connections. -func (c *Conn) SetCopyOnWrite(enabled bool) { - if c.laddr.Buffered() { - c.buf.cond.L.Lock() - defer c.buf.cond.L.Unlock() - c.buf.cow = enabled - } -} - -// LocalAddr implements the net.Conn LocalAddr method. -func (c *Conn) LocalAddr() net.Addr { - return c.laddr -} - -// RemoteAddr implements the net.Conn RemoteAddr method. -func (c *Conn) RemoteAddr() net.Addr { - return c.raddr -} - -// Close implements the net.Conn Close method. -func (c *Conn) Close() error { - c.pipe.once.Do(func() { - - // Buffered connections will attempt to wait until all - // pending Writes are completed, until the specified - // timeout value has elapsed, or until the remote side - // of the connection is closed. - if c.laddr.Buffered() { - c.buf.mu.RLock() - timeout := c.buf.closeTimeout - c.buf.mu.RUnlock() - - // Set up a channel that is closed when the specified - // timer elapses. - timeoutDone := make(chan struct{}) - if timeout == 0 { - close(timeoutDone) - } else { - time.AfterFunc(timeout, func() { close(timeoutDone) }) - } - - // Set up a channel that is closed when the number of - // pending bytes is zero. - writesDone := make(chan struct{}) - go func() { - c.buf.cond.L.Lock() - for c.buf.cur > 0 { - c.buf.cond.Wait() - } - close(writesDone) - c.buf.cond.L.Unlock() - }() - - // Wait to close the connection. - select { - case <-writesDone: - case <-timeoutDone: - case <-c.pipe.remoteDone: - } - } - - close(c.pipe.localDone) - }) - return nil -} - -// Errs returns a channel that receives errors that may occur as the -// result of buffered write operations. -// -// This function will always return nil for unbuffered connections. -// -// Please note that the channel returned by this function is not closed -// when the connection is closed. This is because errors may continue -// to be sent over this channel as the result of asynchronous writes -// occurring after the connection is closed. Therefore this channel -// should not be used to determine when the connection is closed. -func (c *Conn) Errs() <-chan error { - return c.buf.errs -} - -// Read implements the net.Conn Read method. -func (c *Conn) Read(b []byte) (int, error) { - n, err := c.pipe.Read(b) - if err != nil { - if e, ok := err.(*net.OpError); ok { - e.Addr = c.raddr - e.Source = c.laddr - return n, e - } - return n, &net.OpError{ - Op: "read", - Addr: c.raddr, - Source: c.laddr, - Net: c.raddr.Network(), - Err: err, - } - } - return n, nil -} - -// Write implements the net.Conn Write method. -func (c *Conn) Write(b []byte) (int, error) { - if c.laddr.Buffered() { - return c.writeAsync(b) - } - return c.writeSync(b) -} - -func (c *Conn) writeSync(b []byte) (int, error) { - n, err := c.pipe.Write(b) - if err != nil { - if e, ok := err.(*net.OpError); ok { - e.Addr = c.raddr - e.Source = c.laddr - return n, e - } - return n, &net.OpError{ - Op: "write", - Addr: c.raddr, - Source: c.laddr, - Net: c.raddr.Network(), - Err: err, - } - } - return n, nil -} - -// writeAsync performs the Write operation in a goroutine. This -// behavior means the Write operation is not blocking, but also means -// that when Write operations fail the associated error is not returned -// from this function. -func (c *Conn) writeAsync(b []byte) (int, error) { - // Perform a synchronous Write if the connection has a non-zero - // value for the maximum allowed buffer size and if the size of - // the payload exceeds that maximum value. - if c.buf.max > 0 && uint64(len(b)) > c.buf.max { - return c.writeSync(b) - } - - // Block the operation from proceeding until there is available - // buffer space. - c.buf.cond.L.Lock() - for c.buf.max > 0 && uint64(len(b))+c.buf.cur > c.buf.max { - c.buf.cond.Wait() - } - - // Copy the buffer if the connection uses copy-on-write. - cb := b - if c.buf.cow { - cb = make([]byte, len(b)) - copy(cb, b) - } - - // Update the amount of active data being written. - c.buf.cur = c.buf.cur + uint64(len(cb)) - - c.buf.cond.L.Unlock() - - go func() { - if _, err := c.writeSync(cb); err != nil { - go func() { c.buf.errs <- err }() - } - - // Decrement the enqueued buffer size and signal a blocked - // goroutine that it may proceed - c.buf.cond.L.Lock() - c.buf.cur = c.buf.cur - uint64(len(cb)) - c.buf.cond.L.Unlock() - c.buf.cond.Signal() - }() - return len(cb), nil -} - -// SetReadDeadline implements the net.Conn SetReadDeadline method. -func (c *Conn) SetReadDeadline(t time.Time) error { - if err := c.pipe.SetReadDeadline(t); err != nil { - if e, ok := err.(*net.OpError); ok { - e.Addr = c.laddr - e.Source = c.laddr - return e - } - return &net.OpError{ - Op: "setReadDeadline", - Addr: c.laddr, - Source: c.laddr, - Net: c.laddr.Network(), - Err: err, - } - } - return nil -} - -// SetWriteDeadline implements the net.Conn SetWriteDeadline method. -func (c *Conn) SetWriteDeadline(t time.Time) error { - if err := c.pipe.SetWriteDeadline(t); err != nil { - if e, ok := err.(*net.OpError); ok { - e.Addr = c.laddr - e.Source = c.laddr - return e - } - return &net.OpError{ - Op: "setWriteDeadline", - Addr: c.laddr, - Source: c.laddr, - Net: c.laddr.Network(), - Err: err, - } - } - return nil -} diff --git a/vendor/github.com/akutz/memconn/memconn_listener.go b/vendor/github.com/akutz/memconn/memconn_listener.go deleted file mode 100644 index 91b5972851..0000000000 --- a/vendor/github.com/akutz/memconn/memconn_listener.go +++ /dev/null @@ -1,105 +0,0 @@ -package memconn - -import ( - "context" - "errors" - "net" - "sync" -) - -// Listener implements the net.Listener interface. -type Listener struct { - addr Addr - once sync.Once - rcvr chan *Conn - done chan struct{} - rmvd chan struct{} -} - -func (l *Listener) dial( - ctx context.Context, - network string, - laddr, raddr Addr) (*Conn, error) { - - local, remote := makeNewConns(network, laddr, raddr) - - // TODO Figure out if this logic is valid. - // - // Start a goroutine that closes the remote side of the connection - // as soon as the listener's done channel is no longer blocked. - //go func() { - // <-l.done - // remoteConn.Close() - //}() - - // If the provided context is nill then announce a new connection - // by placing the new remoteConn onto the rcvr channel. An Accept - // call from this listener will remove the remoteConn from the channel. - if ctx == nil { - l.rcvr <- remote - return local, nil - } - - // Announce a new connection by placing the new remoteConn - // onto the rcvr channel. An Accept call from this listener will - // remove the remoteConn from the channel. However, if that does - // not occur by the time the context times out / is cancelled, then - // an error is returned. - select { - case l.rcvr <- remote: - return local, nil - case <-ctx.Done(): - local.Close() - remote.Close() - return nil, &net.OpError{ - Addr: raddr, - Source: laddr, - Net: network, - Op: "dial", - Err: ctx.Err(), - } - } -} - -// Accept implements the net.Listener Accept method. -func (l *Listener) Accept() (net.Conn, error) { - return l.AcceptMemConn() -} - -// AcceptMemConn implements the net.Listener Accept method logic and -// returns a *memconn.Conn object. -func (l *Listener) AcceptMemConn() (*Conn, error) { - select { - case remoteConn, ok := <-l.rcvr: - if ok { - return remoteConn, nil - } - return nil, &net.OpError{ - Addr: l.addr, - Source: l.addr, - Net: l.addr.Network(), - Err: errors.New("listener closed"), - } - case <-l.done: - return nil, &net.OpError{ - Addr: l.addr, - Source: l.addr, - Net: l.addr.Network(), - Err: errors.New("listener closed"), - } - } -} - -// Close implements the net.Listener Close method. -func (l *Listener) Close() error { - l.once.Do(func() { - close(l.done) - <-l.rmvd - }) - return nil -} - -// Addr implements the net.Listener Addr method. -func (l *Listener) Addr() net.Addr { - return l.addr -} diff --git a/vendor/github.com/akutz/memconn/memconn_pipe.go b/vendor/github.com/akutz/memconn/memconn_pipe.go deleted file mode 100644 index a3a2a29fea..0000000000 --- a/vendor/github.com/akutz/memconn/memconn_pipe.go +++ /dev/null @@ -1,265 +0,0 @@ -// This file was copied from Go stdlib "net/pipe.go" -// and modified in order to optimally support: -// -// * Buffered writes -// * Custom local and remote address values -// * Error values that follow net.Conn's rules regarding -// net.OpError -// -// The above features could be implemented using the "net.Conn" values -// returned from the function "net.Pipe", but much of the same code -// would need to be duplicated regarding deadlines, done semantics, etc. -// Using the private "pipe" struct as the basis of a new, composite type -// is much more performant. -// -// FYI, the reason a new, composite type is used instead of modifying -// the existing type, "pipe", is to make it easier to replace this -// file with whatever changes Go stdlib make make to "net/pipe.go" in -// the future. -// -// This file is a Golang stdlib type and so the Go license is included: -// -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package memconn - -import ( - "io" - "net" - "sync" - "time" -) - -// pipeDeadline is an abstraction for handling timeouts. -type pipeDeadline struct { - mu sync.Mutex // Guards timer and cancel - timer *time.Timer - cancel chan struct{} // Must be non-nil -} - -func makePipeDeadline() pipeDeadline { - return pipeDeadline{cancel: make(chan struct{})} -} - -// set sets the point in time when the deadline will time out. -// A timeout event is signaled by closing the channel returned by waiter. -// Once a timeout has occurred, the deadline can be refreshed by specifying a -// t value in the future. -// -// A zero value for t prevents timeout. -func (d *pipeDeadline) set(t time.Time) { - d.mu.Lock() - defer d.mu.Unlock() - - if d.timer != nil && !d.timer.Stop() { - <-d.cancel // Wait for the timer callback to finish and close cancel - } - d.timer = nil - - // Time is zero, then there is no deadline. - closed := isClosedChan(d.cancel) - if t.IsZero() { - if closed { - d.cancel = make(chan struct{}) - } - return - } - - // Time in the future, setup a timer to cancel in the future. - if dur := time.Until(t); dur > 0 { - if closed { - d.cancel = make(chan struct{}) - } - d.timer = time.AfterFunc(dur, func() { - close(d.cancel) - }) - return - } - - // Time in the past, so close immediately. - if !closed { - close(d.cancel) - } -} - -// wait returns a channel that is closed when the deadline is exceeded. -func (d *pipeDeadline) wait() chan struct{} { - d.mu.Lock() - defer d.mu.Unlock() - return d.cancel -} - -func isClosedChan(c <-chan struct{}) bool { - select { - case <-c: - return true - default: - return false - } -} - -type timeoutError struct{} - -func (timeoutError) Error() string { return "deadline exceeded" } -func (timeoutError) Timeout() bool { return true } -func (timeoutError) Temporary() bool { return true } - -type pipeAddr struct{} - -func (pipeAddr) Network() string { return "pipe" } -func (pipeAddr) String() string { return "pipe" } - -type pipe struct { - wrMu sync.Mutex // Serialize Write operations - - // Used by local Read to interact with remote Write. - // Successful receive on rdRx is always followed by send on rdTx. - rdRx <-chan []byte - rdTx chan<- int - - // Used by local Write to interact with remote Read. - // Successful send on wrTx is always followed by receive on wrRx. - wrTx chan<- []byte - wrRx <-chan int - - once sync.Once // Protects closing localDone - localDone chan struct{} - remoteDone <-chan struct{} - - readDeadline pipeDeadline - writeDeadline pipeDeadline -} - -// Pipe creates a synchronous, in-memory, full duplex -// network connection; both ends implement the Conn interface. -// Reads on one end are matched with writes on the other, -// copying data directly between the two; there is no internal -// buffering. -func Pipe() (net.Conn, net.Conn) { - cb1 := make(chan []byte) - cb2 := make(chan []byte) - cn1 := make(chan int) - cn2 := make(chan int) - done1 := make(chan struct{}) - done2 := make(chan struct{}) - - p1 := &pipe{ - rdRx: cb1, rdTx: cn1, - wrTx: cb2, wrRx: cn2, - localDone: done1, remoteDone: done2, - readDeadline: makePipeDeadline(), - writeDeadline: makePipeDeadline(), - } - p2 := &pipe{ - rdRx: cb2, rdTx: cn2, - wrTx: cb1, wrRx: cn1, - localDone: done2, remoteDone: done1, - readDeadline: makePipeDeadline(), - writeDeadline: makePipeDeadline(), - } - return p1, p2 -} - -func (*pipe) LocalAddr() net.Addr { return pipeAddr{} } -func (*pipe) RemoteAddr() net.Addr { return pipeAddr{} } - -func (p *pipe) Read(b []byte) (int, error) { - n, err := p.read(b) - if err != nil && err != io.EOF && err != io.ErrClosedPipe { - err = &net.OpError{Op: "read", Net: "pipe", Err: err} - } - return n, err -} - -func (p *pipe) read(b []byte) (n int, err error) { - switch { - case isClosedChan(p.localDone): - return 0, io.ErrClosedPipe - case isClosedChan(p.remoteDone): - return 0, io.EOF - case isClosedChan(p.readDeadline.wait()): - return 0, timeoutError{} - } - - select { - case bw := <-p.rdRx: - nr := copy(b, bw) - p.rdTx <- nr - return nr, nil - case <-p.localDone: - return 0, io.ErrClosedPipe - case <-p.remoteDone: - return 0, io.EOF - case <-p.readDeadline.wait(): - return 0, timeoutError{} - } -} - -func (p *pipe) Write(b []byte) (int, error) { - n, err := p.write(b) - if err != nil && err != io.ErrClosedPipe { - err = &net.OpError{Op: "write", Net: "pipe", Err: err} - } - return n, err -} - -func (p *pipe) write(b []byte) (n int, err error) { - switch { - case isClosedChan(p.localDone): - return 0, io.ErrClosedPipe - case isClosedChan(p.remoteDone): - return 0, io.ErrClosedPipe - case isClosedChan(p.writeDeadline.wait()): - return 0, timeoutError{} - } - - p.wrMu.Lock() // Ensure entirety of b is written together - defer p.wrMu.Unlock() - for once := true; once || len(b) > 0; once = false { - select { - case p.wrTx <- b: - nw := <-p.wrRx - b = b[nw:] - n += nw - case <-p.localDone: - return n, io.ErrClosedPipe - case <-p.remoteDone: - return n, io.ErrClosedPipe - case <-p.writeDeadline.wait(): - return n, timeoutError{} - } - } - return n, nil -} - -func (p *pipe) SetDeadline(t time.Time) error { - if isClosedChan(p.localDone) || isClosedChan(p.remoteDone) { - return io.ErrClosedPipe - } - p.readDeadline.set(t) - p.writeDeadline.set(t) - return nil -} - -func (p *pipe) SetReadDeadline(t time.Time) error { - if isClosedChan(p.localDone) || isClosedChan(p.remoteDone) { - return io.ErrClosedPipe - } - p.readDeadline.set(t) - return nil -} - -func (p *pipe) SetWriteDeadline(t time.Time) error { - if isClosedChan(p.localDone) || isClosedChan(p.remoteDone) { - return io.ErrClosedPipe - } - p.writeDeadline.set(t) - return nil -} - -func (p *pipe) Close() error { - p.once.Do(func() { close(p.localDone) }) - return nil -} diff --git a/vendor/github.com/akutz/memconn/memconn_provider.go b/vendor/github.com/akutz/memconn/memconn_provider.go deleted file mode 100644 index ec9d767878..0000000000 --- a/vendor/github.com/akutz/memconn/memconn_provider.go +++ /dev/null @@ -1,245 +0,0 @@ -package memconn - -import ( - "context" - "errors" - "fmt" - "net" - "sync" - "time" -) - -// Provider is used to track named MemConn objects. -type Provider struct { - nets networkMap - listeners listenerCache -} - -type listenerCache struct { - sync.RWMutex - cache map[string]*Listener -} - -type networkMap struct { - sync.RWMutex - cache map[string]string -} - -// MapNetwork enables mapping the network value provided to this Provider's -// Dial and Listen functions from the specified "from" value to the -// specified "to" value. -// -// For example, calling MapNetwork("tcp", "memu") means a subsequent -// Dial("tcp", "address") gets translated to Dial("memu", "address"). -// -// Calling MapNetwork("tcp", "") removes any previous translation for -// the "tcp" network. -func (p *Provider) MapNetwork(from, to string) { - p.nets.Lock() - defer p.nets.Unlock() - if p.nets.cache == nil { - p.nets.cache = map[string]string{} - } - if to == "" { - delete(p.nets.cache, from) - return - } - p.nets.cache[from] = to -} - -func (p *Provider) mapNetwork(network string) string { - p.nets.RLock() - defer p.nets.RUnlock() - if to, ok := p.nets.cache[network]; ok { - return to - } - return network -} - -// Listen begins listening at address for the specified network. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// When the specified address is already in use on the specified -// network an error is returned. -// -// When the provided network is unknown the operation defers to -// net.Dial. -func (p *Provider) Listen(network, address string) (net.Listener, error) { - switch p.mapNetwork(network) { - case networkMemb, networkMemu: - return p.ListenMem( - network, &Addr{Name: address, network: network}) - default: - return net.Listen(network, address) - } -} - -// ListenMem begins listening at laddr. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// If laddr is nil then ListenMem listens on "localhost" on the -// specified network. -func (p *Provider) ListenMem(network string, laddr *Addr) (*Listener, error) { - - switch p.mapNetwork(network) { - case networkMemb, networkMemu: - // If laddr is not specified then set it to the reserved name - // "localhost". - if laddr == nil { - laddr = &Addr{Name: addrLocalhost, network: network} - } else { - laddr.network = network - } - default: - return nil, &net.OpError{ - Addr: laddr, - Source: laddr, - Net: network, - Op: "listen", - Err: errors.New("unknown network"), - } - } - - p.listeners.Lock() - defer p.listeners.Unlock() - - if p.listeners.cache == nil { - p.listeners.cache = map[string]*Listener{} - } - - if _, ok := p.listeners.cache[laddr.Name]; ok { - return nil, &net.OpError{ - Addr: laddr, - Source: laddr, - Net: network, - Op: "listen", - Err: errors.New("addr unavailable"), - } - } - - l := &Listener{ - addr: *laddr, - done: make(chan struct{}), - rmvd: make(chan struct{}), - rcvr: make(chan *Conn, 1), - } - - // Start a goroutine that removes the listener from - // the cache once the listener is closed. - go func() { - <-l.done - p.listeners.Lock() - defer p.listeners.Unlock() - delete(p.listeners.cache, laddr.Name) - close(l.rmvd) - }() - - p.listeners.cache[laddr.Name] = l - return l, nil -} - -// Dial dials a named connection. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// When the provided network is unknown the operation defers to -// net.Dial. -func (p *Provider) Dial(network, address string) (net.Conn, error) { - return p.DialContext(nil, network, address) -} - -// DialMem dials a named connection. -// -// Known networks are "memb" (memconn buffered) and "memu" (memconn unbuffered). -// -// If laddr is nil then a new address is generated using -// time.Now().UnixNano(). Please note that client addresses are -// not required to be unique. -// -// If raddr is nil then the "localhost" endpoint is used on the -// specified network. -func (p *Provider) DialMem( - network string, laddr, raddr *Addr) (*Conn, error) { - - return p.DialMemContext(nil, network, laddr, raddr) -} - -// DialContext dials a named connection using a -// Go context to provide timeout behavior. -// -// Please see Dial for more information. -func (p *Provider) DialContext( - ctx context.Context, - network, address string) (net.Conn, error) { - - switch p.mapNetwork(network) { - case networkMemb, networkMemu: - return p.DialMemContext( - ctx, network, nil, &Addr{ - Name: address, - network: network, - }) - default: - if ctx == nil { - return net.Dial(network, address) - } - return (&net.Dialer{}).DialContext(ctx, network, address) - } -} - -// DialMemContext dials a named connection using a -// Go context to provide timeout behavior. -// -// Please see DialMem for more information. -func (p *Provider) DialMemContext( - ctx context.Context, - network string, - laddr, raddr *Addr) (*Conn, error) { - - switch p.mapNetwork(network) { - case networkMemb, networkMemu: - // If laddr is not specified then create one with the current - // epoch in nanoseconds. This value need not be unique. - if laddr == nil { - laddr = &Addr{ - Name: fmt.Sprintf("%d", time.Now().UnixNano()), - network: network, - } - } else { - laddr.network = network - } - if raddr == nil { - raddr = &Addr{Name: addrLocalhost, network: network} - } else { - raddr.network = network - } - default: - return nil, &net.OpError{ - Addr: raddr, - Source: laddr, - Net: network, - Op: "dial", - Err: errors.New("unknown network"), - } - } - - p.listeners.RLock() - defer p.listeners.RUnlock() - - if l, ok := p.listeners.cache[raddr.Name]; ok { - // Update the provided raddr with the actual network type used - // by the listener. - raddr.network = l.addr.network - return l.dial(ctx, network, *laddr, *raddr) - } - - return nil, &net.OpError{ - Addr: raddr, - Source: laddr, - Net: network, - Op: "dial", - Err: errors.New("unknown remote address"), - } -} diff --git a/vendor/github.com/rexray/gocsi/.gitignore b/vendor/github.com/rexray/gocsi/.gitignore deleted file mode 100644 index c1cc000460..0000000000 --- a/vendor/github.com/rexray/gocsi/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# The etcd binary, log, and default data directory -/etcd -/etcd.log -default.etcd - -# The vendor dir -/vendor - -# The csi-sp test log file -csi-sp.log - -# The archives built from this package. -/*.a -/middleware/*.a - -# A temporary build dir -.build/ - -# Protoc and protoc-gen-go related files -/protoc -/protoc-gen-go - -# 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 - -# A macOS metadata file -.DS_Store diff --git a/vendor/github.com/rexray/gocsi/.travis.yml b/vendor/github.com/rexray/gocsi/.travis.yml deleted file mode 100644 index 61a4fcf25f..0000000000 --- a/vendor/github.com/rexray/gocsi/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Setting "sudo" to false forces Travis-CI to use its -# container-based build infrastructure, which has shorter -# queue times. -sudo: false - -# Use the newer Travis-CI build templates based on the -# Debian Linux distribution "Trusty" release. -dist: trusty - -# Select Go as the language used to run the buid. -language: go -go: 1.12 -go_import_path: github.com/rexray/gocsi - -jobs: - include: - - # Test GoCSI's gocsi.sh script by creating and serving new SP and - # then using csc to invoke GetSupportedVersions and GetPluginInfo - - stage: test - env: JOB=csi-sp - install: make -C csc - script: make $JOB - - # Test the utils package. - - stage: test - env: JOB=test-utils - script: make $JOB - - # Test the Mock SP's idempotent behavior. - - stage: test - env: JOB=test-idempotent - script: make $JOB - - # Test GoCSI with the Mock SP and etcd as the distributed lock - # provider. - - stage: test - env: JOB=test-etcd - script: make $JOB - - # Test the serial volume middleware's etcd distributed lock - # provider. - - stage: test - env: JOB=test-serialvolume-etcd - script: make $JOB diff --git a/vendor/github.com/rexray/gocsi/CONTRIBUTING.md b/vendor/github.com/rexray/gocsi/CONTRIBUTING.md deleted file mode 100644 index c2437cfdf7..0000000000 --- a/vendor/github.com/rexray/gocsi/CONTRIBUTING.md +++ /dev/null @@ -1,248 +0,0 @@ -# Contributing to GoCSI -The GoCSI project welcomes and depends on contributions from the open -source community. Whether a developer or user, contributions are not -just source code: - -- Code patches via pull requests -- Documentation improvements -- Bug reports and patch reviews - -## Reporting an Issue -Please include as much detail as you can. This includes: - - * The OS type and version - * The CSI API version - * The GoCSI version - * A set of logs with debug-logging enabled that show the problem - -## Testing the Development Version -The quickest way to use the bleeding edge copy of GoCSI or one of its -components is with the following command: - -```shell -$ go get -u github.com/rexray/gocsi -``` - -## Running the tests -The following command executes GoCSI's test suite: - -```shell -$ go test ./testing -``` - -## Submitting Changes -Changes to GoCSI are accepted via GitHub pull requests. All changes are -reviewed prior to acceptance, and if source code has been changed please -remember to update the related tests. - -All developers are required to follow the -[GitHub Flow model](https://guides.github.com/introduction/flow/) when -proposing new features or even submitting fixes. - -Please note that although not explicitly stated in the referenced GitHub Flow -model, all work should occur on a __fork__ of this project, not from within a -branch of this project itself. - -Pull requests submitted to this project should adhere to the following -guidelines: - - * Branches should be rebased off of the upstream master prior to being - opened as pull requests and again prior to merge. This is to ensure that - the build system accounts for any changes that may only be detected during - the build and test phase. - - * Unless granted an exception a pull request should contain only a single - commit. This is because features and patches should be atomic -- wholly - shippable items that are either included in a release, or not. Please - squash commits on a branch before opening a pull request. It is not a - deal-breaker otherwise, but please be prepared to add a comment or - explanation as to why you feel multiple commits are required. - -People contributing code to this project must adhere to the following rules. -These standards are in place to keep code clean, consistent, and stable. - -## Documentation -There are two types of documentation: source and markdown. - -### Source Code -All source code should be documented in accordance with the -[Go's documentation rules](http://blog.golang.org/godoc-documenting-go-code). - -### Markdown -When creating or modifying the project's `README.md` file or any other -Markdown documentation, please keep the following rules in mind: - -1. All markdown should be limited to a width of 80 characters. This makes -the document easier to read in text editors. GitHub still produces the -proper result when parsing the markdown. -2. All links to internal resources should be relative. -3. All links to markdown files should include the file extension. - -## Style & Syntax -All source files should be processed by the following tools prior to being -committed. Any errors or warnings produced by the tools should be corrected -before the source is committed. - -Tool | Description ------|------------ -[gofmt](https://golang.org/cmd/gofmt/) | A golang source formatting tool -[golint](https://github.com/golang/lint) | A golang linter -[govet](https://golang.org/cmd/vet/) | A golang source optimization tool -[gocyclo](https://github.com/fzipp/gocyclo) | A golang cyclomatic complexity detection tool. No function should have a score above 0.15 - -The [go-plus](https://atom.io/packages/go-plus) plug-in is available for -the [Atom](https://atom.io/) IDE and will handle all of the above tooling -automatically. - -Another option is to use a client-side, pre-commit hook to ensure that the -sources meet the required standards. For example, in the project's `.git/hooks` -directory create a file called `pre-commit` and mark it as executable. Then -paste the following content inside the file: - -```shell -#!/bin/sh -gofmt -w $(find . -name "*.go" | grep -v ./vendor) -``` - -The above script will execute prior to a Git commit operation, prior to even -the commit message dialog. The script will invoke `gofmt` for all of the -project's Go source files. If the command returns a non-zero exit code, -the commit operation will abort with the error. - -## Commit Messages -Commit messages should follow the guide [5 Useful Tips For a Better Commit -Message](https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message). -The two primary rules to which to adhere are: - - 1. Commit message subjects should not exceed 50 characters in total and - should be followed by a blank line. - - 2. The commit message's body should not have a width that exceeds 72 - characters. - -For example, the following commit has a very useful message that is succinct -without losing utility. - -```text -commit b6498b3ecf290b77666f80e3c237ea59b6d569d7 -Author: akutz -Date: Mon Feb 5 19:33:03 2018 -0600 - - Spec Validation for Response Msgs - Off & Detailed - - This patch updates the way GoCSI's specification validation middleware - handles response validation: - - * Validating response messages against the CSI specification now is now - disabled by default. Use `X_CSI_SPEC_REP_VALIDATION=true` to enable - response validation. - * When enabled, response validation no longer drops the response - message. Instead the message is encoded into a gRPC error's `Details` - field and the error code is set to `Internal`. - - The test `With Invalid Plug-in Name Error` in the file - `./testing/identity_test.go` demonstrates how to reconstitute the - response data on the client-side when the server-side middleware marks - the response as invalid. - - This is a necessary and important change. An SP is capable of making - changes to an underlying storage platform. The results of such changes - are reflected in CSI response messages. Dropping these messages could - render a client unable to acknowledge a change has occurred, and could - potentially lead to further errors, such as data loss. This change - both allows for response message validation and still enables clients - to reconstitute the response data, even when it is marked in error. -``` - -Please note that the output above is the full output for viewing a commit. -However, because the above message adheres to the commit message rules, it's -quite easy to show just the commit's subject: - -```shell -$ git show b6498b3ecf290b77666f80e3c237ea59b6d569d7 --format="%s" -s -Spec Validation for Response Msgs - Off & Detailed -``` - -It's also equally simple to print the commit's subject and body together: - -```shell -$ git show b6498b3ecf290b77666f80e3c237ea59b6d569d7 --format="%s%n%n%b" -s -Spec Validation for Response Msgs - Off & Detailed - -This patch updates the way GoCSI's specification validation middleware -handles response validation: - -* Validating response messages against the CSI specification now is now - disabled by default. Use `X_CSI_SPEC_REP_VALIDATION=true` to enable - response validation. -* When enabled, response validation no longer drops the response - message. Instead the message is encoded into a gRPC error's `Details` - field and the error code is set to `Internal`. - -The test `With Invalid Plug-in Name Error` in the file -`./testing/identity_test.go` demonstrates how to reconstitute the -response data on the client-side when the server-side middleware marks -the response as invalid. - -This is a necessary and important change. An SP is capable of making -changes to an underlying storage platform. The results of such changes -are reflected in CSI response messages. Dropping these messages could -render a client unable to acknowledge a change has occurred, and could -potentially lead to further errors, such as data loss. This change -both allows for response message validation and still enables clients -to reconstitute the response data, even when it is marked in error. -``` - -## 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. -1 Letterman Drive -Suite D4700 -San Francisco, CA, 94129 - -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/rexray/gocsi/LICENSE b/vendor/github.com/rexray/gocsi/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/vendor/github.com/rexray/gocsi/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/rexray/gocsi/Makefile b/vendor/github.com/rexray/gocsi/Makefile deleted file mode 100644 index 92d16ae699..0000000000 --- a/vendor/github.com/rexray/gocsi/Makefile +++ /dev/null @@ -1,202 +0,0 @@ -all: build - -################################################################################ -## VERIFY GO VERSION ## -################################################################################ -# Go 1.11+ required for Go modules. -GO_VERSION_EXP := "go1.11" -GO_VERSION_ACT := $(shell a="$$(go version | awk '{print $$3}')" && test $$(printf '%s\n%s' "$${a}" "$(GO_VERSION_EXP)" | sort | tail -n 1) = "$${a}" && printf '%s' "$${a}") -ifndef GO_VERSION_ACT -$(error Requires Go $(GO_VERSION_EXP)+ for Go module support) -endif -MOD_NAME := $(shell head -n 1 > $(CSI_SP_DIR)/go.mod - cat go.mod | grep -v ^module >> $(CSI_SP_DIR)/go.mod - ./gocsi.sh $(CSI_SP_IMPORT) - -csi-sp: $(CSI_SP_LOG) -$(CSI_SP_LOG): $(CSI_SP) - $(MAKE) -C csc - @echo && \ - printf '=%.0s' $$(seq 1 80) && printf '\n== ' && \ - printf "%-74s" "starting $( $(CSI_SP_LOG) 2>&1 & - @for i in 1 2 3 4 5 6 7 8 9 10; do \ - if grep -q "msg=serving" $(CSI_SP_LOG); then break; \ - else sleep 0.1; fi \ - done - @echo && \ - printf '=%.0s' $$(seq 1 80) && printf '\n== ' && \ - printf "%-74s" "invoking GetPluginInfo" && printf ' ==\n' && \ - printf '=%.0s' $$(seq 1 80) && echo - csc/csc -e $(CSI_SP_SOCK) i info - @echo && \ - printf '=%.0s' $$(seq 1 80) && printf '\n== ' && \ - printf "%-74s" "killing $( etcd.log 2>&1 & - $(ETCD_ENDPOINT) go test \ - $(MOD_NAME)/middleware/serialvolume/etcd || test "$$?" -eq "197" - pkill etcd - -test-etcd: | $(ETCD) - @rm -fr default.etcd etcd.log - ./etcd > etcd.log 2>&1 & - $(ETCD_ENDPOINT) go test $(MOD_NAME)/testing \ - -ginkgo.skip "Idempotent Create" \ - $(GINKGO_RUN_OPTS) || test "$$?" -eq "197" - pkill etcd - -test-idempotent: - go test $(MOD_NAME)/testing \ - $(GINKGO_RUN_OPTS) -ginkgo.focus "Idempotent Create" || test "$$?" -eq "197" - -test-utils: - go test $(MOD_NAME)/utils $(GINKGO_RUN_OPTS) || test "$$?" -eq "197" - -test: - $(MAKE) test-utils - $(MAKE) test-idempotent - $(MAKE) test-serialvolume-etcd - $(MAKE) test-etcd - -.PHONY: test \ - test-utils \ - test-idempotent \ - test-serialvolume-etcd \ - test-testing-etcd - - -######################################################################## -## BUILD ## -######################################################################## - -build: deps $(GOCSI_A) - $(MAKE) -C csc $@ - $(MAKE) -C mock $@ - -clean: - go clean -i -v . ./csc - rm -f $(GOCSI_A) $(GOCSI_A_PKG_DEPS) - $(MAKE) -C csc $@ - $(MAKE) -C mock $@ - -clobber: clean - $(MAKE) -C csc $@ - $(MAKE) -C mock $@ - -.PHONY: build test bench clean clobber diff --git a/vendor/github.com/rexray/gocsi/README.md b/vendor/github.com/rexray/gocsi/README.md deleted file mode 100644 index 8ac62e50ac..0000000000 --- a/vendor/github.com/rexray/gocsi/README.md +++ /dev/null @@ -1,441 +0,0 @@ -# GoCSI -The Container Storage Interface -([CSI](https://github.com/container-storage-interface/spec)) -is an industry standard specification for creating storage plug-ins -for container orchestrators. GoCSI aids in the development and testing -of CSI storage plug-ins (SP): - -| Component | Description | -|-----------|-------------| -| [csc](./csc/) | CSI command line interface (CLI) client | -| [gocsi](#bootstrapper) | Go-based CSI SP bootstrapper | -| [mock](./mock) | Mock CSI SP | - -## Quick Start -The following example illustrates using Docker in combination with the -GoCSI SP bootstrapper to create a new CSI SP from scratch, serve it on a -UNIX socket, and then use the GoCSI command line client [`csc`](./csc/) to -invoke the `GetPluginInfo` RPC: - -```shell -$ docker run -it golang:latest sh -c \ - "go get github.com/rexray/gocsi && \ - make -C src/github.com/rexray/gocsi csi-sp" -``` - - -## Bootstrapping a Storage Plug-in -The root of the GoCSI project enables storage administrators and developers -alike to bootstrap a CSI SP: - -```shell -$ ./gocsi.sh -usage: ./gocsi.sh GO_IMPORT_PATH -``` - -### Bootstrap Example -The GoCSI [Mock SP](./mock) illustrates the features and configuration options -available via the bootstrapping method. The following example demonstrates -creating a new SP at the Go import path `github.com/rexray/csi-sp`: - -```shell -$ ./gocsi.sh github.com/rexray/csi-sp -creating project directories: - /home/akutz/go/src/github.com/rexray/csi-sp - /home/akutz/go/src/github.com/rexray/csi-sp/provider - /home/akutz/go/src/github.com/rexray/csi-sp/service -creating project files: - /home/akutz/go/src/github.com/rexray/csi-sp/main.go - /home/akutz/go/src/github.com/rexray/csi-sp/provider/provider.go - /home/akutz/go/src/github.com/rexray/csi-sp/service/service.go - /home/akutz/go/src/github.com/rexray/csi-sp/service/controller.go - /home/akutz/go/src/github.com/rexray/csi-sp/service/identity.go - /home/akutz/go/src/github.com/rexray/csi-sp/service/node.go -use golang/dep? Enter yes (default) or no and press [ENTER]: - downloading golang/dep@v0.3.2 - executing dep init -building csi-sp: - success! - example: CSI_ENDPOINT=csi.sock \ - /home/akutz/go/src/github.com/rexray/csi-sp/csi-sp -``` - -The new SP adheres to the following structure: - -``` -|-- provider -| | -| |-- provider.go -| -|-- service -| | -| |-- controller.go -| |-- identity.go -| |-- node.go -| |-- service.go -| -|-- main.go -``` - -### Provider -The `provider` package leverages GoCSI to construct an SP from the CSI -services defined in `service` package. The file `provider.go` may be -modified to: - -* Supply default values for the SP's environment variable configuration properties - -Please see the Mock SP's [`provider.go`](./mock/provider/provider.go) file -for a more complete example. - -### Service -The `service` package is where the business logic occurs. The files `controller.go`, -`identity.go`, and `node.go` each correspond to their eponymous CSI services. A -developer creating a new CSI SP with GoCSI will work mostly in these files. Each -of the files have a complete skeleton implementation for their respective service's -remote procedure calls (RPC). - -### Main -The root, or `main`, package leverages GoCSI to launch the SP as a stand-alone -server process. The only requirement is that the environment variable `CSI_ENDPOINT` -must be set, otherwise a help screen is emitted that lists all of the SP's available -configuration options (environment variables). - -## Configuration -All CSI SPs created using this package are able to leverage the following -environment variables: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
CSI_ENDPOINT -

The CSI endpoint may also be specified by the environment variable - CSI_ENDPOINT. The endpoint should adhere to Go's network address - pattern:

-
    -
  • tcp://host:port
  • -
  • unix:///path/to/file.sock
  • -
-

If the network type is omitted then the value is assumed to be an - absolute or relative filesystem path to a UNIX socket file.

-
X_CSI_MODE -

Specifies the service mode of the storage plug-in. Valid - values are:

-
    -
  • <empty>
  • -
  • controller
  • -
  • node
  • -
-

If unset or set to an empty value the storage plug-in activates - both controller and node services. The identity service is always - activated.

-
X_CSI_ENDPOINT_PERMS -

When CSI_ENDPOINT is set to a UNIX socket file - this environment variable may be used to specify the socket's file - permissions. Please note this value has no effect if - CSI_ENDPOINT specifies a TCP socket.

-

The default value is 0755.

-
X_CSI_ENDPOINT_USER -

When CSI_ENDPOINT is set to a UNIX socket file - this environment variable may be used to specify the UID or name - of the user that owns the file. Please note this value has no effect - if CSI_ENDPOINT specifies a TCP socket.

-

The default value is the user that starts the process.

-
X_CSI_ENDPOINT_GROUP -

When CSI_ENDPOINT is set to a UNIX socket file - this environment variable may be used to specify the GID or name - of the group that owns the file. Please note this value has no effect - if CSI_ENDPOINT specifies a TCP socket.

-

The default value is the group that starts the process.

-
X_CSI_DEBUGA true value is equivalent to: -
    -
  • X_CSI_LOG_LEVEL=debug
  • -
  • X_CSI_REQ_LOGGING=true
  • -
  • X_CSI_REP_LOGGING=true
  • -
-
X_CSI_LOG_LEVEL -

The log level. Valid values include:

-
    -
  • PANIC
  • -
  • FATAL
  • -
  • ERROR
  • -
  • WARN
  • -
  • INFO
  • -
  • DEBUG
  • -
-

The default value is WARN.

-
X_CSI_REQ_LOGGING

A flag that enables logging of incoming requests to - STDOUT.

-

Enabling this option sets X_CSI_REQ_ID_INJECTION=true.

-
X_CSI_REP_LOGGING

A flag that enables logging of incoming responses to - STDOUT.

-

Enabling this option sets X_CSI_REQ_ID_INJECTION=true.

-
X_CSI_LOG_DISABLE_VOL_CTX

A flag that disables the logging of the VolumeContext field.

-

Only takes effect if Request or Reply logging is enabled.

-
X_CSI_REQ_ID_INJECTIONA flag that enables request ID injection. The ID is parsed from - the incoming request's metadata with a key of - csi.requestid. - If no value for that key is found then a new request ID is - generated using an atomic sequence counter.
X_CSI_SPEC_VALIDATIONSetting X_CSI_SPEC_VALIDATION=true is the same as: -
    -
  • X_CSI_SPEC_REQ_VALIDATION=true
  • -
  • X_CSI_SPEC_REP_VALIDATION=true
  • -
-
X_CSI_SPEC_REQ_VALIDATIONA flag that enables the validation of CSI request messages.
X_CSI_SPEC_REP_VALIDATIONA flag that enables the validation of CSI response messages. - Invalid responses are marshalled into a gRPC error with a code - of Internal.
X_CSI_SPEC_DISABLE_LEN_CHECKA flag that disables validation of CSI message field lengths.
X_CSI_REQUIRE_STAGING_TARGET_PATH -

A flag that enables treating the following fields as required:

-
    -
  • NodePublishVolumeRequest.StagingTargetPath
  • -
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_VOL_CONTEXT -

A flag that enables treating the following fields as required:

-
    -
  • ControllerPublishVolumeRequest.VolumeContext
  • -
  • ValidateVolumeCapabilitiesRequest.VolumeContext
  • -
  • ValidateVolumeCapabilitiesResponse.VolumeContext
  • -
  • NodeStageVolumeRequest.VolumeContext
  • -
  • NodePublishVolumeRequest.VolumeContext
  • -
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_PUB_CONTEXT -

A flag that enables treating the following fields as required:

-
    -
  • ControllerPublishVolumeResponse.PublishContext
  • -
  • NodeStageVolumeRequest.PublishContext
  • -
  • NodePublishVolumeRequest.PublishContext
  • -
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDSA true value is equivalent to: -
    -
  • X_CSI_REQUIRE_CREDS_CREATE_VOL=true
  • -
  • X_CSI_REQUIRE_CREDS_DELETE_VOL=true
  • -
  • X_CSI_REQUIRE_CREDS_CTRLR_PUB_VOL=true
  • -
  • X_CSI_REQUIRE_CREDS_CTRLR_UNPUB_VOL=true
  • -
  • X_CSI_REQUIRE_CREDS_NODE_PUB_VOL=true
  • -
  • X_CSI_REQUIRE_CREDS_NODE_UNPUB_VOL=true
  • -
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDS_CREATE_VOL -

A flag that enables treating the following fields as required:

-
  • CreateVolumeRequest.UserCredentials
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDS_DELETE_VOL -

A flag that enables treating the following fields as required:

-
  • DeleteVolumeRequest.UserCredentials
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDS_CTRLR_PUB_VOL -

A flag that enables treating the following fields as required:

-
  • ControllerPublishVolumeRequest.UserCredentials
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDS_CTRLR_UNPUB_VOL -

A flag that enables treating the following fields as required:

-
  • ControllerUnpublishVolumeRequest.UserCredentials
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDS_NODE_STG_VOL -

A flag that enables treating the following fields as required:

-
  • NodeStageVolumeRequest.UserCredentials
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_REQUIRE_CREDS_NODE_PUB_VOL -

A flag that enables treating the following fields as required:

-
  • NodePublishVolumeRequest.UserCredentials
-

Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true

-
X_CSI_SERIAL_VOL_ACCESSA flag that enables the serial volume access middleware.
X_CSI_SERIAL_VOL_ACCESS_TIMEOUTA - time.Duration string that determines how long the - serial volume access middleware waits to obtain a lock for the request's - volume before returning the gRPC error code FailedPrecondition to - indicate an operation is already pending for the specified volume.
X_CSI_SERIAL_VOL_ACCESS_ETCD_ENDPOINTSA list comma-separated etcd endpoint values. If this environment - variable is defined then the serial volume access middleware will - automatically use etcd for locking, providing distributed serial - volume access.
X_CSI_SERIAL_VOL_ACCESS_ETCD_DOMAINThe etcd key prefix to use with the locks that provide - distributed, serial volume access. The key paths are: -
    -
  • /DOMAIN/volumesByID/VOLUME_ID
  • -
  • /DOMAIN/volumesByName/VOLUME_NAME
  • -
X_CSI_SERIAL_VOL_ACCESS_ETCD_TTLThe length of time etcd will wait before releasing ownership of - a distributed lock if the lock's session has not been renewed.
X_CSI_SERIAL_VOL_ACCESS_ETCD_AUTO_SYNC_INTERVALA time.Duration string that specifies the interval to update - endpoints with its latest members. A value of 0 disables - auto-sync. By default auto-sync is disabled.
X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_TIMEOUTA time.Duration string that specifies the timeout for failing to - establish a connection.
X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_KEEP_ALIVE_TIMEA time.Duration string that defines the time after which the client - pings the server to see if the transport is alive.
X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_KEEP_ALIVE_TIMEOUTA time.Duration string that defines the time that the client waits for - a response for the keep-alive probe. If the response is not received - in this time, the connection is closed.
X_CSI_SERIAL_VOL_ACCESS_ETCD_MAX_CALL_SEND_MSG_SZDefines the client-side request send limit in bytes. If 0, it defaults - to 2.0 MiB (2 * 1024 * 1024). Make sure that "MaxCallSendMsgSize" < - server-side default send/recv limit. ("--max-request-bytes" flag to - etcd or "embed.Config.MaxRequestBytes").
X_CSI_SERIAL_VOL_ACCESS_ETCD_MAX_CALL_RECV_MSG_SZDefines the client-side response receive limit. If 0, it defaults to - "math.MaxInt32", because range response can easily exceed request send - limits. Make sure that "MaxCallRecvMsgSize" >= server-side default - send/recv limit. ("--max-request-bytes" flag to etcd or - "embed.Config.MaxRequestBytes").
X_CSI_SERIAL_VOL_ACCESS_ETCD_USERNAMEThe user name used for authentication.
X_CSI_SERIAL_VOL_ACCESS_ETCD_PASSWORDThe password used for authentication.
X_CSI_SERIAL_VOL_ACCESS_ETCD_REJECT_OLD_CLUSTERA flag that indicates refusal to create a client against an outdated - cluster.
X_CSI_SERIAL_VOL_ACCESS_ETCD_TLSA flag that indicates the client should use TLS.
X_CSI_SERIAL_VOL_ACCESS_ETCD_TLS_INSECUREA flag that indicates the TLS connection should not verify peer - certificates.
diff --git a/vendor/github.com/rexray/gocsi/VERSION b/vendor/github.com/rexray/gocsi/VERSION deleted file mode 100644 index 8f0916f768..0000000000 --- a/vendor/github.com/rexray/gocsi/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.5.0 diff --git a/vendor/github.com/rexray/gocsi/context/context.go b/vendor/github.com/rexray/gocsi/context/context.go deleted file mode 100644 index 694ed65ee0..0000000000 --- a/vendor/github.com/rexray/gocsi/context/context.go +++ /dev/null @@ -1,128 +0,0 @@ -package context - -import ( - "context" - "os" - "strconv" - "strings" - - "google.golang.org/grpc/metadata" -) - -// RequestIDKey is the key used to put/get a CSI request ID -// in/fromt a Go context. -const RequestIDKey = "csi.requestid" - -var ( - // ctxRequestIDKey is an interface-wrapped key used to access the - // gRPC request ID injected into an outgoing or incoming context - // via the GoCSI request ID injection interceptor - ctxRequestIDKey = interface{}("x-csi-request-id") - - // ctxOSEnviron is an interface-wrapped key used to access a string - // slice that contains one or more environment variables stored as - // KEY=VALUE. - ctxOSEnviron = interface{}("os.Environ") - - // ctxOSLookupEnvKey is an interface-wrapped key used to access a function - // with the signature func(string) (string, bool) that returns the value of - // an environment variable. - ctxOSLookupEnvKey = interface{}("os.LookupEnv") - - // ctxOSSetenvKey is an interface-wrapped key used to access a function - // with the signature func(string, string) that can be used to set the - // value of an environment variable - ctxOSSetenvKey = interface{}("os.Setenev") -) - -type lookupEnvFunc func(string) (string, bool) -type setenvFunc func(string, string) error - -// GetRequestID inspects the context for gRPC metadata and returns -// its request ID if available. -func GetRequestID(ctx context.Context) (uint64, bool) { - var ( - szID []string - szIDOK bool - ) - - // Prefer the incoming context, but look in both types. - if md, ok := metadata.FromIncomingContext(ctx); ok { - szID, szIDOK = md[RequestIDKey] - } else if md, ok := metadata.FromOutgoingContext(ctx); ok { - szID, szIDOK = md[RequestIDKey] - } - - if szIDOK && len(szID) == 1 { - if id, err := strconv.ParseUint(szID[0], 10, 64); err == nil { - return id, true - } - } - - return 0, false -} - -// WithEnviron returns a new Context with the provided environment variable -// string slice. -func WithEnviron(ctx context.Context, v []string) context.Context { - return context.WithValue(ctx, ctxOSEnviron, v) -} - -// WithLookupEnv returns a new Context with the provided function. -func WithLookupEnv(ctx context.Context, f lookupEnvFunc) context.Context { - return context.WithValue(ctx, ctxOSLookupEnvKey, f) -} - -// WithSetenv returns a new Context with the provided function. -func WithSetenv(ctx context.Context, f setenvFunc) context.Context { - return context.WithValue(ctx, ctxOSSetenvKey, f) -} - -// LookupEnv returns the value of the provided environment variable by: -// -// 1. Inspecting the context for a key "os.Environ" with a string -// slice value. If such a key and value exist then the string slice -// is searched for the specified key and if found its value is returned. -// -// 2. Inspecting the context for a key "os.LookupEnv" with a value of -// func(string) (string, bool). If such a key and value exist then the -// function is used to attempt to discover the key's value. If the -// key and value are found they are returned. -// -// 3. Returning the result of os.LookupEnv. -func LookupEnv(ctx context.Context, key string) (string, bool) { - if s, ok := ctx.Value(ctxOSEnviron).([]string); ok { - for _, v := range s { - p := strings.SplitN(v, "=", 2) - if len(p) > 0 && strings.EqualFold(p[0], key) { - if len(p) > 1 { - return p[1], true - } - return "", true - } - } - } - if f, ok := ctx.Value(ctxOSLookupEnvKey).(lookupEnvFunc); ok { - if v, ok := f(key); ok { - return v, true - } - } - return os.LookupEnv(key) -} - -// Getenv is an alias for LookupEnv and drops the boolean return value. -func Getenv(ctx context.Context, key string) string { - val, _ := LookupEnv(ctx, key) - return val -} - -// Setenv sets the value of the provided environment variable to the -// specified value by first inspecting the context for a key "os.Setenv" -// with a value of func(string, string) error. If the context does not -// contain such a function then os.Setenv is used instead. -func Setenv(ctx context.Context, key, val string) error { - if f, ok := ctx.Value(ctxOSSetenvKey).(setenvFunc); ok { - return f(key, val) - } - return os.Setenv(key, val) -} diff --git a/vendor/github.com/rexray/gocsi/envvars.go b/vendor/github.com/rexray/gocsi/envvars.go deleted file mode 100644 index bca112132f..0000000000 --- a/vendor/github.com/rexray/gocsi/envvars.go +++ /dev/null @@ -1,331 +0,0 @@ -package gocsi - -import ( - "context" - "strconv" - "strings" - - log "github.com/sirupsen/logrus" - - csictx "github.com/rexray/gocsi/context" - "github.com/rexray/gocsi/utils" -) - -const ( - // EnvVarEndpoint is the name of the environment variable used to - // specify the CSI endpoint. - EnvVarEndpoint = "CSI_ENDPOINT" - - // EnvVarEndpointPerms is the name of the environment variable used - // to specify the file permissions for the CSI endpoint when it is - // a UNIX socket file. This setting has no effect if CSI_ENDPOINT - // specifies a TCP socket. The default value is 0755. - EnvVarEndpointPerms = "X_CSI_ENDPOINT_PERMS" - - // EnvVarEndpointUser is the name of the environment variable used - // to specify the UID or name of the user that owns the endpoint's - // UNIX socket file. This setting has no effect if CSI_ENDPOINT - // specifies a TCP socket. The default value is the user that starts - // the process. - EnvVarEndpointUser = "X_CSI_ENDPOINT_USER" - - // EnvVarEndpointGroup is the name of the environment variable used - // to specify the GID or name of the group that owns the endpoint's - // UNIX socket file. This setting has no effect if CSI_ENDPOINT - // specifies a TCP socket. The default value is the group that starts - // the process. - EnvVarEndpointGroup = "X_CSI_ENDPOINT_GROUP" - - // EnvVarDebug is the name of the environment variable used to - // determine whether or not debug mode is enabled. - // - // Setting this environment variable to a truthy value is the - // equivalent of X_CSI_LOG_LEVEL=DEBUG, X_CSI_REQ_LOGGING=true, - // and X_CSI_REP_LOGGING=true. - EnvVarDebug = "X_CSI_DEBUG" - - // EnvVarLogLevel is the name of the environment variable used to - // specify the log level. Valid values include PANIC, FATAL, ERROR, - // WARN, INFO, and DEBUG. - EnvVarLogLevel = "X_CSI_LOG_LEVEL" - - // EnvVarPluginInfo is the name of the environment variable used to - // specify the plug-in info in the format: - // - // NAME, VENDOR_VERSION[, MANIFEST...] - // - // The MANIFEST value may be a series of additional comma-separated - // key/value pairs. - // - // Please see the encoding/csv package (https://goo.gl/1j1xb9) for - // information on how to quote keys and/or values to include leading - // and trailing whitespace. - // - // Setting this environment variable will cause the program to - // bypass the SP's GetPluginInfo RPC and returns the specified - // information instead. - EnvVarPluginInfo = "X_CSI_PLUGIN_INFO" - - // EnvVarMode is the name of the environment variable used to specify - // the service mode of the storage plug-in. Valie values are: - // - // * - // * controller - // * node - // - // If unset or set to an empty value the storage plug-in activates - // both controller and node services. The identity service is always - // activated. - EnvVarMode = "X_CSI_MODE" - - // EnvVarReqLogging is the name of the environment variable - // used to determine whether or not to enable request logging. - // - // Setting this environment variable to a truthy value enables - // request logging to STDOUT. - EnvVarReqLogging = "X_CSI_REQ_LOGGING" - - // EnvVarRepLogging is the name of the environment variable - // used to determine whether or not to enable response logging. - // - // Setting this environment variable to a truthy value enables - // response logging to STDOUT. - EnvVarRepLogging = "X_CSI_REP_LOGGING" - - // EnvVarLoggingDisableVolCtx is the name of the environment variable - // used to disable the logging of the VolumeContext field when request or - // response logging is enabled. - // - // Setting this environment variable to a truthy value disables the logging - // of the VolumeContext field - EnvVarLoggingDisableVolCtx = "X_CSI_LOG_DISABLE_VOL_CTX" - - // EnvVarReqIDInjection is the name of the environment variable - // used to determine whether or not to enable request ID injection. - EnvVarReqIDInjection = "X_CSI_REQ_ID_INJECTION" - - // EnvVarSpecValidation is the name of the environment variable - // used to determine whether or not to enable validation of CSI - // request and response messages. Setting X_CSI_SPEC_VALIDATION=true - // is the equivalent to setting X_CSI_SPEC_REQ_VALIDATION=true and - // X_CSI_SPEC_REP_VALIDATION=true. - EnvVarSpecValidation = "X_CSI_SPEC_VALIDATION" - - // EnvVarSpecReqValidation is the name of the environment variable - // used to determine whether or not to enable validation of CSI request - // messages. - EnvVarSpecReqValidation = "X_CSI_SPEC_REQ_VALIDATION" - - // EnvVarSpecRepValidation is the name of the environment variable - // used to determine whether or not to enable validation of CSI response - // messages. Invalid responses are marshalled into a gRPC error with - // a code of "Internal." - EnvVarSpecRepValidation = "X_CSI_SPEC_REP_VALIDATION" - - // EnvVarDisableFieldLen is the name of the environment variable used - // to determine whether or not to disable validation of CSI request and - // response field lengths against the permitted lenghts defined in the spec - EnvVarDisableFieldLen = "X_CSI_SPEC_DISABLE_LEN_CHECK" - - // EnvVarRequireStagingTargetPath is the name of the environment variable - // used to determine whether or not the NodePublishVolume request field - // StagingTargetPath is required. - EnvVarRequireStagingTargetPath = "X_CSI_REQUIRE_STAGING_TARGET_PATH" - - // EnvVarRequireVolContext is the name of the environment variable used - // to determine whether or not volume context is required for - // requests that accept it and responses that return it such as - // NodePublishVolume and ControllerPublishVolume. - EnvVarRequireVolContext = "X_CSI_REQUIRE_VOL_CONTEXT" - - // EnvVarRequirePubContext is the name of the environment variable used - // to determine whether or not publish context is required for - // requests that accept it and responses that return it such as - // NodePublishVolume and ControllerPublishVolume. - EnvVarRequirePubContext = "X_CSI_REQUIRE_PUB_CONTEXT" - - // EnvVarCreds is the name of the environment variable - // used to determine whether or not user credentials are required for - // all RPCs. This value may be overridden for specific RPCs. - EnvVarCreds = "X_CSI_REQUIRE_CREDS" - - // EnvVarCredsCreateVol is the name of the environment variable - // used to determine whether or not user credentials are required for - // the eponymous RPC. - EnvVarCredsCreateVol = "X_CSI_REQUIRE_CREDS_CREATE_VOL" - - // EnvVarCredsDeleteVol is the name of the environment variable - // used to determine whether or not user credentials are required for - // the eponymous RPC. - EnvVarCredsDeleteVol = "X_CSI_REQUIRE_CREDS_DELETE_VOL" - - // EnvVarCredsCtrlrPubVol is the name of the environment - // variable used to determine whether or not user credentials are required - // for the eponymous RPC. - EnvVarCredsCtrlrPubVol = "X_CSI_REQUIRE_CREDS_CTRLR_PUB_VOL" - - // EnvVarCredsCtrlrUnpubVol is the name of the - // environment variable used to determine whether or not user credentials - // are required for the eponymous RPC. - EnvVarCredsCtrlrUnpubVol = "X_CSI_REQUIRE_CREDS_CTRLR_UNPUB_VOL" - - // EnvVarCredsNodeStgVol is the name of the environment - // variable used to determine whether or not user credentials are required - // for the eponymous RPC. - EnvVarCredsNodeStgVol = "X_CSI_REQUIRE_CREDS_NODE_STG_VOL" - - // EnvVarCredsNodePubVol is the name of the environment - // variable used to determine whether or not user credentials are required - // for the eponymous RPC. - EnvVarCredsNodePubVol = "X_CSI_REQUIRE_CREDS_NODE_PUB_VOL" - - // EnvVarSerialVolAccess is the name of the environment variable - // used to determine whether or not to enable serial volume access. - EnvVarSerialVolAccess = "X_CSI_SERIAL_VOL_ACCESS" - - // EnvVarSerialVolAccessTimeout is the name of the environment variable - // used to specify the timeout for obtaining a volume lock. - EnvVarSerialVolAccessTimeout = "X_CSI_SERIAL_VOL_ACCESS_TIMEOUT" - - // EnvVarSerialVolAccessEtcdDomain is the name of the environment - // variable that defines the lock provider's concurrency domain. - EnvVarSerialVolAccessEtcdDomain = "X_CSI_SERIAL_VOL_ACCESS_ETCD_DOMAIN" - - // EnvVarSerialVolAccessEtcdTTL is the name of the environment - // variable that defines the length of time etcd will wait before - // releasing ownership of a distributed lock if the lock's session - // has not been renewed. - EnvVarSerialVolAccessEtcdTTL = "X_CSI_SERIAL_VOL_ACCESS_ETCD_TTL" - - // EnvVarSerialVolAccessEtcdEndpoints is the name of the environment - // variable that defines the lock provider's etcd endoints. - EnvVarSerialVolAccessEtcdEndpoints = "X_CSI_SERIAL_VOL_ACCESS_ETCD_ENDPOINTS" - - // EnvVarSerialVolAccessEtcdAutoSyncInterval is the name of the environment - // variable that defines the interval to update endpoints with its latest - // members. 0 disables auto-sync. By default auto-sync is disabled. - EnvVarSerialVolAccessEtcdAutoSyncInterval = "X_CSI_SERIAL_VOL_ACCESS_ETCD_AUTO_SYNC_INTERVAL" - - // EnvVarSerialVolAccessEtcdDialTimeout is the name of the environment - // variable that defines the timeout for failing to establish a connection. - EnvVarSerialVolAccessEtcdDialTimeout = "X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_TIMEOUT" - - // EnvVarSerialVolAccessEtcdDialKeepAliveTime is the name of the environment - // variable that defines the time after which client pings the server to see - // if transport is alive. - EnvVarSerialVolAccessEtcdDialKeepAliveTime = "X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_KEEP_ALIVE_TIME" - - // EnvVarSerialVolAccessEtcdDialKeepAliveTimeout is the name of the - // environment variable that defines the time that the client waits for a - // response for the keep-alive probe. If the response is not received in - // this time, the connection is closed. - EnvVarSerialVolAccessEtcdDialKeepAliveTimeout = "X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_KEEP_ALIVE_TIMEOUT" - - // EnvVarSerialVolAccessEtcdMaxCallSendMsgSz is the name of the environment - // variable that defines the client-side request send limit in bytes. - // If 0, it defaults to 2.0 MiB (2 * 1024 * 1024). - // Make sure that "MaxCallSendMsgSize" < server-side default send/recv - // limit. ("--max-request-bytes" flag to etcd or - // "embed.Config.MaxRequestBytes"). - EnvVarSerialVolAccessEtcdMaxCallSendMsgSz = "X_CSI_SERIAL_VOL_ACCESS_ETCD_MAX_CALL_SEND_MSG_SZ" - - // EnvVarSerialVolAccessEtcdMaxCallRecvMsgSz is the name of the environment - // variable that defines the client-side response receive limit. - // If 0, it defaults to "math.MaxInt32", because range response can - // easily exceed request send limits. - // Make sure that "MaxCallRecvMsgSize" >= server-side default send/recv - // limit. ("--max-request-bytes" flag to etcd or - // "embed.Config.MaxRequestBytes"). - EnvVarSerialVolAccessEtcdMaxCallRecvMsgSz = "X_CSI_SERIAL_VOL_ACCESS_ETCD_MAX_CALL_RECV_MSG_SZ" - - // EnvVarSerialVolAccessEtcdUsername is the name of the environment - // variable that defines the user name used for authentication. - EnvVarSerialVolAccessEtcdUsername = "X_CSI_SERIAL_VOL_ACCESS_ETCD_USERNAME" - - // EnvVarSerialVolAccessEtcdPassword is the name of the environment - // variable that defines the password used for authentication. - EnvVarSerialVolAccessEtcdPassword = "X_CSI_SERIAL_VOL_ACCESS_ETCD_PASSWORD" - - // EnvVarSerialVolAccessEtcdRejectOldCluster is the name of the environment - // variable that defines when set will refuse to create a client against - // an outdated cluster. - EnvVarSerialVolAccessEtcdRejectOldCluster = "X_CSI_SERIAL_VOL_ACCESS_ETCD_REJECT_OLD_CLUSTER" - - // EnvVarSerialVolAccessEtcdTLS is the name of the environment - // variable that defines whether or not the client should attempt - // to use TLS when connecting to the server. - EnvVarSerialVolAccessEtcdTLS = "X_CSI_SERIAL_VOL_ACCESS_ETCD_TLS" - - // EnvVarSerialVolAccessEtcdTLSInsecure is the name of the environment - // variable that defines whether or not the TLS connection should - // verify certificates. - EnvVarSerialVolAccessEtcdTLSInsecure = "X_CSI_SERIAL_VOL_ACCESS_ETCD_TLS_INSECURE" -) - -func (sp *StoragePlugin) initEnvVars(ctx context.Context) { - - // Copy the environment variables from the public EnvVar - // string slice to the private envVars map for quick lookup. - sp.envVars = map[string]string{} - for _, v := range sp.EnvVars { - // Environment variables must adhere to one of the following - // formats: - // - // - ENV_VAR_KEY= - // - ENV_VAR_KEY=ENV_VAR_VAL - pair := strings.SplitN(v, "=", 2) - if len(pair) < 1 || len(pair) > 2 { - continue - } - - // Ensure the environment variable is stored in all upper-case - // to make subsequent map-lookups deterministic. - key := strings.ToUpper(pair[0]) - - // Check to see if the value for the key is available from the - // context's os.Environ or os.LookupEnv functions. If neither - // return a value then use the provided default value. - var val string - if v, ok := csictx.LookupEnv(ctx, key); ok { - val = v - } else if len(pair) > 1 { - val = pair[1] - } - sp.envVars[key] = val - } - - // Check for the debug value. - if v, ok := csictx.LookupEnv(ctx, EnvVarDebug); ok { - if ok, _ := strconv.ParseBool(v); ok { - csictx.Setenv(ctx, EnvVarReqLogging, "true") - csictx.Setenv(ctx, EnvVarRepLogging, "true") - } - } - - return -} - -func (sp *StoragePlugin) initPluginInfo(ctx context.Context) { - szInfo, ok := csictx.LookupEnv(ctx, EnvVarPluginInfo) - if !ok { - return - } - info := strings.SplitN(szInfo, ",", 3) - fields := map[string]interface{}{} - if len(info) > 0 { - sp.pluginInfo.Name = strings.TrimSpace(info[0]) - fields["name"] = sp.pluginInfo.Name - } - if len(info) > 1 { - sp.pluginInfo.VendorVersion = strings.TrimSpace(info[1]) - fields["vendorVersion"] = sp.pluginInfo.VendorVersion - } - if len(info) > 2 { - sp.pluginInfo.Manifest = utils.ParseMap(strings.TrimSpace(info[2])) - fields["manifest"] = sp.pluginInfo.Manifest - } - - if len(fields) > 0 { - log.WithFields(fields).Debug("init plug-in info") - } -} diff --git a/vendor/github.com/rexray/gocsi/gocsi.go b/vendor/github.com/rexray/gocsi/gocsi.go deleted file mode 100644 index fe4c6c76e7..0000000000 --- a/vendor/github.com/rexray/gocsi/gocsi.go +++ /dev/null @@ -1,548 +0,0 @@ -//go:generate make - -// Package gocsi provides a Container Storage Interface (CSI) library, -// client, and other helpful utilities. -package gocsi - -import ( - "bufio" - "context" - "errors" - "flag" - "fmt" - "io" - "net" - "os" - "os/signal" - "os/user" - "regexp" - "strconv" - "strings" - "sync" - "syscall" - "text/template" - - "github.com/container-storage-interface/spec/lib/go/csi" - log "github.com/sirupsen/logrus" - "google.golang.org/grpc" - - csictx "github.com/rexray/gocsi/context" - "github.com/rexray/gocsi/utils" -) - -// Run launches a CSI storage plug-in. -func Run( - ctx context.Context, - appName, appDescription, appUsage string, - sp StoragePluginProvider) { - - // Check for the debug value. - if v, ok := csictx.LookupEnv(ctx, EnvVarDebug); ok { - if ok, _ := strconv.ParseBool(v); ok { - csictx.Setenv(ctx, EnvVarLogLevel, "debug") - csictx.Setenv(ctx, EnvVarReqLogging, "true") - csictx.Setenv(ctx, EnvVarRepLogging, "true") - } - } - - // Adjust the log level. - lvl := log.InfoLevel - if v, ok := csictx.LookupEnv(ctx, EnvVarLogLevel); ok { - var err error - if lvl, err = log.ParseLevel(v); err != nil { - lvl = log.InfoLevel - } - } - log.SetLevel(lvl) - - printUsage := func() { - // app is the information passed to the printUsage function - app := struct { - Name string - Description string - Usage string - BinPath string - }{ - appName, - appDescription, - appUsage, - os.Args[0], - } - - t, err := template.New("t").Parse(usage) - if err != nil { - log.WithError(err).Fatalln("failed to parse usage template") - } - if err := t.Execute(os.Stderr, app); err != nil { - log.WithError(err).Fatalln("failed emitting usage") - } - return - } - - // Check for a help flag. - fs := flag.NewFlagSet("csp", flag.ExitOnError) - fs.Usage = printUsage - var help bool - fs.BoolVar(&help, "?", false, "") - err := fs.Parse(os.Args) - if err == flag.ErrHelp || help { - printUsage() - os.Exit(1) - } - - // If no endpoint is set then print the usage. - if os.Getenv(EnvVarEndpoint) == "" { - printUsage() - os.Exit(1) - } - - l, err := utils.GetCSIEndpointListener() - if err != nil { - log.WithError(err).Fatalln("failed to listen") - } - - // Define a lambda that can be used in the exit handler - // to remove a potential UNIX sock file. - var rmSockFileOnce sync.Once - rmSockFile := func() { - rmSockFileOnce.Do(func() { - if l == nil || l.Addr() == nil { - return - } - if l.Addr().Network() == netUnix { - sockFile := l.Addr().String() - os.RemoveAll(sockFile) - log.WithField("path", sockFile).Info("removed sock file") - } - }) - } - - trapSignals(func() { - sp.GracefulStop(ctx) - rmSockFile() - log.Info("server stopped gracefully") - }, func() { - sp.Stop(ctx) - rmSockFile() - log.Info("server aborted") - }) - - if err := sp.Serve(ctx, l); err != nil { - rmSockFile() - log.WithError(err).Fatal("grpc failed") - } -} - -// StoragePluginProvider is able to serve a gRPC endpoint that provides -// the CSI services: Controller, Identity, Node. -type StoragePluginProvider interface { - - // Serve accepts incoming connections on the listener lis, creating - // a new ServerTransport and service goroutine for each. The service - // goroutine read gRPC requests and then call the registered handlers - // to reply to them. Serve returns when lis.Accept fails with fatal - // errors. lis will be closed when this method returns. - // Serve always returns non-nil error. - Serve(ctx context.Context, lis net.Listener) error - - // Stop stops the gRPC server. It immediately closes all open - // connections and listeners. - // It cancels all active RPCs on the server side and the corresponding - // pending RPCs on the client side will get notified by connection - // errors. - Stop(ctx context.Context) - - // GracefulStop stops the gRPC server gracefully. It stops the server - // from accepting new connections and RPCs and blocks until all the - // pending RPCs are finished. - GracefulStop(ctx context.Context) -} - -// StoragePlugin is the collection of services and data used to server -// a new gRPC endpoint that acts as a CSI storage plug-in (SP). -type StoragePlugin struct { - // Controller is the eponymous CSI service. - Controller csi.ControllerServer - - // Identity is the eponymous CSI service. - Identity csi.IdentityServer - - // Node is the eponymous CSI service. - Node csi.NodeServer - - // ServerOpts is a list of gRPC server options used when serving - // the SP. This list should not include a gRPC interceptor option - // as one is created automatically based on the interceptor configuration - // or provided list of interceptors. - ServerOpts []grpc.ServerOption - - // Interceptors is a list of gRPC server interceptors to use when - // serving the SP. This list should not include the interceptors - // defined in the GoCSI package as those are configured by default - // based on runtime configuration settings. - Interceptors []grpc.UnaryServerInterceptor - - // BeforeServe is an optional callback that is invoked after the - // StoragePlugin has been initialized, just prior to the creation - // of the gRPC server. This callback may be used to perform custom - // initialization logic, modify the interceptors and server options, - // or prevent the server from starting by returning a non-nil error. - BeforeServe func(context.Context, *StoragePlugin, net.Listener) error - - // EnvVars is a list of default environment variables and values. - EnvVars []string - - serveOnce sync.Once - stopOnce sync.Once - server *grpc.Server - - envVars map[string]string - pluginInfo csi.GetPluginInfoResponse -} - -// Serve accepts incoming connections on the listener lis, creating -// a new ServerTransport and service goroutine for each. The service -// goroutine read gRPC requests and then call the registered handlers -// to reply to them. Serve returns when lis.Accept fails with fatal -// errors. lis will be closed when this method returns. -// Serve always returns non-nil error. -func (sp *StoragePlugin) Serve(ctx context.Context, lis net.Listener) error { - var err error - sp.serveOnce.Do(func() { - // Please note that the order of the below init functions is - // important and should not be altered unless by someone aware - // of how they work. - - // Adding this function to the context allows `csictx.LookupEnv` - // to search this SP's default env vars for a value. - ctx = csictx.WithLookupEnv(ctx, sp.lookupEnv) - - // Adding this function to the context allows `csictx.Setenv` - // to set environment variables in this SP's env var store. - ctx = csictx.WithSetenv(ctx, sp.setenv) - - // Initialize the storage plug-in's environment variables map. - sp.initEnvVars(ctx) - - // Adjust the endpoint's file permissions. - if err = sp.initEndpointPerms(ctx, lis); err != nil { - return - } - - // Adjust the endpoint's file ownership. - if err = sp.initEndpointOwner(ctx, lis); err != nil { - return - } - - // Initialize the storage plug-in's info. - sp.initPluginInfo(ctx) - - // Initialize the interceptors. - sp.initInterceptors(ctx) - - // Invoke the SP's BeforeServe function to give the SP a chance - // to perform any local initialization routines. - if f := sp.BeforeServe; f != nil { - if err = f(ctx, sp, lis); err != nil { - return - } - } - - // Add the interceptors to the server if any are configured. - if i := sp.Interceptors; len(i) > 0 { - sp.ServerOpts = append(sp.ServerOpts, - grpc.UnaryInterceptor(utils.ChainUnaryServer(i...))) - } - - // Initialize the gRPC server. - sp.server = grpc.NewServer(sp.ServerOpts...) - - // Register the CSI services. - // Always require the identity service. - if sp.Identity == nil { - err = errors.New("identity service is required") - return - } - // Either a Controller or Node service should be supplied. - if sp.Controller == nil && sp.Node == nil { - err = errors.New( - "either a controller or node service is required") - return - } - - // Always register the identity service. - csi.RegisterIdentityServer(sp.server, sp.Identity) - log.Info("identity service registered") - - // Determine which of the controller/node services to register - mode := csictx.Getenv(ctx, EnvVarMode) - if strings.EqualFold(mode, "controller") { - mode = "controller" - } else if strings.EqualFold(mode, "node") { - mode = "node" - } else { - mode = "" - } - - if mode == "" || mode == "controller" { - if sp.Controller == nil { - err = errors.New("controller service is required") - return - } - csi.RegisterControllerServer(sp.server, sp.Controller) - log.Info("controller service registered") - } - if mode == "" || mode == "node" { - if sp.Node == nil { - err = errors.New("node service is required") - return - } - csi.RegisterNodeServer(sp.server, sp.Node) - log.Info("node service registered") - } - - endpoint := fmt.Sprintf( - "%s://%s", - lis.Addr().Network(), lis.Addr().String()) - log.WithField("endpoint", endpoint).Info("serving") - - // Start the gRPC server. - err = sp.server.Serve(lis) - return - }) - return err -} - -// Stop stops the gRPC server. It immediately closes all open -// connections and listeners. -// It cancels all active RPCs on the server side and the corresponding -// pending RPCs on the client side will get notified by connection -// errors. -func (sp *StoragePlugin) Stop(ctx context.Context) { - sp.stopOnce.Do(func() { - if sp.server != nil { - sp.server.Stop() - } - log.Info("stopped") - }) -} - -// GracefulStop stops the gRPC server gracefully. It stops the server -// from accepting new connections and RPCs and blocks until all the -// pending RPCs are finished. -func (sp *StoragePlugin) GracefulStop(ctx context.Context) { - sp.stopOnce.Do(func() { - if sp.server != nil { - sp.server.GracefulStop() - } - log.Info("gracefully stopped") - }) -} - -const netUnix = "unix" - -func (sp *StoragePlugin) initEndpointPerms( - ctx context.Context, lis net.Listener) error { - - if lis.Addr().Network() != netUnix { - return nil - } - - v, ok := csictx.LookupEnv(ctx, EnvVarEndpointPerms) - if !ok || v == "0755" { - return nil - } - u, err := strconv.ParseUint(v, 8, 32) - if err != nil { - return err - } - - p := lis.Addr().String() - m := os.FileMode(u) - - log.WithFields(map[string]interface{}{ - "path": p, - "mode": m, - }).Info("chmod csi endpoint") - - if err := os.Chmod(p, m); err != nil { - return err - } - - return nil -} - -func (sp *StoragePlugin) initEndpointOwner( - ctx context.Context, lis net.Listener) error { - - if lis.Addr().Network() != netUnix { - return nil - } - - var ( - usrName string - grpName string - - uid = os.Getuid() - gid = os.Getgid() - puid = uid - pgid = gid - ) - - if v, ok := csictx.LookupEnv(ctx, EnvVarEndpointUser); ok { - m, err := regexp.MatchString(`^\d+$`, v) - if err != nil { - return err - } - usrName = v - szUID := v - if m { - u, err := user.LookupId(v) - if err != nil { - return err - } - usrName = u.Username - } else { - u, err := user.Lookup(v) - if err != nil { - return err - } - szUID = u.Uid - } - iuid, err := strconv.Atoi(szUID) - if err != nil { - return err - } - uid = iuid - } - - if v, ok := csictx.LookupEnv(ctx, EnvVarEndpointGroup); ok { - m, err := regexp.MatchString(`^\d+$`, v) - if err != nil { - return err - } - grpName = v - szGID := v - if m { - u, err := user.LookupGroupId(v) - if err != nil { - return err - } - grpName = u.Name - } else { - u, err := user.LookupGroup(v) - if err != nil { - return err - } - szGID = u.Gid - } - igid, err := strconv.Atoi(szGID) - if err != nil { - return err - } - gid = igid - } - - if uid != puid || gid != pgid { - f := lis.Addr().String() - log.WithFields(map[string]interface{}{ - "uid": usrName, - "gid": grpName, - "path": f, - }).Info("chown csi endpoint") - if err := os.Chown(f, uid, gid); err != nil { - return err - } - } - - return nil -} - -func (sp *StoragePlugin) lookupEnv(key string) (string, bool) { - val, ok := sp.envVars[key] - return val, ok -} - -func (sp *StoragePlugin) setenv(key, val string) error { - sp.envVars[key] = val - return nil -} - -func (sp *StoragePlugin) getEnvBool(ctx context.Context, key string) bool { - v, ok := csictx.LookupEnv(ctx, key) - if !ok { - return false - } - if b, err := strconv.ParseBool(v); err == nil { - return b - } - return false -} - -func trapSignals(onExit, onAbort func()) { - sigc := make(chan os.Signal, 1) - sigs := []os.Signal{ - syscall.SIGTERM, - syscall.SIGHUP, - syscall.SIGINT, - syscall.SIGQUIT, - } - signal.Notify(sigc, sigs...) - go func() { - for s := range sigc { - ok, graceful := isExitSignal(s) - if !ok { - continue - } - if !graceful { - log.WithField("signal", s).Error("received signal; aborting") - if onAbort != nil { - onAbort() - } - os.Exit(1) - } - log.WithField("signal", s).Info("received signal; shutting down") - if onExit != nil { - onExit() - } - os.Exit(0) - } - }() -} - -// isExitSignal returns a flag indicating whether a signal SIGHUP, -// SIGINT, SIGTERM, or SIGQUIT. The second return value is whether it is a -// graceful exit. This flag is true for SIGTERM, SIGHUP, SIGINT, and SIGQUIT. -func isExitSignal(s os.Signal) (bool, bool) { - switch s { - case syscall.SIGTERM, - syscall.SIGHUP, - syscall.SIGINT, - syscall.SIGQUIT: - return true, true - default: - return false, false - } -} - -type logger struct { - f func(msg string, args ...interface{}) - w io.Writer -} - -func newLogger(f func(msg string, args ...interface{})) *logger { - l := &logger{f: f} - r, w := io.Pipe() - l.w = w - go func() { - scan := bufio.NewScanner(r) - for scan.Scan() { - f(scan.Text()) - } - }() - return l -} - -func (l *logger) Write(data []byte) (int, error) { - return l.w.Write(data) -} diff --git a/vendor/github.com/rexray/gocsi/gocsi.sh b/vendor/github.com/rexray/gocsi/gocsi.sh deleted file mode 100644 index 738f3684f0..0000000000 --- a/vendor/github.com/rexray/gocsi/gocsi.sh +++ /dev/null @@ -1,362 +0,0 @@ -#!/bin/sh - -HOME=${HOME:-/tmp} -GOPATH=${GOPATH:-$HOME/go} -GOPATH=$(echo "$GOPATH" | awk '{print $1}') - -if [ "$1" = "" ]; then - echo "usage: $0 GO_IMPORT_PATH" - exit 1 -fi - -SP_PATH=$1 -SP_DIR=$GOPATH/src/$SP_PATH -SP_NAME=$(basename "$SP_PATH") - -echo "creating project directories:" -echo " $SP_DIR" -echo " $SP_DIR/provider" -echo " $SP_DIR/service" -mkdir -p "$SP_DIR" "$SP_DIR/provider" "$SP_DIR/service" -cd "$SP_DIR" > /dev/null 2>&1 || exit 1 - -echo "creating project files:" -echo " $SP_DIR/main.go" -cat << EOF > "main.go" -package main - -import ( - "context" - - "github.com/rexray/gocsi" - - "$SP_PATH/provider" - "$SP_PATH/service" -) - -// main is ignored when this package is built as a go plug-in. -func main() { - gocsi.Run( - context.Background(), - service.Name, - "A description of the SP", - "", - provider.New()) -} -EOF - -echo " $SP_DIR/provider/provider.go" -cat << EOF > "provider/provider.go" -package provider - -import ( - "context" - "net" - - log "github.com/sirupsen/logrus" - "github.com/rexray/gocsi" - - "$SP_PATH/service" -) - -// New returns a new CSI Storage Plug-in Provider. -func New() gocsi.StoragePluginProvider { - svc := service.New() - return &gocsi.StoragePlugin{ - Controller: svc, - Identity: svc, - Node: svc, - - // BeforeServe allows the SP to participate in the startup - // sequence. This function is invoked directly before the - // gRPC server is created, giving the callback the ability to - // modify the SP's interceptors, server options, or prevent the - // server from starting by returning a non-nil error. - BeforeServe: func( - ctx context.Context, - sp *gocsi.StoragePlugin, - lis net.Listener) error { - - log.WithField("service", service.Name).Debug("BeforeServe") - return nil - }, - - EnvVars: []string{ - // Enable request validation. - gocsi.EnvVarSpecReqValidation + "=true", - - // Enable serial volume access. - gocsi.EnvVarSerialVolAccess + "=true", - }, - } -} -EOF - -echo " $SP_DIR/service/service.go" -cat << EOF > "service/service.go" -package service - -import ( - "github.com/container-storage-interface/spec/lib/go/csi" -) - -const ( - // Name is the name of this CSI SP. - Name = "$SP_NAME" - - // VendorVersion is the version of this CSP SP. - VendorVersion = "0.0.0" -) - -// Service is a CSI SP and idempotency.Provider. -type Service interface { - csi.ControllerServer - csi.IdentityServer - csi.NodeServer -} - -type service struct{} - -// New returns a new Service. -func New() Service { - return &service{} -} -EOF - -echo " $SP_DIR/service/controller.go" -cat << EOF > "service/controller.go" -package service - -import ( - "golang.org/x/net/context" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -func (s *service) CreateVolume( - ctx context.Context, - req *csi.CreateVolumeRequest) ( - *csi.CreateVolumeResponse, error) { - - return nil, nil -} - -func (s *service) DeleteVolume( - ctx context.Context, - req *csi.DeleteVolumeRequest) ( - *csi.DeleteVolumeResponse, error) { - - return nil, nil -} - -func (s *service) ControllerPublishVolume( - ctx context.Context, - req *csi.ControllerPublishVolumeRequest) ( - *csi.ControllerPublishVolumeResponse, error) { - - return nil, nil -} - -func (s *service) ControllerUnpublishVolume( - ctx context.Context, - req *csi.ControllerUnpublishVolumeRequest) ( - *csi.ControllerUnpublishVolumeResponse, error) { - - return nil, nil -} - -func (s *service) ValidateVolumeCapabilities( - ctx context.Context, - req *csi.ValidateVolumeCapabilitiesRequest) ( - *csi.ValidateVolumeCapabilitiesResponse, error) { - - return nil, nil -} - -func (s *service) ListVolumes( - ctx context.Context, - req *csi.ListVolumesRequest) ( - *csi.ListVolumesResponse, error) { - - return nil, nil -} - -func (s *service) GetCapacity( - ctx context.Context, - req *csi.GetCapacityRequest) ( - *csi.GetCapacityResponse, error) { - - return nil, nil -} - -func (s *service) ControllerGetCapabilities( - ctx context.Context, - req *csi.ControllerGetCapabilitiesRequest) ( - *csi.ControllerGetCapabilitiesResponse, error) { - - return nil, nil -} - -func (s *service) CreateSnapshot( - ctx context.Context, - req *csi.CreateSnapshotRequest) ( - *csi.CreateSnapshotResponse, error) { - - return nil, nil -} - -func (s *service) DeleteSnapshot( - ctx context.Context, - req *csi.DeleteSnapshotRequest) ( - *csi.DeleteSnapshotResponse, error) { - - return nil, nil -} - -func (s *service) ListSnapshots( - ctx context.Context, - req *csi.ListSnapshotsRequest) ( - *csi.ListSnapshotsResponse, error) { - - return nil, nil -} - -func (s *service) ControllerExpandVolume( - ctx context.Context, - req *csi.ControllerExpandVolumeRequest) ( - *csi.ControllerExpandVolumeResponse, error) { - - return nil, nil -} - -EOF - -echo " $SP_DIR/service/identity.go" -cat << EOF > "service/identity.go" -package service - -import ( - "golang.org/x/net/context" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -func (s *service) GetPluginInfo( - ctx context.Context, - req *csi.GetPluginInfoRequest) ( - *csi.GetPluginInfoResponse, error) { - - return nil, nil -} - -func (s *service) GetPluginCapabilities( - ctx context.Context, - req *csi.GetPluginCapabilitiesRequest) ( - *csi.GetPluginCapabilitiesResponse, error) { - - return nil, nil -} - -func (s *service) Probe( - ctx context.Context, - req *csi.ProbeRequest) ( - *csi.ProbeResponse, error) { - - return nil, nil -} -EOF - -echo " $SP_DIR/service/node.go" -cat << EOF > "service/node.go" -package service - -import ( - "golang.org/x/net/context" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -func (s *service) NodeStageVolume( - ctx context.Context, - req *csi.NodeStageVolumeRequest) ( - *csi.NodeStageVolumeResponse, error) { - - return nil, nil -} - -func (s *service) NodeUnstageVolume( - ctx context.Context, - req *csi.NodeUnstageVolumeRequest) ( - *csi.NodeUnstageVolumeResponse, error) { - - return nil, nil -} - -func (s *service) NodePublishVolume( - ctx context.Context, - req *csi.NodePublishVolumeRequest) ( - *csi.NodePublishVolumeResponse, error) { - - return nil, nil -} - -func (s *service) NodeUnpublishVolume( - ctx context.Context, - req *csi.NodeUnpublishVolumeRequest) ( - *csi.NodeUnpublishVolumeResponse, error) { - - return nil, nil -} - -func (s *service) NodeGetVolumeStats( - ctx context.Context, - req *csi.NodeGetVolumeStatsRequest) ( - *csi.NodeGetVolumeStatsResponse, error) { - - return nil, nil -} - -func (s *service) NodeExpandVolume( - ctx context.Context, - req *csi.NodeExpandVolumeRequest) ( - *csi.NodeExpandVolumeResponse, error) { - - return nil, nil -} - -func (s *service) NodeGetCapabilities( - ctx context.Context, - req *csi.NodeGetCapabilitiesRequest) ( - *csi.NodeGetCapabilitiesResponse, error) { - - return nil, nil -} - -func (s *service) NodeGetInfo( - ctx context.Context, - req *csi.NodeGetInfoRequest) ( - *csi.NodeGetInfoResponse, error) { - - return nil, nil -} -EOF - - -echo "building $SP_NAME:" -go mod download && go mod verify -go build . -BUILD_RESULT=$? - -cd - > /dev/null 2>&1 || exit 1 - -if [ "$BUILD_RESULT" -eq 0 ]; then - echo " success!" - echo ' example: CSI_ENDPOINT=csi.sock \' - echo ' X_CSI_LOG_LEVEL=info \' - echo " $SP_DIR/$SP_NAME" - echo - echo " help available online at" - echo " https://github.com/rexray/gocsi#bootstrapping-a-storage-plug-in" -else - exit 1 -fi diff --git a/vendor/github.com/rexray/gocsi/middleware.go b/vendor/github.com/rexray/gocsi/middleware.go deleted file mode 100644 index 92ed4d173e..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware.go +++ /dev/null @@ -1,243 +0,0 @@ -package gocsi - -import ( - "strconv" - "time" - - log "github.com/sirupsen/logrus" - "golang.org/x/net/context" - "google.golang.org/grpc" - - csictx "github.com/rexray/gocsi/context" - "github.com/rexray/gocsi/middleware/logging" - "github.com/rexray/gocsi/middleware/requestid" - "github.com/rexray/gocsi/middleware/serialvolume" - "github.com/rexray/gocsi/middleware/specvalidator" - "github.com/rexray/gocsi/utils" -) - -func (sp *StoragePlugin) initInterceptors(ctx context.Context) { - - sp.Interceptors = append(sp.Interceptors, sp.injectContext) - log.Debug("enabled context injector") - - var ( - withReqLogging = sp.getEnvBool(ctx, EnvVarReqLogging) - withRepLogging = sp.getEnvBool(ctx, EnvVarRepLogging) - withDisableLogVolCtx = sp.getEnvBool(ctx, EnvVarLoggingDisableVolCtx) - withSerialVol = sp.getEnvBool(ctx, EnvVarSerialVolAccess) - withSpec = sp.getEnvBool(ctx, EnvVarSpecValidation) - withStgTgtPath = sp.getEnvBool(ctx, EnvVarRequireStagingTargetPath) - withVolContext = sp.getEnvBool(ctx, EnvVarRequireVolContext) - withPubContext = sp.getEnvBool(ctx, EnvVarRequirePubContext) - withCreds = sp.getEnvBool(ctx, EnvVarCreds) - withCredsNewVol = sp.getEnvBool(ctx, EnvVarCredsCreateVol) - withCredsDelVol = sp.getEnvBool(ctx, EnvVarCredsDeleteVol) - withCredsCtrlrPubVol = sp.getEnvBool(ctx, EnvVarCredsCtrlrPubVol) - withCredsCtrlrUnpubVol = sp.getEnvBool(ctx, EnvVarCredsCtrlrUnpubVol) - withCredsNodeStgVol = sp.getEnvBool(ctx, EnvVarCredsNodeStgVol) - withCredsNodePubVol = sp.getEnvBool(ctx, EnvVarCredsNodePubVol) - withDisableFieldLen = sp.getEnvBool(ctx, EnvVarDisableFieldLen) - ) - - // Enable all cred requirements if the general option is enabled. - if withCreds { - withCredsNewVol = true - withCredsDelVol = true - withCredsCtrlrPubVol = true - withCredsCtrlrUnpubVol = true - withCredsNodeStgVol = true - withCredsNodePubVol = true - } - - // Initialize request & response validation to the global validaiton value. - var ( - withSpecReq = withSpec - withSpecRep = withSpec - ) - log.WithField("withSpec", withSpec).Debug("init req & rep validation") - - // If request validation is not enabled explicitly, check to see if it - // should be enabled implicitly. - if !withSpecReq { - withSpecReq = withCreds || - withStgTgtPath || - withVolContext || - withPubContext - log.WithField("withSpecReq", withSpecReq).Debug( - "init implicit req validation") - } - - // Check to see if spec request or response validation are overridden. - if v, ok := csictx.LookupEnv(ctx, EnvVarSpecReqValidation); ok { - withSpecReq, _ = strconv.ParseBool(v) - log.WithField("withSpecReq", withSpecReq).Debug("init req validation") - } - if v, ok := csictx.LookupEnv(ctx, EnvVarSpecRepValidation); ok { - withSpecRep, _ = strconv.ParseBool(v) - log.WithField("withSpecRep", withSpecRep).Debug("init rep validation") - } - - // Configure logging. - if withReqLogging || withRepLogging { - // Automatically enable request ID injection if logging - // is enabled. - sp.Interceptors = append(sp.Interceptors, - requestid.NewServerRequestIDInjector()) - log.Debug("enabled request ID injector") - - var ( - loggingOpts []logging.Option - w = newLogger(log.Debugf) - ) - - if withDisableLogVolCtx { - loggingOpts = append(loggingOpts, logging.WithDisableLogVolumeContext()) - log.Debug("disabled logging of VolumeContext field") - } - - if withReqLogging { - loggingOpts = append(loggingOpts, logging.WithRequestLogging(w)) - log.Debug("enabled request logging") - } - if withRepLogging { - loggingOpts = append(loggingOpts, logging.WithResponseLogging(w)) - log.Debug("enabled response logging") - } - sp.Interceptors = append(sp.Interceptors, - logging.NewServerLogger(loggingOpts...)) - } - - if withSpecReq || withSpecRep { - var specOpts []specvalidator.Option - - if withSpecReq { - specOpts = append( - specOpts, - specvalidator.WithRequestValidation()) - log.Debug("enabled spec validator opt: request validation") - } - if withSpecRep { - specOpts = append( - specOpts, - specvalidator.WithResponseValidation()) - log.Debug("enabled spec validator opt: response validation") - } - if withCredsNewVol { - specOpts = append(specOpts, - specvalidator.WithRequiresControllerCreateVolumeSecrets()) - log.Debug("enabled spec validator opt: requires creds: " + - "CreateVolume") - } - if withCredsDelVol { - specOpts = append(specOpts, - specvalidator.WithRequiresControllerDeleteVolumeSecrets()) - log.Debug("enabled spec validator opt: requires creds: " + - "DeleteVolume") - } - if withCredsCtrlrPubVol { - specOpts = append(specOpts, - specvalidator.WithRequiresControllerPublishVolumeSecrets()) - log.Debug("enabled spec validator opt: requires creds: " + - "ControllerPublishVolume") - } - if withCredsCtrlrUnpubVol { - specOpts = append(specOpts, - specvalidator.WithRequiresControllerUnpublishVolumeSecrets()) - log.Debug("enabled spec validator opt: requires creds: " + - "ControllerUnpublishVolume") - } - if withCredsNodeStgVol { - specOpts = append(specOpts, - specvalidator.WithRequiresNodeStageVolumeSecrets()) - log.Debug("enabled spec validator opt: requires creds: " + - "NodeStageVolume") - } - if withCredsNodePubVol { - specOpts = append(specOpts, - specvalidator.WithRequiresNodePublishVolumeSecrets()) - log.Debug("enabled spec validator opt: requires creds: " + - "NodePublishVolume") - } - - if withStgTgtPath { - specOpts = append(specOpts, - specvalidator.WithRequiresStagingTargetPath()) - log.Debug("enabled spec validator opt: " + - "requires starging target path") - } - if withVolContext { - specOpts = append(specOpts, - specvalidator.WithRequiresVolumeContext()) - log.Debug("enabled spec validator opt: requires vol context") - } - if withPubContext { - specOpts = append(specOpts, - specvalidator.WithRequiresPublishContext()) - log.Debug("enabled spec validator opt: requires pub context") - } - if withDisableFieldLen { - specOpts = append(specOpts, - specvalidator.WithDisableFieldLenCheck()) - log.Debug("disabled spec validator opt: field length check") - } - sp.Interceptors = append(sp.Interceptors, - specvalidator.NewServerSpecValidator(specOpts...)) - } - - if _, ok := csictx.LookupEnv(ctx, EnvVarPluginInfo); ok { - log.Debug("enabled GetPluginInfo interceptor") - sp.Interceptors = append(sp.Interceptors, sp.getPluginInfo) - } - - if withSerialVol { - var ( - opts []serialvolume.Option - fields = map[string]interface{}{} - ) - - // Get serial provider's timeout. - if v, _ := csictx.LookupEnv( - ctx, EnvVarSerialVolAccessTimeout); v != "" { - if t, err := time.ParseDuration(v); err == nil { - fields["serialVol.timeout"] = t - opts = append(opts, serialvolume.WithTimeout(t)) - } - } - - sp.Interceptors = append(sp.Interceptors, serialvolume.New(opts...)) - log.WithFields(fields).Debug("enabled serial volume access") - } - - return -} - -func (sp *StoragePlugin) injectContext( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - return handler(csictx.WithLookupEnv(ctx, sp.lookupEnv), req) -} - -func (sp *StoragePlugin) getPluginInfo( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - if sp.pluginInfo.Name == "" { - return handler(ctx, req) - } - - _, service, method, err := utils.ParseMethod(info.FullMethod) - if err != nil { - return nil, err - } - if service != "Identity" || method != "GetPluginInfo" { - return handler(ctx, req) - } - - return &sp.pluginInfo, nil -} diff --git a/vendor/github.com/rexray/gocsi/middleware/logging/logging_interceptor.go b/vendor/github.com/rexray/gocsi/middleware/logging/logging_interceptor.go deleted file mode 100644 index cd0a17f297..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware/logging/logging_interceptor.go +++ /dev/null @@ -1,199 +0,0 @@ -package logging - -import ( - "bytes" - "fmt" - "io" - "os" - "reflect" - "regexp" - "strings" - - "golang.org/x/net/context" - "google.golang.org/grpc" - - csictx "github.com/rexray/gocsi/context" - "github.com/rexray/gocsi/utils" -) - -// Option configures the logging interceptor. -type Option func(*opts) - -type opts struct { - reqw io.Writer - repw io.Writer - disableLogVolCtx bool -} - -// WithRequestLogging is a Option that enables request logging -// for the logging interceptor. -func WithRequestLogging(w io.Writer) Option { - return func(o *opts) { - if w == nil { - w = os.Stdout - } - o.reqw = w - } -} - -// WithResponseLogging is a Option that enables response logging -// for the logging interceptor. -func WithResponseLogging(w io.Writer) Option { - return func(o *opts) { - if w == nil { - w = os.Stdout - } - o.repw = w - } -} - -// WithDisableLogVolumeContext is an Option that disables logging the VolumeContext -// field in the logging interceptor -func WithDisableLogVolumeContext() Option { - return func(o *opts) { - o.disableLogVolCtx = true - } -} - -type interceptor struct { - opts opts -} - -// NewServerLogger returns a new UnaryServerInterceptor that can be -// configured to log both request and response data. -func NewServerLogger( - opts ...Option) grpc.UnaryServerInterceptor { - - return newLoggingInterceptor(opts...).handleServer -} - -// NewClientLogger provides a UnaryClientInterceptor that can be -// configured to log both request and response data. -func NewClientLogger( - opts ...Option) grpc.UnaryClientInterceptor { - - return newLoggingInterceptor(opts...).handleClient -} - -func newLoggingInterceptor(opts ...Option) *interceptor { - i := &interceptor{} - for _, withOpts := range opts { - withOpts(&i.opts) - } - return i -} - -func (s *interceptor) handleServer( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - return s.handle(ctx, info.FullMethod, req, func() (interface{}, error) { - return handler(ctx, req) - }) -} - -func (s *interceptor) handleClient( - ctx context.Context, - method string, - req, rep interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption) error { - - _, err := s.handle(ctx, method, req, func() (interface{}, error) { - return rep, invoker(ctx, method, req, rep, cc, opts...) - }) - return err -} - -func (s *interceptor) handle( - ctx context.Context, - method string, - req interface{}, - next func() (interface{}, error)) (rep interface{}, failed error) { - - // If the request is nil then pass control to the next handler - // in the chain. - if req == nil { - return next() - } - - w := &bytes.Buffer{} - reqID, reqIDOK := csictx.GetRequestID(ctx) - - // Print the request - if s.opts.reqw != nil { - fmt.Fprintf(w, "%s: ", method) - if reqIDOK { - fmt.Fprintf(w, "REQ %04d", reqID) - } - s.rprintReqOrRep(w, req) - fmt.Fprintln(s.opts.reqw, w.String()) - } - - w.Reset() - - // Get the response. - rep, failed = next() - - if s.opts.repw == nil { - return - } - - // Print the response method name. - fmt.Fprintf(w, "%s: ", method) - if reqIDOK { - fmt.Fprintf(w, "REP %04d", reqID) - } - - // Print the response error if it is set. - if failed != nil { - fmt.Fprint(w, ": ") - fmt.Fprint(w, failed) - } - - // Print the response data if it is set. - if !utils.IsNilResponse(rep) { - s.rprintReqOrRep(w, rep) - } - fmt.Fprintln(s.opts.repw, w.String()) - - return -} - -var emptyValRX = regexp.MustCompile( - `^((?:)|(?:\[\])|(?:)|(?:map\[\]))$`) - -// rprintReqOrRep is used by the server-side interceptors that log -// requests and responses. -func (s *interceptor) rprintReqOrRep(w io.Writer, obj interface{}) { - rv := reflect.ValueOf(obj).Elem() - tv := rv.Type() - nf := tv.NumField() - printedColon := false - printComma := false - for i := 0; i < nf; i++ { - name := tv.Field(i).Name - if strings.Contains(name, "Secrets") { - continue - } - if s.opts.disableLogVolCtx && strings.Contains(name, "VolumeContext") { - continue - } - sv := fmt.Sprintf("%v", rv.Field(i).Interface()) - if emptyValRX.MatchString(sv) { - continue - } - if printComma { - fmt.Fprintf(w, ", ") - } - if !printedColon { - fmt.Fprintf(w, ": ") - printedColon = true - } - printComma = true - fmt.Fprintf(w, "%s=%s", name, sv) - } -} diff --git a/vendor/github.com/rexray/gocsi/middleware/requestid/request_id_injector.go b/vendor/github.com/rexray/gocsi/middleware/requestid/request_id_injector.go deleted file mode 100644 index 2e2b4de013..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware/requestid/request_id_injector.go +++ /dev/null @@ -1,108 +0,0 @@ -package requestid - -import ( - "fmt" - "strconv" - "sync/atomic" - - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - - csictx "github.com/rexray/gocsi/context" -) - -type interceptor struct { - id uint64 -} - -// NewServerRequestIDInjector returns a new UnaryServerInterceptor -// that reads a unique request ID from the incoming context's gRPC -// metadata. If the incoming context does not contain gRPC metadata or -// a request ID, then a new request ID is generated. -func NewServerRequestIDInjector() grpc.UnaryServerInterceptor { - return newRequestIDInjector().handleServer -} - -// NewClientRequestIDInjector provides a UnaryClientInterceptor -// that injects the outgoing context with gRPC metadata that contains -// a unique ID. -func NewClientRequestIDInjector() grpc.UnaryClientInterceptor { - return newRequestIDInjector().handleClient -} - -func newRequestIDInjector() *interceptor { - return &interceptor{} -} - -func (s *interceptor) handleServer( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - // storeID is a flag that indicates whether or not the request ID - // should be atomically stored in the interceptor's id field at - // the end of this function. If the ID was found in the incoming - // request and could be parsed successfully then the ID is stored. - // If the ID was generated server-side then the ID is not stored. - storeID := true - - // Retrieve the gRPC metadata from the incoming context. - md, mdOK := metadata.FromIncomingContext(ctx) - - // If no gRPC metadata was found then create some and ensure the - // context is a gRPC incoming context. - if !mdOK { - md = metadata.Pairs() - ctx = metadata.NewIncomingContext(ctx, md) - } - - // Check the metadata from the request ID. - szID, szIDOK := md[csictx.RequestIDKey] - - // If the metadata does not contain a request ID then create a new - // request ID and inject it into the metadata. - if !szIDOK || len(szID) != 1 { - szID = []string{fmt.Sprintf("%d", atomic.AddUint64(&s.id, 1))} - md[csictx.RequestIDKey] = szID - storeID = false - } - - // Parse the request ID from the - id, err := strconv.ParseUint(szID[0], 10, 64) - if err != nil { - id = atomic.AddUint64(&s.id, 1) - storeID = false - } - - if storeID { - atomic.StoreUint64(&s.id, id) - } - - return handler(ctx, req) -} - -func (s *interceptor) handleClient( - ctx context.Context, - method string, - req, rep interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption) error { - - // Ensure there is an outgoing gRPC context with metadata. - md, mdOK := metadata.FromOutgoingContext(ctx) - if !mdOK { - md = metadata.Pairs() - ctx = metadata.NewOutgoingContext(ctx, md) - } - - // Ensure the request ID is set in the metadata. - if szID, szIDOK := md[csictx.RequestIDKey]; !szIDOK || len(szID) != 1 { - szID = []string{fmt.Sprintf("%d", atomic.AddUint64(&s.id, 1))} - md[csictx.RequestIDKey] = szID - } - - return invoker(ctx, method, req, rep, cc, opts...) -} diff --git a/vendor/github.com/rexray/gocsi/middleware/serialvolume/default_lock_provider.go b/vendor/github.com/rexray/gocsi/middleware/serialvolume/default_lock_provider.go deleted file mode 100644 index a37a99b367..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware/serialvolume/default_lock_provider.go +++ /dev/null @@ -1,41 +0,0 @@ -package serialvolume - -import ( - "context" - "sync" - - "github.com/akutz/gosync" -) - -type defaultLockProvider struct { - volIDLocksL sync.Mutex - volNameLocksL sync.Mutex - volIDLocks map[string]gosync.TryLocker - volNameLocks map[string]gosync.TryLocker -} - -func (i *defaultLockProvider) GetLockWithID( - ctx context.Context, id string) (gosync.TryLocker, error) { - - i.volIDLocksL.Lock() - defer i.volIDLocksL.Unlock() - lock := i.volIDLocks[id] - if lock == nil { - lock = &gosync.TryMutex{} - i.volIDLocks[id] = lock - } - return lock, nil -} - -func (i *defaultLockProvider) GetLockWithName( - ctx context.Context, name string) (gosync.TryLocker, error) { - - i.volNameLocksL.Lock() - defer i.volNameLocksL.Unlock() - lock := i.volNameLocks[name] - if lock == nil { - lock = &gosync.TryMutex{} - i.volNameLocks[name] = lock - } - return lock, nil -} diff --git a/vendor/github.com/rexray/gocsi/middleware/serialvolume/serial_volume_locker.go b/vendor/github.com/rexray/gocsi/middleware/serialvolume/serial_volume_locker.go deleted file mode 100644 index 8559c08fee..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware/serialvolume/serial_volume_locker.go +++ /dev/null @@ -1,226 +0,0 @@ -package serialvolume - -import ( - "context" - "io" - "time" - - "github.com/akutz/gosync" - "github.com/container-storage-interface/spec/lib/go/csi" - xctx "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - mwtypes "github.com/rexray/gocsi/middleware/serialvolume/types" -) - -const pending = "pending" - -// Option configures the interceptor. -type Option func(*opts) - -type opts struct { - timeout time.Duration - locker mwtypes.VolumeLockerProvider -} - -// WithTimeout is an Option that sets the timeout used by the interceptor. -func WithTimeout(t time.Duration) Option { - return func(o *opts) { - o.timeout = t - } -} - -// WithLockProvider is an Option that sets the lock provider used by the -// interceptor. -func WithLockProvider(p mwtypes.VolumeLockerProvider) Option { - return func(o *opts) { - o.locker = p - } -} - -// New returns a new server-side, gRPC interceptor -// that provides serial access to volume resources across the following -// RPCs: -// -// * CreateVolume -// * DeleteVolume -// * ControllerPublishVolume -// * ControllerUnpublishVolume -// * NodePublishVolume -// * NodeUnpublishVolume -func New(opts ...Option) grpc.UnaryServerInterceptor { - - i := &interceptor{} - - // Configure the interceptor's options. - for _, setOpt := range opts { - setOpt(&i.opts) - } - - // If no lock provider is configured then set the default, - // in-memory provider. - if i.opts.locker == nil { - i.opts.locker = &defaultLockProvider{ - volIDLocks: map[string]gosync.TryLocker{}, - volNameLocks: map[string]gosync.TryLocker{}, - } - } - - return i.handle -} - -type interceptor struct { - opts opts -} - -func (i *interceptor) handle( - ctx xctx.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - switch treq := req.(type) { - case *csi.ControllerPublishVolumeRequest: - return i.controllerPublishVolume(ctx, treq, info, handler) - case *csi.ControllerUnpublishVolumeRequest: - return i.controllerUnpublishVolume(ctx, treq, info, handler) - case *csi.CreateVolumeRequest: - return i.createVolume(ctx, treq, info, handler) - case *csi.DeleteVolumeRequest: - return i.deleteVolume(ctx, treq, info, handler) - case *csi.NodePublishVolumeRequest: - return i.nodePublishVolume(ctx, treq, info, handler) - case *csi.NodeUnpublishVolumeRequest: - return i.nodeUnpublishVolume(ctx, treq, info, handler) - } - - return handler(ctx, req) -} - -func (i *interceptor) controllerPublishVolume( - ctx context.Context, - req *csi.ControllerPublishVolumeRequest, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (res interface{}, resErr error) { - - lock, err := i.opts.locker.GetLockWithID(ctx, req.VolumeId) - if err != nil { - return nil, err - } - if closer, ok := lock.(io.Closer); ok { - defer closer.Close() - } - if !lock.TryLock(i.opts.timeout) { - return nil, status.Error(codes.Aborted, pending) - } - defer lock.Unlock() - - return handler(ctx, req) -} - -func (i *interceptor) controllerUnpublishVolume( - ctx context.Context, - req *csi.ControllerUnpublishVolumeRequest, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (res interface{}, resErr error) { - - lock, err := i.opts.locker.GetLockWithID(ctx, req.VolumeId) - if err != nil { - return nil, err - } - if closer, ok := lock.(io.Closer); ok { - defer closer.Close() - } - if !lock.TryLock(i.opts.timeout) { - return nil, status.Error(codes.Aborted, pending) - } - defer lock.Unlock() - - return handler(ctx, req) -} - -func (i *interceptor) createVolume( - ctx context.Context, - req *csi.CreateVolumeRequest, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (res interface{}, resErr error) { - - lock, err := i.opts.locker.GetLockWithName(ctx, req.Name) - if err != nil { - return nil, err - } - if closer, ok := lock.(io.Closer); ok { - defer closer.Close() - } - if !lock.TryLock(i.opts.timeout) { - return nil, status.Error(codes.Aborted, pending) - } - defer lock.Unlock() - - return handler(ctx, req) -} - -func (i *interceptor) deleteVolume( - ctx context.Context, - req *csi.DeleteVolumeRequest, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (res interface{}, resErr error) { - - lock, err := i.opts.locker.GetLockWithID(ctx, req.VolumeId) - if err != nil { - return nil, err - } - if closer, ok := lock.(io.Closer); ok { - defer closer.Close() - } - if !lock.TryLock(i.opts.timeout) { - return nil, status.Error(codes.Aborted, pending) - } - defer lock.Unlock() - - return handler(ctx, req) -} - -func (i *interceptor) nodePublishVolume( - ctx context.Context, - req *csi.NodePublishVolumeRequest, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (res interface{}, resErr error) { - - lock, err := i.opts.locker.GetLockWithID(ctx, req.VolumeId) - if err != nil { - return nil, err - } - if closer, ok := lock.(io.Closer); ok { - defer closer.Close() - } - if !lock.TryLock(i.opts.timeout) { - return nil, status.Error(codes.Aborted, pending) - } - defer lock.Unlock() - - return handler(ctx, req) -} - -func (i *interceptor) nodeUnpublishVolume( - ctx context.Context, - req *csi.NodeUnpublishVolumeRequest, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (res interface{}, resErr error) { - - lock, err := i.opts.locker.GetLockWithID(ctx, req.VolumeId) - if err != nil { - return nil, err - } - if closer, ok := lock.(io.Closer); ok { - defer closer.Close() - } - if !lock.TryLock(i.opts.timeout) { - return nil, status.Error(codes.Aborted, pending) - } - defer lock.Unlock() - - return handler(ctx, req) -} diff --git a/vendor/github.com/rexray/gocsi/middleware/serialvolume/types/volume_lock_provider.go b/vendor/github.com/rexray/gocsi/middleware/serialvolume/types/volume_lock_provider.go deleted file mode 100644 index 93b1217d08..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware/serialvolume/types/volume_lock_provider.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -import ( - "context" - - "github.com/akutz/gosync" -) - -// VolumeLockerProvider is able to provide gosync.TryLocker objects for -// volumes by ID and name. -type VolumeLockerProvider interface { - // GetLockWithID gets a lock for a volume with provided ID. If a lock - // for the specified volume ID does not exist then a new lock is created - // and returned. - GetLockWithID(ctx context.Context, id string) (gosync.TryLocker, error) - - // GetLockWithName gets a lock for a volume with provided name. If a lock - // for the specified volume name does not exist then a new lock is created - // and returned. - GetLockWithName(ctx context.Context, name string) (gosync.TryLocker, error) -} diff --git a/vendor/github.com/rexray/gocsi/middleware/specvalidator/spec_validator.go b/vendor/github.com/rexray/gocsi/middleware/specvalidator/spec_validator.go deleted file mode 100644 index db148098d3..0000000000 --- a/vendor/github.com/rexray/gocsi/middleware/specvalidator/spec_validator.go +++ /dev/null @@ -1,827 +0,0 @@ -package specvalidator - -import ( - "reflect" - "regexp" - "sync" - - "github.com/golang/protobuf/proto" - log "github.com/sirupsen/logrus" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/container-storage-interface/spec/lib/go/csi" - - "github.com/rexray/gocsi/utils" -) - -// Option configures the spec validator interceptor. -type Option func(*opts) - -type opts struct { - sync.Mutex - reqValidation bool - repValidation bool - requiresStagingTargetPath bool - requiresVolContext bool - requiresPubContext bool - requiresCtlrNewVolSecrets bool - requiresCtlrDelVolSecrets bool - requiresCtlrPubVolSecrets bool - requiresCtlrUnpubVolSecrets bool - requiresNodeStgVolSecrets bool - requiresNodePubVolSecrets bool - disableFieldLenCheck bool -} - -// WithRequestValidation is a Option that enables request validation. -func WithRequestValidation() Option { - return func(o *opts) { - o.reqValidation = true - } -} - -// WithResponseValidation is a Option that enables response validation. -func WithResponseValidation() Option { - return func(o *opts) { - o.repValidation = true - } -} - -// WithRequiresStagingTargetPath is a Option that indicates -// NodePublishVolume requests must have non-empty StagingTargetPath -// fields. -func WithRequiresStagingTargetPath() Option { - return func(o *opts) { - o.requiresStagingTargetPath = true - } -} - -// WithRequiresVolumeContext is a Option that indicates -// ControllerPublishVolume requests, ValidateVolumeCapabilities requests, -// NodeStageVolume requests, and NodePublishVolume requests must contain -// non-empty publish volume context data. -func WithRequiresVolumeContext() Option { - return func(o *opts) { - o.requiresVolContext = true - } -} - -// WithRequiresPublishContext is a Option that indicates -// ControllerPublishVolume responses, NodePublishVolume requests, and -// NodeStageVolume requests must contain non-empty publish volume context data. -func WithRequiresPublishContext() Option { - return func(o *opts) { - o.requiresPubContext = true - } -} - -// WithRequiresControllerCreateVolumeSecrets is a Option -// that indicates the eponymous requests must contain non-empty secrets -// data. -func WithRequiresControllerCreateVolumeSecrets() Option { - return func(o *opts) { - o.requiresCtlrNewVolSecrets = true - } -} - -// WithRequiresControllerDeleteVolumeSecrets is a Option -// that indicates the eponymous requests must contain non-empty credentials -// data. -func WithRequiresControllerDeleteVolumeSecrets() Option { - return func(o *opts) { - o.requiresCtlrDelVolSecrets = true - } -} - -// WithRequiresControllerPublishVolumeSecrets is a Option -// that indicates the eponymous requests must contain non-empty credentials -// data. -func WithRequiresControllerPublishVolumeSecrets() Option { - return func(o *opts) { - o.requiresCtlrPubVolSecrets = true - } -} - -// WithRequiresControllerUnpublishVolumeSecrets is a Option -// that indicates the eponymous requests must contain non-empty credentials -// data. -func WithRequiresControllerUnpublishVolumeSecrets() Option { - return func(o *opts) { - o.requiresCtlrUnpubVolSecrets = true - } -} - -// WithRequiresNodeStageVolumeSecrets is a Option -// that indicates the eponymous requests must contain non-empty credentials -// data. -func WithRequiresNodeStageVolumeSecrets() Option { - return func(o *opts) { - o.requiresNodeStgVolSecrets = true - } -} - -// WithRequiresNodePublishVolumeSecrets is a Option -// that indicates the eponymous requests must contain non-empty credentials -// data. -func WithRequiresNodePublishVolumeSecrets() Option { - return func(o *opts) { - o.requiresNodePubVolSecrets = true - } -} - -// WithDisableFieldLenCheck is a Option -// that indicates that the length of fields should not be validated -func WithDisableFieldLenCheck() Option { - return func(o *opts) { - o.disableFieldLenCheck = true - } -} - -type interceptor struct { - opts opts -} - -// NewServerSpecValidator returns a new UnaryServerInterceptor that validates -// server request and response data against the CSI specification. -func NewServerSpecValidator( - opts ...Option) grpc.UnaryServerInterceptor { - - return newSpecValidator(opts...).handleServer -} - -// NewClientSpecValidator provides a UnaryClientInterceptor that validates -// client request and response data against the CSI specification. -func NewClientSpecValidator( - opts ...Option) grpc.UnaryClientInterceptor { - - return newSpecValidator(opts...).handleClient -} - -func newSpecValidator(opts ...Option) *interceptor { - i := &interceptor{} - for _, withOpts := range opts { - withOpts(&i.opts) - } - return i -} - -func (s *interceptor) handleServer( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - return s.handle(ctx, info.FullMethod, req, func() (interface{}, error) { - return handler(ctx, req) - }) -} - -func (s *interceptor) handleClient( - ctx context.Context, - method string, - req, rep interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption) error { - - _, err := s.handle(ctx, method, req, func() (interface{}, error) { - return rep, invoker(ctx, method, req, rep, cc, opts...) - }) - return err -} - -func (s *interceptor) handle( - ctx context.Context, - method string, - req interface{}, - next func() (interface{}, error)) (interface{}, error) { - - // If the request is nil then pass control to the next handler - // in the chain. - if req == nil { - return next() - } - - if s.opts.reqValidation { - // Validate the request against the CSI specification. - if err := s.validateRequest(ctx, method, req); err != nil { - return nil, err - } - } - - // Use the function passed into this one to get the response. On the - // server-side this could possibly invoke additional interceptors or - // the RPC. On the client side this invokes the RPC. - rep, err := next() - - if err != nil { - return nil, err - } - - if s.opts.repValidation { - log.Debug("response validation enabled") - // Validate the response against the CSI specification. - if err := s.validateResponse(ctx, method, rep); err != nil { - - // If an error occurred while validating the response, it is - // imperative the response not be discarded as it could be - // important to the client. - st, ok := status.FromError(err) - if !ok { - st = status.New(codes.Internal, err.Error()) - } - - // Add the response to the error details. - st, err2 := st.WithDetails(rep.(proto.Message)) - - // If there is a problem encoding the response into the - // protobuf details then err on the side of caution, log - // the encoding error, validation error, and return the - // original response. - if err2 != nil { - log.WithFields(map[string]interface{}{ - "encErr": err2, - "valErr": err, - }).Error("failed to encode error details; " + - "returning invalid response") - - return rep, nil - } - - // There was no issue encoding the response, so return - // the gRPC status error with the error message and payload. - return nil, st.Err() - } - } - - return rep, err -} - -type interceptorHasVolumeID interface { - GetVolumeId() string -} -type interceptorHasUserCredentials interface { - GetUserCredentials() map[string]string -} - -type interceptorHasVolumeContext interface { - GetVolumeContext() map[string]string -} - -type interceptorHasPublishContext interface { - GetPublishContext() map[string]string -} - -func (s *interceptor) validateRequest( - ctx context.Context, - method string, - req interface{}) error { - - if req == nil { - return nil - } - - // Validate field sizes. - if !s.opts.disableFieldLenCheck { - if err := validateFieldSizes(req); err != nil { - return err - } - } - - // Check to see if the request has a volume ID and if it is set. - // If the volume ID is not set then return an error. - if treq, ok := req.(interceptorHasVolumeID); ok { - if treq.GetVolumeId() == "" { - return status.Error( - codes.InvalidArgument, "required: VolumeID") - } - } - - // Check to see if the request has volume context and if they're - // required. If the volume context is required by no attributes are - // specified then return an error. - if s.opts.requiresVolContext { - if treq, ok := req.(interceptorHasVolumeContext); ok { - if len(treq.GetVolumeContext()) == 0 { - return status.Error( - codes.InvalidArgument, "required: VolumeContext") - } - } - } - - // Check to see if the request has publish context and if they're - // required. If the publish context is required by no attributes are - // specified then return an error. - if s.opts.requiresPubContext { - if treq, ok := req.(interceptorHasPublishContext); ok { - if len(treq.GetPublishContext()) == 0 { - return status.Error( - codes.InvalidArgument, "required: PublishContext") - } - } - } - - // Please leave requests that do not require explicit validation commented - // out for purposes of optimization. These requests are retained in this - // form to make it easy to add validation later if required. - // - switch tobj := req.(type) { - // - // Controller Service - // - case *csi.CreateVolumeRequest: - return s.validateCreateVolumeRequest(ctx, *tobj) - case *csi.DeleteVolumeRequest: - return s.validateDeleteVolumeRequest(ctx, *tobj) - case *csi.ControllerPublishVolumeRequest: - return s.validateControllerPublishVolumeRequest(ctx, *tobj) - case *csi.ControllerUnpublishVolumeRequest: - return s.validateControllerUnpublishVolumeRequest(ctx, *tobj) - case *csi.ValidateVolumeCapabilitiesRequest: - return s.validateValidateVolumeCapabilitiesRequest(ctx, *tobj) - case *csi.GetCapacityRequest: - return s.validateGetCapacityRequest(ctx, *tobj) - // - // Node Service - // - case *csi.NodeStageVolumeRequest: - return s.validateNodeStageVolumeRequest(ctx, *tobj) - case *csi.NodeUnstageVolumeRequest: - return s.validateNodeUnstageVolumeRequest(ctx, *tobj) - case *csi.NodePublishVolumeRequest: - return s.validateNodePublishVolumeRequest(ctx, *tobj) - case *csi.NodeUnpublishVolumeRequest: - return s.validateNodeUnpublishVolumeRequest(ctx, *tobj) - } - - return nil -} - -func (s *interceptor) validateResponse( - ctx context.Context, - method string, - rep interface{}) error { - - if utils.IsNilResponse(rep) { - return status.Error(codes.Internal, "nil response") - } - - // Validate the field sizes. - if !s.opts.disableFieldLenCheck { - if err := validateFieldSizes(rep); err != nil { - return err - } - } - - switch tobj := rep.(type) { - // - // Controller Service - // - case *csi.CreateVolumeResponse: - return s.validateCreateVolumeResponse(ctx, *tobj) - case *csi.ControllerPublishVolumeResponse: - return s.validateControllerPublishVolumeResponse(ctx, *tobj) - case *csi.ListVolumesResponse: - return s.validateListVolumesResponse(ctx, *tobj) - case *csi.ControllerGetCapabilitiesResponse: - return s.validateControllerGetCapabilitiesResponse(ctx, *tobj) - // - // Identity Service - // - case *csi.GetPluginInfoResponse: - return s.validateGetPluginInfoResponse(ctx, *tobj) - // - // Node Service - // - case *csi.NodeGetInfoResponse: - return s.validateNodeGetInfoResponse(ctx, *tobj) - case *csi.NodeGetCapabilitiesResponse: - return s.validateNodeGetCapabilitiesResponse(ctx, *tobj) - } - - return nil -} - -func (s *interceptor) validateCreateVolumeRequest( - ctx context.Context, - req csi.CreateVolumeRequest) error { - - if req.Name == "" { - return status.Error( - codes.InvalidArgument, "required: Name") - } - if s.opts.requiresCtlrNewVolSecrets { - if len(req.Secrets) == 0 { - return status.Error( - codes.InvalidArgument, "required: Secrets") - } - } - - return validateVolumeCapabilitiesArg(req.VolumeCapabilities, true) -} - -func (s *interceptor) validateDeleteVolumeRequest( - ctx context.Context, - req csi.DeleteVolumeRequest) error { - - if s.opts.requiresCtlrDelVolSecrets { - if len(req.Secrets) == 0 { - return status.Error( - codes.InvalidArgument, "required: Secrets") - } - } - - return nil -} - -func (s *interceptor) validateControllerPublishVolumeRequest( - ctx context.Context, - req csi.ControllerPublishVolumeRequest) error { - - if s.opts.requiresCtlrPubVolSecrets { - if len(req.Secrets) == 0 { - return status.Error( - codes.InvalidArgument, "required: Secrets") - } - } - - if req.NodeId == "" { - return status.Error( - codes.InvalidArgument, "required: NodeID") - } - - return validateVolumeCapabilityArg(req.VolumeCapability, true) -} - -func (s *interceptor) validateControllerUnpublishVolumeRequest( - ctx context.Context, - req csi.ControllerUnpublishVolumeRequest) error { - - if s.opts.requiresCtlrUnpubVolSecrets { - if len(req.Secrets) == 0 { - return status.Error( - codes.InvalidArgument, "required: Secrets") - } - } - - return nil -} - -func (s *interceptor) validateValidateVolumeCapabilitiesRequest( - ctx context.Context, - req csi.ValidateVolumeCapabilitiesRequest) error { - - return validateVolumeCapabilitiesArg(req.VolumeCapabilities, true) -} - -func (s *interceptor) validateGetCapacityRequest( - ctx context.Context, - req csi.GetCapacityRequest) error { - - return validateVolumeCapabilitiesArg(req.VolumeCapabilities, false) -} - -func (s *interceptor) validateNodeStageVolumeRequest( - ctx context.Context, - req csi.NodeStageVolumeRequest) error { - - if req.StagingTargetPath == "" { - return status.Error( - codes.InvalidArgument, "required: StagingTargetPath") - } - - if s.opts.requiresNodeStgVolSecrets { - if len(req.Secrets) == 0 { - return status.Error( - codes.InvalidArgument, "required: Secrets") - } - } - - return validateVolumeCapabilityArg(req.VolumeCapability, true) -} - -func (s *interceptor) validateNodeUnstageVolumeRequest( - ctx context.Context, - req csi.NodeUnstageVolumeRequest) error { - - if req.StagingTargetPath == "" { - return status.Error( - codes.InvalidArgument, "required: StagingTargetPath") - } - - return nil -} - -func (s *interceptor) validateNodePublishVolumeRequest( - ctx context.Context, - req csi.NodePublishVolumeRequest) error { - - if s.opts.requiresStagingTargetPath && req.StagingTargetPath == "" { - return status.Error( - codes.InvalidArgument, "required: StagingTargetPath") - } - - if req.TargetPath == "" { - return status.Error( - codes.InvalidArgument, "required: TargetPath") - } - - if s.opts.requiresNodePubVolSecrets { - if len(req.Secrets) == 0 { - return status.Error( - codes.InvalidArgument, "required: Secrets") - } - } - - return validateVolumeCapabilityArg(req.VolumeCapability, true) -} - -func (s *interceptor) validateNodeUnpublishVolumeRequest( - ctx context.Context, - req csi.NodeUnpublishVolumeRequest) error { - - if req.TargetPath == "" { - return status.Error( - codes.InvalidArgument, "required: TargetPath") - } - - return nil -} - -func (s *interceptor) validateCreateVolumeResponse( - ctx context.Context, - rep csi.CreateVolumeResponse) error { - - if rep.Volume == nil { - return status.Error(codes.Internal, "nil: Volume") - } - - if rep.Volume.VolumeId == "" { - return status.Error(codes.Internal, "empty: Volume.Id") - } - - if s.opts.requiresVolContext && len(rep.Volume.VolumeContext) == 0 { - return status.Error( - codes.Internal, "non-nil, empty: Volume.VolumeContext") - } - - return nil -} - -func (s *interceptor) validateControllerPublishVolumeResponse( - ctx context.Context, - rep csi.ControllerPublishVolumeResponse) error { - - if s.opts.requiresPubContext && len(rep.PublishContext) == 0 { - return status.Error(codes.Internal, "empty: PublishContext") - } - return nil -} - -func (s *interceptor) validateListVolumesResponse( - ctx context.Context, - rep csi.ListVolumesResponse) error { - - for i, e := range rep.Entries { - vol := e.Volume - if vol == nil { - return status.Errorf( - codes.Internal, - "nil: Entries[%d].Volume", i) - } - if vol.VolumeId == "" { - return status.Errorf( - codes.Internal, - "empty: Entries[%d].Volume.Id", i) - } - if vol.VolumeContext != nil && len(vol.VolumeContext) == 0 { - return status.Errorf( - codes.Internal, - "non-nil, empty: Entries[%d].Volume.VolumeContext", i) - } - } - - return nil -} - -func (s *interceptor) validateControllerGetCapabilitiesResponse( - ctx context.Context, - rep csi.ControllerGetCapabilitiesResponse) error { - - if rep.Capabilities != nil && len(rep.Capabilities) == 0 { - return status.Error(codes.Internal, "non-nil, empty: Capabilities") - } - return nil -} - -const ( - pluginNameMax = 63 - pluginNamePatt = `^[\w\d]+\.[\w\d\.\-_]*[\w\d]$` - pluginVendorVersionPatt = `^v?(\d+\.){2}(\d+)(-.+)?$` -) - -func (s *interceptor) validateGetPluginInfoResponse( - ctx context.Context, - rep csi.GetPluginInfoResponse) error { - - log.Debug("validateGetPluginInfoResponse: enter") - - if rep.Name == "" { - return status.Error(codes.Internal, "empty: Name") - } - if l := len(rep.Name); l > pluginNameMax { - return status.Errorf(codes.Internal, - "exceeds size limit: Name=%s: max=%d, size=%d", - rep.Name, pluginNameMax, l) - } - nok, err := regexp.MatchString(pluginNamePatt, rep.Name) - if err != nil { - return err - } - if !nok { - return status.Errorf(codes.Internal, - "invalid: Name=%s: patt=%s", - rep.Name, pluginNamePatt) - } - if rep.VendorVersion == "" { - return status.Error(codes.Internal, "empty: VendorVersion") - } - vok, err := regexp.MatchString(pluginVendorVersionPatt, rep.VendorVersion) - if err != nil { - return err - } - if !vok { - return status.Errorf(codes.Internal, - "invalid: VendorVersion=%s: patt=%s", - rep.VendorVersion, pluginVendorVersionPatt) - } - if rep.Manifest != nil && len(rep.Manifest) == 0 { - return status.Error(codes.Internal, - "non-nil, empty: Manifest") - } - return nil -} - -func (s *interceptor) validateNodeGetInfoResponse( - ctx context.Context, - rep csi.NodeGetInfoResponse) error { - if rep.NodeId == "" { - return status.Error(codes.Internal, "empty: NodeID") - } - - return nil -} - -func (s *interceptor) validateNodeGetCapabilitiesResponse( - ctx context.Context, - rep csi.NodeGetCapabilitiesResponse) error { - - if rep.Capabilities != nil && len(rep.Capabilities) == 0 { - return status.Error(codes.Internal, "non-nil, empty: Capabilities") - } - return nil -} - -func validateVolumeCapabilityArg( - volCap *csi.VolumeCapability, - required bool) error { - - if required && volCap == nil { - return status.Error(codes.InvalidArgument, "required: VolumeCapability") - } - - if volCap.AccessMode == nil { - return status.Error(codes.InvalidArgument, "required: AccessMode") - } - - atype := volCap.GetAccessType() - if atype == nil { - return status.Error(codes.InvalidArgument, "required: AccessType") - } - - switch tatype := atype.(type) { - case *csi.VolumeCapability_Block: - if tatype.Block == nil { - return status.Error(codes.InvalidArgument, - "required: AccessType.Block") - } - case *csi.VolumeCapability_Mount: - if tatype.Mount == nil { - return status.Error(codes.InvalidArgument, - "required: AccessType.Mount") - } - default: - return status.Errorf(codes.InvalidArgument, - "invalid: AccessType=%T", atype) - } - - return nil -} - -func validateVolumeCapabilitiesArg( - volCaps []*csi.VolumeCapability, - required bool) error { - - if len(volCaps) == 0 { - if required { - return status.Error( - codes.InvalidArgument, "required: VolumeCapabilities") - } - return nil - } - - for i, cap := range volCaps { - if cap.AccessMode == nil { - return status.Errorf( - codes.InvalidArgument, - "required: VolumeCapabilities[%d].AccessMode", i) - } - atype := cap.GetAccessType() - if atype == nil { - return status.Errorf( - codes.InvalidArgument, - "required: VolumeCapabilities[%d].AccessType", i) - } - switch tatype := atype.(type) { - case *csi.VolumeCapability_Block: - if tatype.Block == nil { - return status.Errorf( - codes.InvalidArgument, - "required: VolumeCapabilities[%d].AccessType.Block", i) - - } - case *csi.VolumeCapability_Mount: - if tatype.Mount == nil { - return status.Errorf( - codes.InvalidArgument, - "required: VolumeCapabilities[%d].AccessType.Mount", i) - } - default: - return status.Errorf( - codes.InvalidArgument, - "invalid: VolumeCapabilities[%d].AccessType=%T", i, atype) - } - } - - return nil -} - -const ( - maxFieldString = 128 - maxFieldMap = 4096 -) - -func validateFieldSizes(msg interface{}) error { - rv := reflect.ValueOf(msg).Elem() - tv := rv.Type() - nf := tv.NumField() - for i := 0; i < nf; i++ { - f := rv.Field(i) - switch f.Kind() { - case reflect.String: - if l := f.Len(); l > maxFieldString { - return status.Errorf( - codes.InvalidArgument, - "exceeds size limit: %s: max=%d, size=%d", - tv.Field(i).Name, maxFieldString, l) - } - case reflect.Map: - if f.Len() == 0 { - continue - } - size := 0 - for _, k := range f.MapKeys() { - if k.Kind() == reflect.String { - kl := k.Len() - if kl > maxFieldString { - return status.Errorf( - codes.InvalidArgument, - "exceeds size limit: %s[%s]: max=%d, size=%d", - tv.Field(i).Name, k.String(), maxFieldString, kl) - } - size = size + kl - } - if v := f.MapIndex(k); v.Kind() == reflect.String { - vl := v.Len() - if vl > maxFieldString { - return status.Errorf( - codes.InvalidArgument, - "exceeds size limit: %s[%s]=: max=%d, size=%d", - tv.Field(i).Name, k.String(), maxFieldString, vl) - } - size = size + vl - } - } - if size > maxFieldMap { - return status.Errorf( - codes.InvalidArgument, - "exceeds size limit: %s: max=%d, size=%d", - tv.Field(i).Name, maxFieldMap, size) - } - } - } - return nil -} diff --git a/vendor/github.com/rexray/gocsi/mock/provider/provider.go b/vendor/github.com/rexray/gocsi/mock/provider/provider.go deleted file mode 100644 index 0a2dd405e9..0000000000 --- a/vendor/github.com/rexray/gocsi/mock/provider/provider.go +++ /dev/null @@ -1,49 +0,0 @@ -package provider - -import ( - "context" - "net" - - log "github.com/sirupsen/logrus" - - "github.com/rexray/gocsi" - "github.com/rexray/gocsi/mock/service" -) - -// New returns a new Mock Storage Plug-in Provider. -func New() gocsi.StoragePluginProvider { - svc := service.New() - return &gocsi.StoragePlugin{ - Controller: svc, - Identity: svc, - Node: svc, - - // BeforeServe allows the SP to participate in the startup - // sequence. This function is invoked directly before the - // gRPC server is created, giving the callback the ability to - // modify the SP's interceptors, server options, or prevent the - // server from starting by returning a non-nil error. - BeforeServe: func( - ctx context.Context, - sp *gocsi.StoragePlugin, - lis net.Listener) error { - - log.WithField("service", service.Name).Debug("BeforeServe") - return nil - }, - - EnvVars: []string{ - // Enable serial volume access. - gocsi.EnvVarSerialVolAccess + "=true", - - // Enable request and response validation. - gocsi.EnvVarSpecValidation + "=true", - - // Treat the following fields as required: - // * ControllerPublishVolumeResponse.PublishContext - // * NodeStageVolumeRequest.PublishContext - // * NodePublishVolumeRequest.PublishContext - gocsi.EnvVarRequirePubContext + "=true", - }, - } -} diff --git a/vendor/github.com/rexray/gocsi/mock/service/controller.go b/vendor/github.com/rexray/gocsi/mock/service/controller.go deleted file mode 100644 index e452d4121b..0000000000 --- a/vendor/github.com/rexray/gocsi/mock/service/controller.go +++ /dev/null @@ -1,442 +0,0 @@ -package service - -import ( - "fmt" - "math" - "path" - "strconv" - "strings" - - log "github.com/sirupsen/logrus" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -func (s *service) CreateVolume( - ctx context.Context, - req *csi.CreateVolumeRequest) ( - *csi.CreateVolumeResponse, error) { - - // Check to see if the volume already exists. - if i, v := s.findVolByName(ctx, req.Name); i >= 0 { - return &csi.CreateVolumeResponse{Volume: &v}, nil - } - - // If no capacity is specified then use 100GiB - capacity := gib100 - if cr := req.CapacityRange; cr != nil { - if rb := cr.RequiredBytes; rb > 0 { - capacity = rb - } - if lb := cr.LimitBytes; lb > 0 { - capacity = lb - } - } - - // Create the volume and add it to the service's in-mem volume slice. - v := s.newVolume(req.Name, capacity) - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - s.vols = append(s.vols, v) - - return &csi.CreateVolumeResponse{Volume: &v}, nil -} - -func (s *service) DeleteVolume( - ctx context.Context, - req *csi.DeleteVolumeRequest) ( - *csi.DeleteVolumeResponse, error) { - - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - - // If the volume does not exist then return an idempotent response. - i, _ := s.findVolNoLock("id", req.VolumeId) - if i < 0 { - return &csi.DeleteVolumeResponse{}, nil - } - - // This delete logic preserves order and prevents potential memory - // leaks. The slice's elements may not be pointers, but the structs - // themselves have fields that are. - copy(s.vols[i:], s.vols[i+1:]) - s.vols[len(s.vols)-1] = csi.Volume{} - s.vols = s.vols[:len(s.vols)-1] - log.WithField("volumeID", req.VolumeId).Debug("mock delete volume") - return &csi.DeleteVolumeResponse{}, nil -} - -func (s *service) ControllerPublishVolume( - ctx context.Context, - req *csi.ControllerPublishVolumeRequest) ( - *csi.ControllerPublishVolumeResponse, error) { - - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - - i, v := s.findVolNoLock("id", req.VolumeId) - if i < 0 { - return nil, status.Error(codes.NotFound, req.VolumeId) - } - - // devPathKey is the key in the volume's attributes that is set to a - // mock device path if the volume has been published by the controller - // to the specified node. - devPathKey := path.Join(req.NodeId, "dev") - - // Check to see if the volume is already published. - if device := v.VolumeContext[devPathKey]; device != "" { - return &csi.ControllerPublishVolumeResponse{ - PublishContext: map[string]string{ - "device": device, - }, - }, nil - } - - // Publish the volume. - device := "/dev/mock" - v.VolumeContext[devPathKey] = device - s.vols[i] = v - - return &csi.ControllerPublishVolumeResponse{ - PublishContext: map[string]string{ - "device": device, - }, - }, nil -} - -func (s *service) ControllerUnpublishVolume( - ctx context.Context, - req *csi.ControllerUnpublishVolumeRequest) ( - *csi.ControllerUnpublishVolumeResponse, error) { - - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - - i, v := s.findVolNoLock("id", req.VolumeId) - if i < 0 { - return nil, status.Error(codes.NotFound, req.VolumeId) - } - - // devPathKey is the key in the volume's attributes that is set to a - // mock device path if the volume has been published by the controller - // to the specified node. - devPathKey := path.Join(req.NodeId, "dev") - - // if NodeID is not blank, unpublish from just that node - if req.NodeId != "" { - // Check to see if the volume is already unpublished. - if v.VolumeContext[devPathKey] == "" { - return &csi.ControllerUnpublishVolumeResponse{}, nil - } - - // Unpublish the volume. - delete(v.VolumeContext, devPathKey) - } else { - // NodeID is blank, unpublish from all nodes, which can be identified by - // ending with "/dev" - for k, _ := range v.VolumeContext { - if strings.HasSuffix(k, devPathKey) { - delete(v.VolumeContext, k) - } - } - } - s.vols[i] = v - - return &csi.ControllerUnpublishVolumeResponse{}, nil -} - -func (s *service) ValidateVolumeCapabilities( - ctx context.Context, - req *csi.ValidateVolumeCapabilitiesRequest) ( - *csi.ValidateVolumeCapabilitiesResponse, error) { - - return &csi.ValidateVolumeCapabilitiesResponse{ - Confirmed: &csi.ValidateVolumeCapabilitiesResponse_Confirmed{ - VolumeContext: req.GetVolumeContext(), - VolumeCapabilities: req.GetVolumeCapabilities(), - Parameters: req.GetParameters(), - }, - }, nil -} - -func (s *service) ListVolumes( - ctx context.Context, - req *csi.ListVolumesRequest) ( - *csi.ListVolumesResponse, error) { - - // Copy the mock volumes into a new slice in order to avoid - // locking the service's volume slice for the duration of the - // ListVolumes RPC. - var vols []csi.Volume - func() { - s.volsRWL.RLock() - defer s.volsRWL.RUnlock() - vols = make([]csi.Volume, len(s.vols)) - copy(vols, s.vols) - }() - - var ( - ulenVols = int32(len(vols)) - maxEntries = req.MaxEntries - startingToken int32 - ) - - if v := req.StartingToken; v != "" { - i, err := strconv.ParseUint(v, 10, 32) - if err != nil { - return nil, status.Errorf( - codes.InvalidArgument, - "startingToken=%d !< int32=%d", - startingToken, math.MaxUint32) - } - startingToken = int32(i) - } - - if startingToken > ulenVols { - return nil, status.Errorf( - codes.InvalidArgument, - "startingToken=%d > len(vols)=%d", - startingToken, ulenVols) - } - - // Discern the number of remaining entries. - rem := ulenVols - startingToken - - // If maxEntries is 0 or greater than the number of remaining entries then - // set maxEntries to the number of remaining entries. - if maxEntries == 0 || maxEntries > rem { - maxEntries = rem - } - - var ( - i int - j = startingToken - entries = make( - []*csi.ListVolumesResponse_Entry, - maxEntries) - ) - - for i = 0; i < len(entries); i++ { - entries[i] = &csi.ListVolumesResponse_Entry{ - Volume: &vols[j], - } - j++ - } - - var nextToken string - if n := startingToken + int32(i); n < ulenVols { - nextToken = fmt.Sprintf("%d", n) - } - - return &csi.ListVolumesResponse{ - Entries: entries, - NextToken: nextToken, - }, nil -} - -func (s *service) GetCapacity( - ctx context.Context, - req *csi.GetCapacityRequest) ( - *csi.GetCapacityResponse, error) { - - return &csi.GetCapacityResponse{ - AvailableCapacity: tib100, - }, nil -} - -func (s *service) ControllerGetCapabilities( - ctx context.Context, - req *csi.ControllerGetCapabilitiesRequest) ( - *csi.ControllerGetCapabilitiesResponse, error) { - - return &csi.ControllerGetCapabilitiesResponse{ - Capabilities: []*csi.ControllerServiceCapability{ - { - Type: &csi.ControllerServiceCapability_Rpc{ - Rpc: &csi.ControllerServiceCapability_RPC{ - Type: csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME, - }, - }, - }, - { - Type: &csi.ControllerServiceCapability_Rpc{ - Rpc: &csi.ControllerServiceCapability_RPC{ - Type: csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME, - }, - }, - }, - { - Type: &csi.ControllerServiceCapability_Rpc{ - Rpc: &csi.ControllerServiceCapability_RPC{ - Type: csi.ControllerServiceCapability_RPC_LIST_VOLUMES, - }, - }, - }, - { - Type: &csi.ControllerServiceCapability_Rpc{ - Rpc: &csi.ControllerServiceCapability_RPC{ - Type: csi.ControllerServiceCapability_RPC_GET_CAPACITY, - }, - }, - }, - { - Type: &csi.ControllerServiceCapability_Rpc{ - Rpc: &csi.ControllerServiceCapability_RPC{ - Type: csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, - }, - }, - }, - { - Type: &csi.ControllerServiceCapability_Rpc{ - Rpc: &csi.ControllerServiceCapability_RPC{ - Type: csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, - }, - }, - }, - }, - }, nil -} - -func (s *service) CreateSnapshot( - ctx context.Context, - req *csi.CreateSnapshotRequest) ( - *csi.CreateSnapshotResponse, error) { - - snap := s.newSnapshot(req.Name, tib) - s.snapsRWL.Lock() - defer s.snapsRWL.Unlock() - s.snaps = append(s.snaps, snap) - - return &csi.CreateSnapshotResponse{ - Snapshot: &snap, - }, nil -} - -func (s *service) DeleteSnapshot( - ctx context.Context, - req *csi.DeleteSnapshotRequest) ( - *csi.DeleteSnapshotResponse, error) { - if req.SnapshotId == "" { - return nil, status.Error(codes.InvalidArgument, "required: SnapshotID") - } - - return &csi.DeleteSnapshotResponse{}, nil -} - -func (s *service) ListSnapshots( - ctx context.Context, - req *csi.ListSnapshotsRequest) ( - *csi.ListSnapshotsResponse, error) { - - // Copy the mock snapshots into a new slice in order to avoid - // locking the service's snapshot slice for the duration of the - // ListSnapshots RPC. - var snaps []csi.Snapshot - func() { - s.snapsRWL.RLock() - defer s.snapsRWL.RUnlock() - snaps = make([]csi.Snapshot, len(s.snaps)) - copy(snaps, s.snaps) - }() - - var ( - ulensnaps = int32(len(snaps)) - maxEntries = req.MaxEntries - startingToken int32 - ) - - if s := req.StartingToken; s != "" { - i, err := strconv.ParseUint(s, 10, 32) - if err != nil { - return nil, status.Errorf( - codes.InvalidArgument, - "startingToken=%d !< int32=%d", - startingToken, math.MaxUint32) - } - startingToken = int32(i) - } - - if startingToken > ulensnaps { - return nil, status.Errorf( - codes.InvalidArgument, - "startingToken=%d > len(snaps)=%d", - startingToken, ulensnaps) - } - - // Discern the number of remaining entries. - rem := ulensnaps - startingToken - - // If maxEntries is 0 or greater than the number of remaining entries then - // set maxEntries to the number of remaining entries. - if maxEntries == 0 || maxEntries > rem { - maxEntries = rem - } - - var ( - i int - j = startingToken - entries = make( - []*csi.ListSnapshotsResponse_Entry, - maxEntries) - ) - - log.WithField("entries", entries).WithField("rem", rem).WithField("maxEntries", maxEntries).Debug("KEK") - for i = 0; i < len(entries); i++ { - log.WithField("i", i).WithField("j", j).WithField("maxEntries", maxEntries).Debugf("rem: %d\n", rem) - entries[i] = &csi.ListSnapshotsResponse_Entry{ - Snapshot: &snaps[j], - } - j++ - } - - var nextToken string - if n := startingToken + int32(i); n < ulensnaps { - nextToken = fmt.Sprintf("%d", n) - } - - log.WithField("nextToken", nextToken).Debugf("Entries: %#v\n", entries) - return &csi.ListSnapshotsResponse{ - Entries: entries, - NextToken: nextToken, - }, nil -} - -func (s *service) ControllerExpandVolume( - ctx context.Context, - req *csi.ControllerExpandVolumeRequest) ( - *csi.ControllerExpandVolumeResponse, error) { - - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - - i, v := s.findVolNoLock("id", req.VolumeId) - if i < 0 { - return nil, status.Error(codes.NotFound, req.VolumeId) - } - - var capacity int64 - - if cr := req.CapacityRange; cr != nil { - if rb := cr.RequiredBytes; rb > 0 { - capacity = rb - } - if lb := cr.LimitBytes; lb > 0 { - capacity = lb - } - } - - if capacity < v.CapacityBytes { - return nil, status.Error(codes.OutOfRange, "requested new capacity smaller than existing") - } - - v.CapacityBytes = capacity - - return &csi.ControllerExpandVolumeResponse{ - CapacityBytes: v.CapacityBytes, - NodeExpansionRequired: false, - }, nil -} diff --git a/vendor/github.com/rexray/gocsi/mock/service/identity.go b/vendor/github.com/rexray/gocsi/mock/service/identity.go deleted file mode 100644 index fdbfc1a557..0000000000 --- a/vendor/github.com/rexray/gocsi/mock/service/identity.go +++ /dev/null @@ -1,55 +0,0 @@ -package service - -import ( - "github.com/golang/protobuf/ptypes/wrappers" - "golang.org/x/net/context" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -func (s *service) Probe( - ctx context.Context, - req *csi.ProbeRequest) ( - *csi.ProbeResponse, error) { - - return &csi.ProbeResponse{ - Ready: &wrappers.BoolValue{Value: true}, - }, nil -} - -func (s *service) GetPluginInfo( - ctx context.Context, - req *csi.GetPluginInfoRequest) ( - *csi.GetPluginInfoResponse, error) { - - return &csi.GetPluginInfoResponse{ - Name: Name, - VendorVersion: VendorVersion, - Manifest: Manifest, - }, nil -} - -func (s *service) GetPluginCapabilities( - ctx context.Context, - req *csi.GetPluginCapabilitiesRequest) ( - *csi.GetPluginCapabilitiesResponse, error) { - - return &csi.GetPluginCapabilitiesResponse{ - Capabilities: []*csi.PluginCapability{ - &csi.PluginCapability{ - Type: &csi.PluginCapability_Service_{ - Service: &csi.PluginCapability_Service{ - Type: csi.PluginCapability_Service_CONTROLLER_SERVICE, - }, - }, - }, - &csi.PluginCapability{ - Type: &csi.PluginCapability_VolumeExpansion_{ - VolumeExpansion: &csi.PluginCapability_VolumeExpansion{ - Type: csi.PluginCapability_VolumeExpansion_ONLINE, - }, - }, - }, - }, - }, nil -} diff --git a/vendor/github.com/rexray/gocsi/mock/service/node.go b/vendor/github.com/rexray/gocsi/mock/service/node.go deleted file mode 100644 index c039736c93..0000000000 --- a/vendor/github.com/rexray/gocsi/mock/service/node.go +++ /dev/null @@ -1,153 +0,0 @@ -package service - -import ( - "path" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "golang.org/x/net/context" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -func (s *service) NodeStageVolume( - ctx context.Context, - req *csi.NodeStageVolumeRequest) ( - *csi.NodeStageVolumeResponse, error) { - - return nil, status.Error(codes.Unimplemented, "") -} - -func (s *service) NodeUnstageVolume( - ctx context.Context, - req *csi.NodeUnstageVolumeRequest) ( - *csi.NodeUnstageVolumeResponse, error) { - - return nil, status.Error(codes.Unimplemented, "") -} - -func (s *service) NodePublishVolume( - ctx context.Context, - req *csi.NodePublishVolumeRequest) ( - *csi.NodePublishVolumeResponse, error) { - - device, ok := req.PublishContext["device"] - if !ok { - return nil, status.Error( - codes.InvalidArgument, - "publish volume info 'device' key required") - } - - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - - i, v := s.findVolNoLock("id", req.VolumeId) - if i < 0 { - return nil, status.Error(codes.NotFound, req.VolumeId) - } - - // nodeMntPathKey is the key in the volume's attributes that is set to a - // mock mount path if the volume has been published by the node - nodeMntPathKey := path.Join(s.nodeID, req.TargetPath) - - // Check to see if the volume has already been published. - if v.VolumeContext[nodeMntPathKey] != "" { - - // Requests marked Readonly fail due to volumes published by - // the Mock driver supporting only RW mode. - if req.Readonly { - return nil, status.Error(codes.AlreadyExists, req.VolumeId) - } - - return &csi.NodePublishVolumeResponse{}, nil - } - - // Publish the volume. - v.VolumeContext[nodeMntPathKey] = device - s.vols[i] = v - - return &csi.NodePublishVolumeResponse{}, nil -} - -func (s *service) NodeUnpublishVolume( - ctx context.Context, - req *csi.NodeUnpublishVolumeRequest) ( - *csi.NodeUnpublishVolumeResponse, error) { - - s.volsRWL.Lock() - defer s.volsRWL.Unlock() - - i, v := s.findVolNoLock("id", req.VolumeId) - if i < 0 { - return nil, status.Error(codes.NotFound, req.VolumeId) - } - - // nodeMntPathKey is the key in the volume's attributes that is set to a - // mock mount path if the volume has been published by the node - nodeMntPathKey := path.Join(s.nodeID, req.TargetPath) - - // Check to see if the volume has already been unpublished. - if v.VolumeContext[nodeMntPathKey] == "" { - return &csi.NodeUnpublishVolumeResponse{}, nil - } - - // Unpublish the volume. - delete(v.VolumeContext, nodeMntPathKey) - s.vols[i] = v - - return &csi.NodeUnpublishVolumeResponse{}, nil -} - -func (s *service) NodeGetInfo( - ctx context.Context, - req *csi.NodeGetInfoRequest) ( - *csi.NodeGetInfoResponse, error) { - - return &csi.NodeGetInfoResponse{ - NodeId: s.nodeID, - }, nil -} - -func (s *service) NodeGetCapabilities( - ctx context.Context, - req *csi.NodeGetCapabilitiesRequest) ( - *csi.NodeGetCapabilitiesResponse, error) { - - return &csi.NodeGetCapabilitiesResponse{}, nil -} - -func (s *service) NodeGetVolumeStats( - ctx context.Context, - req *csi.NodeGetVolumeStatsRequest) ( - *csi.NodeGetVolumeStatsResponse, error) { - - var f *csi.Volume - for _, v := range s.vols { - if v.VolumeId == req.VolumeId { - f = &v - } - } - if f == nil { - return nil, status.Errorf(codes.NotFound, "No volume found with id %s", req.VolumeId) - } - - return &csi.NodeGetVolumeStatsResponse{ - Usage: []*csi.VolumeUsage{ - &csi.VolumeUsage{ - Available: int64(float64(f.CapacityBytes) * 0.6), - Total: f.CapacityBytes, - Used: int64(float64(f.CapacityBytes) * 0.4), - Unit: csi.VolumeUsage_BYTES, - }, - }, - }, nil -} - -func (s *service) NodeExpandVolume( - ctx context.Context, - req *csi.NodeExpandVolumeRequest) ( - *csi.NodeExpandVolumeResponse, error) { - - return nil, status.Error(codes.Unimplemented, "") -} diff --git a/vendor/github.com/rexray/gocsi/mock/service/service.go b/vendor/github.com/rexray/gocsi/mock/service/service.go deleted file mode 100644 index f392ac80aa..0000000000 --- a/vendor/github.com/rexray/gocsi/mock/service/service.go +++ /dev/null @@ -1,115 +0,0 @@ -package service - -import ( - "fmt" - "strings" - "sync" - "sync/atomic" - - "github.com/golang/protobuf/ptypes" - - "github.com/container-storage-interface/spec/lib/go/csi" - "golang.org/x/net/context" -) - -const ( - // Name is the name of the CSI plug-in. - Name = "mock.gocsi.rexray.com" - - // VendorVersion is the version returned by GetPluginInfo. - VendorVersion = "1.1.0" -) - -// Manifest is the SP's manifest. -var Manifest = map[string]string{ - "url": "https://github.com/rexray/gocsi/tree/master/mock", -} - -// Service is the CSI Mock service provider. -type Service interface { - csi.ControllerServer - csi.IdentityServer - csi.NodeServer -} - -type service struct { - sync.Mutex - nodeID string - vols []csi.Volume - snaps []csi.Snapshot - volsRWL sync.RWMutex - snapsRWL sync.RWMutex - volsNID uint64 - snapsNID uint64 -} - -// New returns a new Service. -func New() Service { - s := &service{nodeID: Name} - s.vols = []csi.Volume{ - s.newVolume("Mock Volume 1", gib100), - s.newVolume("Mock Volume 2", gib100), - s.newVolume("Mock Volume 3", gib100), - } - return s -} - -const ( - kib int64 = 1024 - mib int64 = kib * 1024 - gib int64 = mib * 1024 - gib100 int64 = gib * 100 - tib int64 = gib * 1024 - tib100 int64 = tib * 100 -) - -func (s *service) newVolume(name string, capcity int64) csi.Volume { - return csi.Volume{ - VolumeId: fmt.Sprintf("%d", atomic.AddUint64(&s.volsNID, 1)), - VolumeContext: map[string]string{"name": name}, - CapacityBytes: capcity, - } -} - -func (s *service) newSnapshot(name string, size int64) csi.Snapshot { - return csi.Snapshot{ - // We set the id to ":" since during delete requests - // we are not given the parent volume id - SnapshotId: "12", - SourceVolumeId: "4", - SizeBytes: size, - CreationTime: ptypes.TimestampNow(), - ReadyToUse: true, - } -} - -func (s *service) findVol(k, v string) (volIdx int, volInfo csi.Volume) { - s.volsRWL.RLock() - defer s.volsRWL.RUnlock() - return s.findVolNoLock(k, v) -} - -func (s *service) findVolNoLock(k, v string) (volIdx int, volInfo csi.Volume) { - volIdx = -1 - - for i, vi := range s.vols { - switch k { - case "id": - if strings.EqualFold(v, vi.VolumeId) { - return i, vi - } - case "name": - if n, ok := vi.VolumeContext["name"]; ok && strings.EqualFold(v, n) { - return i, vi - } - } - } - - return -} - -func (s *service) findVolByName( - ctx context.Context, name string) (int, csi.Volume) { - - return s.findVol("name", name) -} diff --git a/vendor/github.com/rexray/gocsi/usage.go b/vendor/github.com/rexray/gocsi/usage.go deleted file mode 100644 index ae1e43501e..0000000000 --- a/vendor/github.com/rexray/gocsi/usage.go +++ /dev/null @@ -1,269 +0,0 @@ -package gocsi - -const usage = `NAME - {{.Name}} -- {{.Description}} - -SYNOPSIS - {{.BinPath}} -{{if .Usage}} -STORAGE OPTIONS -{{.Usage}}{{end}} -GLOBAL OPTIONS - CSI_ENDPOINT - The CSI endpoint may also be specified by the environment variable - CSI_ENDPOINT. The endpoint should adhere to Go's network address - pattern: - - * tcp://host:port - * unix:///path/to/file.sock. - - If the network type is omitted then the value is assumed to be an - absolute or relative filesystem path to a UNIX socket file - - X_CSI_MODE - Specifies the service mode of the storage plug-in. Valid values are: - - * - * controller - * node - - If unset or set to an empty value the storage plug-in activates - both controller and node services. The identity service is always - activated. - - X_CSI_ENDPOINT_PERMS - When CSI_ENDPOINT is set to a UNIX socket file this environment - variable may be used to specify the socket's file permissions - as an octal number, ex. 0644. Please note this value has no - effect if CSI_ENDPOINT specifies a TCP socket. - - The default value is 0755. - - X_CSI_ENDPOINT_USER - When CSI_ENDPOINT is set to a UNIX socket file this environment - variable may be used to specify the UID or user name of the - user that owns the file. Please note this value has no - effect if CSI_ENDPOINT specifies a TCP socket. - - If no value is specified then the user owner of the file is the - same as the user that starts the process. - - X_CSI_ENDPOINT_GROUP - When CSI_ENDPOINT is set to a UNIX socket file this environment - variable may be used to specify the GID or group name of the - group that owns the file. Please note this value has no - effect if CSI_ENDPOINT specifies a TCP socket. - - If no value is specified then the group owner of the file is the - same as the group that starts the process. - - X_CSI_DEBUG - Enabling this option is the same as: - X_CSI_LOG_LEVEL=debug - X_CSI_REQ_LOGGING=true - X_CSI_REP_LOGGING=true - - X_CSI_LOG_LEVEL - The log level. Valid values include: - * PANIC - * FATAL - * ERROR - * WARN - * INFO - * DEBUG - - The default value is WARN. - - X_CSI_PLUGIN_INFO - The plug-in information is specified via the following - comma-separated format: - - NAME, VENDOR_VERSION[, MANIFEST...] - - The MANIFEST value may be a series of additional - comma-separated key/value pairs. - - Please see the encoding/csv package (https://goo.gl/1j1xb9) for - information on how to quote keys and/or values to include - leading and trailing whitespace. - - Setting this environment variable will cause the program to - bypass the SP's GetPluginInfo RPC and returns the specified - information instead. - - X_CSI_REQ_LOGGING - A flag that enables logging of incoming requests to STDOUT. - - Enabling this option sets X_CSI_REQ_ID_INJECTION=true. - - X_CSI_REP_LOGGING - A flag that enables logging of outgoing responses to STDOUT. - - Enabling this option sets X_CSI_REQ_ID_INJECTION=true. - - X_CSI_LOG_DISABLE_VOL_CTX - A flag that disables the logging of the VolumeContext field. - - Only takes effect if Request or Reply logging is enabled. - - X_CSI_REQ_ID_INJECTION - A flag that enables request ID injection. The ID is parsed from - the incoming request's metadata with a key of "csi.requestid". - If no value for that key is found then a new request ID is - generated using an atomic sequence counter. - - X_CSI_SPEC_VALIDATION - Setting X_CSI_SPEC_VALIDATION=true is the same as: - X_CSI_SPEC_REQ_VALIDATION=true - X_CSI_SPEC_REP_VALIDATION=true - - X_CSI_SPEC_REQ_VALIDATION - A flag that enables the validation of CSI request messages. - - X_CSI_SPEC_REP_VALIDATION - A flag that enables the validation of CSI response messages. - Invalid responses are marshalled into a gRPC error with a code - of "Internal." - - X_CSI_SPEC_DISABLE_LEN_CHECK - A flag that disables validation of CSI message field lengths. - - X_CSI_REQUIRE_STAGING_TARGET_PATH - A flag that enables treating the following fields as required: - * NodePublishVolumeRequest.StagingTargetPath - - X_CSI_REQUIRE_VOL_CONTEXT - A flag that enables treating the following fields as required: - * ControllerPublishVolumeRequest.VolumeContext - * ValidateVolumeCapabilitiesRequest.VolumeContext - * ValidateVolumeCapabilitiesResponse.VolumeContext - * NodeStageVolumeRequest.VolumeContext - * NodePublishVolumeRequest.VolumeContext - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_PUB_CONTEXT - A flag that enables treating the following fields as required: - * ControllerPublishVolumeResponse.PublishContext - * NodeStageVolumeRequest.PublishContext - * NodePublishVolumeRequest.PublishContext - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_CREDS - Setting X_CSI_REQUIRE_CREDS=true is the same as: - X_CSI_REQUIRE_CREDS_CREATE_VOL=true - X_CSI_REQUIRE_CREDS_DELETE_VOL=true - X_CSI_REQUIRE_CREDS_CTRLR_PUB_VOL=true - X_CSI_REQUIRE_CREDS_CTRLR_UNPUB_VOL=true - X_CSI_REQUIRE_CREDS_NODE_PUB_VOL=true - X_CSI_REQUIRE_CREDS_NODE_UNPUB_VOL=true - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_CREDS_CREATE_VOL - A flag that enables treating the following fields as required: - * CreateVolumeRequest.UserCredentials - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_CREDS_DELETE_VOL - A flag that enables treating the following fields as required: - * DeleteVolumeRequest.UserCredentials - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_CREDS_CTRLR_PUB_VOL - A flag that enables treating the following fields as required: - * ControllerPublishVolumeRequest.UserCredentials - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_CREDS_CTRLR_UNPUB_VOL - A flag that enables treating the following fields as required: - * ControllerUnpublishVolumeRequest.UserCredentials - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_REQUIRE_CREDS_NODE_STG_VOL - A flag that enables treating the following fields as required: - * NodeStageVolumeRequest.UserCredentials - - X_CSI_REQUIRE_CREDS_NODE_PUB_VOL - A flag that enables treating the following fields as required: - * NodePublishVolumeRequest.UserCredentials - - Enabling this option sets X_CSI_SPEC_REQ_VALIDATION=true. - - X_CSI_SERIAL_VOL_ACCESS - A flag that enables the serial volume access middleware. - - X_CSI_SERIAL_VOL_ACCESS_TIMEOUT - A time.Duration string that determines how long the serial volume - access middleware waits to obtain a lock for the request's volume before - returning a the gRPC error code FailedPrecondition (5) to indicate - an operation is already pending for the specified volume. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_DOMAIN - The name of the environment variable that defines the etcd lock - provider's concurrency domain. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_TTL - The length of time etcd will wait before releasing ownership of a - distributed lock if the lock's session has not been renewed. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_ENDPOINTS - A comma-separated list of etcd endpoints. If specified then the - SP's serial volume access middleware will leverage etcd to enable - distributed locking. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_AUTO_SYNC_INTERVAL - A time.Duration string that specifies the interval to update - endpoints with its latest members. A value of 0 disables - auto-sync. By default auto-sync is disabled. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_TIMEOUT - A time.Duration string that specifies the timeout for failing to - establish a connection. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_KEEP_ALIVE_TIME - A time.Duration string that defines the time after which the client - pings the server to see if the transport is alive. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_DIAL_KEEP_ALIVE_TIMEOUT - A time.Duration string that defines the time that the client waits for - a response for the keep-alive probe. If the response is not received - in this time, the connection is closed. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_MAX_CALL_SEND_MSG_SZ - Defines the client-side request send limit in bytes. If 0, it defaults - to 2.0 MiB (2 * 1024 * 1024). Make sure that "MaxCallSendMsgSize" < - server-side default send/recv limit. ("--max-request-bytes" flag to - etcd or "embed.Config.MaxRequestBytes"). - - X_CSI_SERIAL_VOL_ACCESS_ETCD_MAX_CALL_RECV_MSG_SZ - Defines the client-side response receive limit. If 0, it defaults to - "math.MaxInt32", because range response can easily exceed request send - limits. Make sure that "MaxCallRecvMsgSize" >= server-side default - send/recv limit. ("--max-request-bytes" flag to etcd or - "embed.Config.MaxRequestBytes"). - - X_CSI_SERIAL_VOL_ACCESS_ETCD_USERNAME - The user name used for authentication. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_PASSWORD - The password used for authentication. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_REJECT_OLD_CLUSTER - A flag that indicates refusal to create a client against an outdated - cluster. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_TLS - A flag that indicates the client should attempt a TLS connection. - - X_CSI_SERIAL_VOL_ACCESS_ETCD_TLS_INSECURE - A flag that indicates the TLS connection should not verify peer - certificates. - -The flags -?,-h,-help may be used to print this screen. -` diff --git a/vendor/github.com/rexray/gocsi/utils/utils.go b/vendor/github.com/rexray/gocsi/utils/utils.go deleted file mode 100644 index cc885c6a86..0000000000 --- a/vendor/github.com/rexray/gocsi/utils/utils.go +++ /dev/null @@ -1,682 +0,0 @@ -package utils - -import ( - "bytes" - "context" - "encoding/csv" - "errors" - "fmt" - "io" - "net" - "os" - "regexp" - "sort" - "strings" - "sync" - - log "github.com/sirupsen/logrus" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/container-storage-interface/spec/lib/go/csi" -) - -// CSIEndpoint is the name of the environment variable that -// contains the CSI endpoint. -const CSIEndpoint = "CSI_ENDPOINT" - -// GetCSIEndpoint returns the network address specified by the -// environment variable CSI_ENDPOINT. -func GetCSIEndpoint() (network, addr string, err error) { - protoAddr := os.Getenv(CSIEndpoint) - if emptyRX.MatchString(protoAddr) { - return "", "", errors.New("missing CSI_ENDPOINT") - } - return ParseProtoAddr(protoAddr) -} - -// GetCSIEndpointListener returns the net.Listener for the endpoint -// specified by the environment variable CSI_ENDPOINT. -func GetCSIEndpointListener() (net.Listener, error) { - proto, addr, err := GetCSIEndpoint() - if err != nil { - return nil, err - } - return net.Listen(proto, addr) -} - -const ( - protoAddrGuessPatt = `(?i)^(?:tcp|udp|ip|unix)[^:]*://` - - protoAddrExactPatt = `(?i)^((?:(?:tcp|udp|ip)[46]?)|` + - `(?:unix(?:gram|packet)?))://(.+)$` -) - -var ( - emptyRX = regexp.MustCompile(`^\s*$`) - protoAddrGuessRX = regexp.MustCompile(protoAddrGuessPatt) - protoAddrExactRX = regexp.MustCompile(protoAddrExactPatt) -) - -// ErrParseProtoAddrRequired occurs when an empty string is provided -// to ParseProtoAddr. -var ErrParseProtoAddrRequired = errors.New( - "non-empty network address is required") - -// ParseProtoAddr parses a Golang network address. -func ParseProtoAddr(protoAddr string) (proto string, addr string, err error) { - - if emptyRX.MatchString(protoAddr) { - return "", "", ErrParseProtoAddrRequired - } - - // If the provided network address does not begin with one - // of the valid network protocols then treat the string as a - // file path. - // - // First check to see if the file exists at the specified path. - // If it does then assume it's a valid file path and return it. - // - // Otherwise attempt to create the file. If the file can be created - // without error then remove the file and return the result a UNIX - // socket file path. - if !protoAddrGuessRX.MatchString(protoAddr) { - - // If the file already exists then assume it's a valid sock - // file and return it. - if _, err := os.Stat(protoAddr); !os.IsNotExist(err) { - return "unix", protoAddr, nil - } - - f, err := os.Create(protoAddr) - if err != nil { - return "", "", fmt.Errorf( - "invalid implied sock file: %s: %v", protoAddr, err) - } - if err := f.Close(); err != nil { - return "", "", fmt.Errorf( - "failed to verify network address as sock file: %s", protoAddr) - } - if err := os.RemoveAll(protoAddr); err != nil { - return "", "", fmt.Errorf( - "failed to remove verified sock file: %s", protoAddr) - } - return "unix", protoAddr, nil - } - - // Parse the provided network address into the protocol and address parts. - m := protoAddrExactRX.FindStringSubmatch(protoAddr) - if m == nil { - return "", "", fmt.Errorf("invalid network address: %s", protoAddr) - } - return m[1], m[2], nil -} - -// ParseMap parses a string into a map. The string's expected pattern is: -// -// KEY1=VAL1, "KEY2=VAL2 ", "KEY 3= VAL3" -// -// The key/value pairs are separated by a comma and optional whitespace. -// Please see the encoding/csv package (https://goo.gl/1j1xb9) for information -// on how to quote keys and/or values to include leading and trailing -// whitespace. -func ParseMap(line string) map[string]string { - line = strings.TrimSpace(line) - if line == "" { - return nil - } - - r := csv.NewReader(strings.NewReader(line)) - r.TrimLeadingSpace = true - - record, err := r.Read() - if err == io.EOF { - return nil - } - if err != nil { - panic(err) - } - - data := map[string]string{} - for i := range record { - p := strings.SplitN(record[i], "=", 2) - if len(p) == 0 { - continue - } - k := p[0] - var v string - if len(p) > 1 { - v = p[1] - } - data[k] = v - } - - return data -} - -// ParseSlice parses a string into a slice. The string's expected pattern is: -// -// VAL1, "VAL2 ", " VAL3 " -// -// The values are separated by a comma and optional whitespace. Please see -// the encoding/csv package (https://goo.gl/1j1xb9) for information on how to -// quote values to include leading and trailing whitespace. -func ParseSlice(line string) []string { - line = strings.TrimSpace(line) - if line == "" { - return nil - } - - r := csv.NewReader(strings.NewReader(line)) - r.TrimLeadingSpace = true - - record, err := r.Read() - if err == io.EOF { - return nil - } - if err != nil { - panic(err) - } - - return record -} - -// ParseMapWS parses a string into a map. The string's expected pattern is: -// -// KEY1=VAL1 KEY2="VAL2 " "KEY 3"=' VAL3' -// -// The key/value pairs are separated by one or more whitespace characters. -// Keys and/or values with whitespace should be quoted with either single -// or double quotes. -func ParseMapWS(line string) map[string]string { - if line == "" { - return nil - } - - var ( - escp bool - quot rune - ckey string - keyb = &bytes.Buffer{} - valb = &bytes.Buffer{} - word = keyb - data = map[string]string{} - ) - - for i, c := range line { - // Check to see if the character is a quote character. - switch c { - case '\\': - // If not already escaped then activate escape. - if !escp { - escp = true - continue - } - case '\'', '"': - // If the quote or double quote is the first char or - // an unescaped char then determine if this is the - // beginning of a quote or end of one. - if i == 0 || !escp { - if quot == c { - quot = 0 - } else { - quot = c - } - continue - } - case '=': - // If the word buffer is currently the key buffer, - // quoting is not enabled, and the preceeding character - // is not the escape character then the equal sign indicates - // a transition from key to value. - if word == keyb && quot == 0 && !escp { - ckey = keyb.String() - keyb.Reset() - word = valb - continue - } - case ' ', '\t': - // If quoting is not enabled and the preceeding character is - // not the escape character then record the value into the - // map and fast-forward the cursor to the next, non-whitespace - // character. - if quot == 0 && !escp { - // Record the value into the map for the current key. - if ckey != "" { - data[ckey] = valb.String() - valb.Reset() - word = keyb - ckey = "" - } - continue - } - } - if escp { - escp = false - } - word.WriteRune(c) - } - - // If the current key string is not empty then record it with the value - // buffer's string value as a new pair. - if ckey != "" { - data[ckey] = valb.String() - } - - return data -} - -// NewMountCapability returns a new *csi.VolumeCapability for a -// volume that is to be mounted. -func NewMountCapability( - mode csi.VolumeCapability_AccessMode_Mode, - fsType string, - mountFlags ...string) *csi.VolumeCapability { - - return &csi.VolumeCapability{ - AccessMode: &csi.VolumeCapability_AccessMode{ - Mode: mode, - }, - AccessType: &csi.VolumeCapability_Mount{ - Mount: &csi.VolumeCapability_MountVolume{ - FsType: fsType, - MountFlags: mountFlags, - }, - }, - } -} - -// NewBlockCapability returns a new *csi.VolumeCapability for a -// volume that is to be accessed as a raw device. -func NewBlockCapability( - mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability { - - return &csi.VolumeCapability{ - AccessMode: &csi.VolumeCapability_AccessMode{ - Mode: mode, - }, - AccessType: &csi.VolumeCapability_Block{ - Block: &csi.VolumeCapability_BlockVolume{}, - }, - } -} - -// PageVolumes issues one or more ListVolumes requests to retrieve -// all available volumes, returning them over a Go channel. -func PageVolumes( - ctx context.Context, - client csi.ControllerClient, - req csi.ListVolumesRequest, - opts ...grpc.CallOption) (<-chan csi.Volume, <-chan error) { - - var ( - cvol = make(chan csi.Volume) - cerr = make(chan error) - ) - - // Execute the RPC in a goroutine, looping until there are no - // more volumes available. - go func() { - var ( - wg sync.WaitGroup - pages int - cancel context.CancelFunc - ) - - // Get a cancellation context used to control the interaction - // between returning volumes and the possibility of an error. - ctx, cancel = context.WithCancel(ctx) - - // waitAndClose closes the volume and error channels after all - // channel-dependent goroutines have completed their work - defer func() { - wg.Wait() - close(cerr) - close(cvol) - log.WithField("pages", pages).Debug("PageAllVolumes: exit") - }() - - sendVolumes := func(res csi.ListVolumesResponse) { - // Loop over the volume entries until they're all gone - // or the context is cancelled. - var i int - for i = 0; i < len(res.Entries) && ctx.Err() == nil; i++ { - - // Send the volume over the channel. - cvol <- *res.Entries[i].Volume - - // Let the wait group know that this worker has completed - // its task. - wg.Done() - } - // If not all volumes have been sent over the channel then - // deduct the remaining number from the wait group. - if i != len(res.Entries) { - rem := len(res.Entries) - i - log.WithFields(map[string]interface{}{ - "cancel": ctx.Err(), - "remaining": rem, - }).Warn("PageAllVolumes: cancelled w unprocessed results") - wg.Add(-rem) - } - } - - // listVolumes returns true if there are more volumes to list. - listVolumes := func() bool { - - // The wait group "wg" is blocked during the execution of - // this function. - wg.Add(1) - defer wg.Done() - - res, err := client.ListVolumes(ctx, &req, opts...) - if err != nil { - cerr <- err - - // Invoke the cancellation context function to - // ensure that work wraps up as quickly as possible. - cancel() - - return false - } - - // Add to the number of workers - wg.Add(len(res.Entries)) - - // Process the retrieved volumes. - go sendVolumes(*res) - - // Set the request's starting token to the response's - // next token. - req.StartingToken = res.NextToken - return req.StartingToken != "" - } - - // List volumes until there are no more volumes or the context - // is cancelled. - for { - if ctx.Err() != nil { - break - } - if !listVolumes() { - break - } - pages++ - } - }() - - return cvol, cerr -} - -// PageSnapshots issues one or more ListSnapshots requests to retrieve -// all available snaphsots, returning them over a Go channel. -func PageSnapshots( - ctx context.Context, - client csi.ControllerClient, - req csi.ListSnapshotsRequest, - opts ...grpc.CallOption) (<-chan csi.Snapshot, <-chan error) { - - var ( - csnap = make(chan csi.Snapshot) - cerr = make(chan error) - ) - - // Execute the RPC in a goroutine, looping until there are no - // more snaphsots available. - go func() { - var ( - wg sync.WaitGroup - pages int - cancel context.CancelFunc - ) - - // Get a cancellation context used to control the interaction - // between returning snaphsots and the possibility of an error. - ctx, cancel = context.WithCancel(ctx) - - // waitAndClose closes the snaphsot and error channels after all - // channel-dependent goroutines have completed their work - defer func() { - wg.Wait() - close(cerr) - close(csnap) - log.WithField("pages", pages).Debug("PageAllSnapshots: exit") - }() - - sendSnapshots := func(res csi.ListSnapshotsResponse) { - // Loop over the snaphsot entries until they're all gone - // or the context is cancelled. - var i int - for i = 0; i < len(res.Entries) && ctx.Err() == nil; i++ { - - // Send the snaphsot over the channel. - csnap <- *res.Entries[i].Snapshot - - // Let the wait group know that this worker has completed - // its task. - wg.Done() - } - // If not all snaphsots have been sent over the channel then - // deduct the remaining number from the wait group. - if i != len(res.Entries) { - rem := len(res.Entries) - i - log.WithFields(map[string]interface{}{ - "cancel": ctx.Err(), - "remaining": rem, - }).Warn("PageAllSnapshots: cancelled w unprocessed results") - wg.Add(-rem) - } - } - - // listSnapshots returns true if there are more snaphsots to list. - listSnapshots := func() bool { - - // The wait group "wg" is blocked during the execution of - // this function. - wg.Add(1) - defer wg.Done() - - res, err := client.ListSnapshots(ctx, &req, opts...) - if err != nil { - cerr <- err - - // Invoke the cancellation context function to - // ensure that work wraps up as quickly as possible. - cancel() - - return false - } - - // Add to the number of workers - wg.Add(len(res.Entries)) - - // Process the retrieved snaphsots. - go sendSnapshots(*res) - - // Set the request's starting token to the response's - // next token. - req.StartingToken = res.NextToken - return req.StartingToken != "" - } - - // List snaphsots until there are no more snaphsots or the context - // is cancelled. - for { - if ctx.Err() != nil { - break - } - if !listSnapshots() { - break - } - pages++ - } - }() - - return csnap, cerr -} - -// IsSuccess returns nil if the provided error is an RPC error with an error -// code that is OK (0) or matches one of the additional, provided successful -// error codes. Otherwise the original error is returned. -func IsSuccess(err error, successCodes ...codes.Code) error { - - // Shortcut the process by first checking to see if the error is nil. - if err == nil { - return nil - } - - // Check to see if the provided error is an RPC error. - stat, ok := status.FromError(err) - if !ok { - return err - } - - if stat.Code() == codes.OK { - return nil - } - for _, c := range successCodes { - if stat.Code() == c { - return nil - } - } - - return err -} - -// AreVolumeCapabilitiesCompatible returns a flag indicating whether -// the volume capability array "a" is compatible with "b". A true value -// indicates that "a" and "b" are equivalent or "b" is a superset of "a". -func AreVolumeCapabilitiesCompatible( - a, b []*csi.VolumeCapability) (bool, error) { - - if len(a) > len(b) { - return false, status.Error( - codes.AlreadyExists, - "requested capabilities exceed existing") - } - - var i int - - for _, va := range a { - for _, vb := range b { - if EqualVolumeCapability(va, vb) { - i++ - } - } - } - - return i >= len(a), nil -} - -// IsVolumeCapabilityCompatible returns a flag indicating whether -// the volume capability "a" is compatible with the set "b". A true value -// indicates that "a" and "b" are equivalent or "b" is a superset of "a". -func IsVolumeCapabilityCompatible( - a *csi.VolumeCapability, b []*csi.VolumeCapability) (bool, error) { - - return AreVolumeCapabilitiesCompatible([]*csi.VolumeCapability{a}, b) -} - -// EqualVolumeCapability returns a flag indicating if two csi.VolumeCapability -// objects are equal. If a and b are both nil then false is returned. -func EqualVolumeCapability(a, b *csi.VolumeCapability) bool { - if a == nil || b == nil { - return false - } - - // Compare access modes. - if a.AccessMode != nil && b.AccessMode == nil { - return false - } - if a.AccessMode == nil && b.AccessMode != nil { - return false - } - if a.AccessMode != nil && b.AccessMode != nil && - a.AccessMode.Mode != b.AccessMode.Mode { - return false - } - - // If both capabilities are block then return true. - if a.GetBlock() != nil && b.GetBlock() != nil { - return true - } - - aMount := a.GetMount() - bMount := b.GetMount() - if aMount != nil && bMount != nil { - - // If the filesystem types are incompatible then return false. - if aMount.FsType != bMount.FsType { - return false - } - - // Compare the mount flags lengths. - if len(aMount.MountFlags) != len(bMount.MountFlags) { - return false - } - - // Copy the mount flags to prevent the original order - // from changing due to the sort operation below. - af := append([]string{}, aMount.MountFlags...) - bf := append([]string{}, bMount.MountFlags...) - - // Sort the mount flags prior to comparison. - sort.Strings(af) - sort.Strings(bf) - - // Compare the mount flags. - for j := range af { - if af[j] != bf[j] { - return false - } - } - - // The mount capabilities are compatible; return true. - return true - } - - return false -} - -// EqualVolume returns a flag indicating if two csi.Volume -// objects are equal. If a and b are both nil then false is returned. -func EqualVolume(a, b *csi.Volume) bool { - if a == nil || b == nil { - return false - } - return CompareVolume(*a, *b) == 0 -} - -// CompareVolume compares two csi.Volume objects and returns a -// negative number if a < b, a positive number if a > b, and zero if -// a == b. -func CompareVolume(a, b csi.Volume) int { - if a.VolumeId < b.VolumeId { - return -1 - } - if a.VolumeId > b.VolumeId { - return 1 - } - if a.CapacityBytes < b.CapacityBytes { - return -1 - } - if a.CapacityBytes > b.CapacityBytes { - return 1 - } - if len(a.VolumeContext) < len(b.VolumeContext) { - return -1 - } - if len(a.VolumeContext) > len(b.VolumeContext) { - return 1 - } - for k, v := range a.VolumeContext { - if v < b.VolumeContext[k] { - return -1 - } - if v > b.VolumeContext[k] { - return 1 - } - } - return 0 -} diff --git a/vendor/github.com/rexray/gocsi/utils/utils_middleware.go b/vendor/github.com/rexray/gocsi/utils/utils_middleware.go deleted file mode 100644 index 6d08f160c1..0000000000 --- a/vendor/github.com/rexray/gocsi/utils/utils_middleware.go +++ /dev/null @@ -1,132 +0,0 @@ -package utils - -import ( - "reflect" - - "golang.org/x/net/context" - "google.golang.org/grpc" -) - -// ChainUnaryClient chains one or more unary, client interceptors -// together into a left-to-right series that can be provided to a -// new gRPC client. -func ChainUnaryClient( - i ...grpc.UnaryClientInterceptor) grpc.UnaryClientInterceptor { - - switch len(i) { - case 0: - return func( - ctx context.Context, - method string, - req, rep interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption) error { - return invoker(ctx, method, req, rep, cc, opts...) - } - case 1: - return i[0] - } - - return func( - ctx context.Context, - method string, - req, rep interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption) error { - - bc := func( - cur grpc.UnaryClientInterceptor, - nxt grpc.UnaryInvoker) grpc.UnaryInvoker { - - return func( - curCtx context.Context, - curMethod string, - curReq, curRep interface{}, - curCC *grpc.ClientConn, - curOpts ...grpc.CallOption) error { - - return cur( - curCtx, - curMethod, - curReq, curRep, - curCC, nxt, - curOpts...) - } - } - - c := invoker - for j := len(i) - 1; j >= 0; j-- { - c = bc(i[j], c) - } - - return c(ctx, method, req, rep, cc, opts...) - } -} - -// ChainUnaryServer chains one or more unary, server interceptors -// together into a left-to-right series that can be provided to a -// new gRPC server. -func ChainUnaryServer( - i ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor { - - switch len(i) { - case 0: - return func( - ctx context.Context, - req interface{}, - _ *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - return handler(ctx, req) - } - case 1: - return i[0] - } - - return func( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler) (interface{}, error) { - - bc := func( - cur grpc.UnaryServerInterceptor, - nxt grpc.UnaryHandler) grpc.UnaryHandler { - return func( - curCtx context.Context, - curReq interface{}) (interface{}, error) { - return cur(curCtx, curReq, info, nxt) - } - } - c := handler - for j := len(i) - 1; j >= 0; j-- { - c = bc(i[j], c) - } - return c(ctx, req) - } -} - -// IsNilResponse returns a flag indicating whether or not the provided -// response object is a nil object wrapped inside a non-nil interface. -func IsNilResponse(rep interface{}) bool { - // Determine whether or not the resposne is nil. Otherwise it - // will no longer be possible to perform a nil equality check on the - // response to the interface{} rules for nil comparison. For more info - // please see https://golang.org/doc/faq#nil_error and - // https://github.com/grpc/grpc-go/issues/532. - if rep == nil { - return true - } - rv := reflect.ValueOf(rep) - switch rv.Kind() { - case reflect.Chan, - reflect.Func, - reflect.Interface, - reflect.Map, - reflect.Ptr, - reflect.Slice: - return rv.IsNil() - } - return false -} diff --git a/vendor/github.com/rexray/gocsi/utils/utils_rpcs.go b/vendor/github.com/rexray/gocsi/utils/utils_rpcs.go deleted file mode 100644 index 8160153305..0000000000 --- a/vendor/github.com/rexray/gocsi/utils/utils_rpcs.go +++ /dev/null @@ -1,26 +0,0 @@ -package utils - -import ( - "fmt" - "regexp" - "strconv" -) - -const parseMethodPatt = `^/csi\.v(\d+)\.([^/]+?)/(.+)$` - -// ParseMethod parses a gRPC method and returns the CSI version, service -// to which the method belongs, and the method's name. An example value -// for the "fullMethod" argument is "/csi.v0.Identity/GetPluginInfo". -func ParseMethod( - fullMethod string) (version int32, service, methodName string, err error) { - rx := regexp.MustCompile(parseMethodPatt) - m := rx.FindStringSubmatch(fullMethod) - if len(m) == 0 { - return 0, "", "", fmt.Errorf("ParseMethod: invalid: %s", fullMethod) - } - v, err := strconv.ParseInt(m[1], 10, 32) - if err != nil { - return 0, "", "", fmt.Errorf("ParseMethod: %v", err) - } - return int32(v), m[2], m[3], nil -} diff --git a/vendor/modules.txt b/vendor/modules.txt index eb9ddf5721..1bab041831 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -9,12 +9,6 @@ github.com/Microsoft/go-winio/internal/fs github.com/Microsoft/go-winio/internal/socket github.com/Microsoft/go-winio/internal/stringbuffer github.com/Microsoft/go-winio/pkg/guid -# github.com/akutz/gosync v0.1.0 -## explicit -github.com/akutz/gosync -# github.com/akutz/memconn v0.1.0 -## explicit -github.com/akutz/memconn # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile @@ -221,18 +215,6 @@ github.com/prometheus/procfs/internal/util # github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a ## explicit github.com/rcrowley/go-metrics -# github.com/rexray/gocsi v1.2.2 => github.com/dperny/gocsi v1.2.3-pre -## explicit; go 1.12 -github.com/rexray/gocsi -github.com/rexray/gocsi/context -github.com/rexray/gocsi/middleware/logging -github.com/rexray/gocsi/middleware/requestid -github.com/rexray/gocsi/middleware/serialvolume -github.com/rexray/gocsi/middleware/serialvolume/types -github.com/rexray/gocsi/middleware/specvalidator -github.com/rexray/gocsi/mock/provider -github.com/rexray/gocsi/mock/service -github.com/rexray/gocsi/utils # github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 github.com/sirupsen/logrus @@ -490,4 +472,3 @@ k8s.io/klog/v2/internal/clock k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity -# github.com/rexray/gocsi => github.com/dperny/gocsi v1.2.3-pre