From e7f49b8d25ae3d0ff7c3807098ae681d868321c3 Mon Sep 17 00:00:00 2001 From: Marco Massenzio Date: Thu, 2 Feb 2023 00:33:29 -0800 Subject: [PATCH 1/9] [hotfix] Fixed container build Removed unnecessary certs; Removed unnecessary fake AWS Creds. --- .github/workflows/release.yaml | 8 +------- docker/Dockerfile | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 097435a..5767ff1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,14 +20,8 @@ jobs: steps: - uses: actions/checkout@v3 - # TODO: run this in a build container instead - - uses: arduino/setup-protoc@v1 - with: - version: '3.19' - - name: Install protoc-gen & build + - name: build run: | - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 make build - name: Create release tag diff --git a/docker/Dockerfile b/docker/Dockerfile index ce21ab0..a152f3f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,9 +9,6 @@ FROM ubuntu:22.04 RUN apt-get update && apt-get install ca-certificates -y RUN groupadd -r sm-bot && useradd -r -g sm-bot sm-bot -# Fake AWS configuration to connect to LocalStack docker. -ENV AWS_REGION=us-west-2 AWS_PROFILE=sm-bot - # Sensible defaults for the server, for reference # we list all the environment variables used by the # entrypoint script. @@ -25,8 +22,6 @@ WORKDIR /app RUN chown sm-bot:sm-bot /app USER sm-bot -ADD docker/aws-credentials /home/sm-bot/.aws/credentials -ADD certs/* /etc/statemachine/certs/ ADD build/bin/sm-server docker/entrypoint.sh ./ EXPOSE ${SERVER_PORT} From 39357fc1f5ca326cbe70ba54a6263969963c48e8 Mon Sep 17 00:00:00 2001 From: Marco Massenzio Date: Wed, 8 Feb 2023 23:23:07 -0800 Subject: [PATCH 2/9] Enabling release of container to Github Container Registry (GHCR) --- .github/workflows/release.yaml | 31 +- Makefile | 3 +- docker/Dockerfile | 13 +- go.mod | 134 +----- go.sum | 756 +-------------------------------- 5 files changed, 63 insertions(+), 874 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5767ff1..4492e8f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,33 +19,34 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: build run: | make build - name: Create release tag run: | + TAG=$(./get-tag) + echo TAG=${TAG} >> $GITHUB_ENV git config user.name "$AUTHOR" git config user.email "<$EMAIL>" - TAG=$(./get-tag) git tag -a $TAG -m "Release $TAG" git push --tags - echo TAG=${TAG} >> $GITHUB_ENV - - name: Build container - run: | - IMAGE=$(make container | grep "Successfully tagged" | awk '{print $3;}') - if [[ -z $(docker images -q $IMAGE) ]]; then - echo "Image $IMAGE not found" - exit 1 - fi - echo IMAGE=$IMAGE >> $GITHUB_ENV + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Push container - run: | - docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} - docker push $IMAGE + - name: Build and push Docker images + uses: docker/build-push-action@v4.0.0 + with: + context: . + file: docker/Dockerfile + platforms: ${{ matrix.platforms }} + push: true + tags: ghcr.io/${{ github.repository }}:${{ env.TAG }} - uses: ncipollo/release-action@v1.10.0 with: diff --git a/Makefile b/Makefile index cec4174..11274e1 100644 --- a/Makefile +++ b/Makefile @@ -108,7 +108,8 @@ gencert: $(ca-csr) $(config) $(server-csr) ## Generates all certificates in the -profile=server \ $(server-csr) | cfssljson -bare server @mkdir -p certs - @mv *.pem *.csr certs/ + @mv *.pem certs/ + @rm *.csr @echo "Certificates generated in $(shell pwd)/certs" .PHONY: clean-cert diff --git a/docker/Dockerfile b/docker/Dockerfile index a152f3f..0234529 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,15 @@ -# Dockerfile for a simple Go application -# +# Copyright AlertAvert.com (c) 2023 # Created by M. Massenzio, 2022-04-28 - -# NOTE: Use the Ubuntu image, others will encounter errors, +# +# NOTE: Use the Ubuntu image; other images will encounter errors, # including the "`GLIBC_2.32' not found" error. +# Alpine (which uses /bin/sh) emits an error which makes no sense (./sm-server not found) +# only because, in fact, it cannot find the library. FROM ubuntu:22.04 +LABEL org.opencontainers.image.authors="Marco Massenzio " +LABEL org.opencontainers.image.source=https://github.com/massenz/go-statemachine +LABEL org.opencontainers.image.description="Statemachine gRPC Server" +LABEL org.opencontainers.image.licenses=Apache-2.0 RUN apt-get update && apt-get install ca-certificates -y RUN groupadd -r sm-bot && useradd -r -g sm-bot sm-bot diff --git a/go.mod b/go.mod index 34f1b35..85f18f0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/massenz/go-statemachine -go 1.18 +go 1.19 require ( github.com/JiaYongfei/respect v0.0.0-20211019032000-61a979c8e39a @@ -13,154 +13,46 @@ require ( github.com/massenz/statemachine-proto/golang v1.1.0-beta-g1fc5dd8 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.18.1 - github.com/testcontainers/testcontainers-go v0.16.0 + github.com/testcontainers/testcontainers-go v0.17.0 google.golang.org/grpc v1.51.0 google.golang.org/protobuf v1.28.1 ) require ( - github.com/AlecAivazis/survey/v2 v2.3.6 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/buger/goterm v1.0.4 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.2.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/compose-spec/compose-go v1.6.0 // indirect - github.com/containerd/console v1.0.3 // indirect - github.com/containerd/containerd v1.6.8 // indirect - github.com/containerd/continuity v0.3.0 // indirect - github.com/containerd/ttrpc v1.1.0 // indirect - github.com/containerd/typeurl v1.0.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/containerd/containerd v1.6.12 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 // indirect - github.com/docker/buildx v0.9.1 // indirect - github.com/docker/cli v20.10.19+incompatible // indirect - github.com/docker/compose/v2 v2.12.2 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.19+incompatible // indirect - github.com/docker/docker-credential-helpers v0.6.4 // indirect - github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect + github.com/docker/docker v20.10.20+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/fvbommel/sortorder v1.0.2 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/gofrs/flock v0.8.0 // indirect - github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/googleapis/gnostic v0.5.5 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/klauspost/compress v1.15.9 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mattn/go-shellwords v1.0.12 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/miekg/pkcs11 v1.1.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/buildkit v0.10.4 // indirect - github.com/moby/locker v1.0.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/moby/patternmatcher v0.5.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/signal v0.7.0 // indirect - github.com/moby/sys/symlink v0.2.0 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/moby/term v0.0.0-20221128092401-c43b287e0e0f // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.3 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.7.3 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/spf13/cobra v1.6.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.0 // indirect - github.com/theupdateframework/notary v0.7.0 // indirect - github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 // indirect - github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect - github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect - go.opentelemetry.io/otel v1.11.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1 // indirect - go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect - go.opentelemetry.io/otel/metric v0.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.4.1 // indirect - go.opentelemetry.io/otel/trace v1.11.1 // indirect - go.opentelemetry.io/proto/otlp v0.12.0 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect - golang.org/x/text v0.4.0 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect - gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.24.1 // indirect - k8s.io/apimachinery v0.24.1 // indirect - k8s.io/client-go v0.24.1 // indirect - k8s.io/klog/v2 v2.60.1 // indirect - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect + gotest.tools/v3 v3.4.0 // indirect ) -replace ( - github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible // 22.06 master branch - github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch - github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a // same as buildx - github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2 // Can be removed on next bump of containerd to > 1.6.4 - - // For k8s dependencies, we use a replace directive, to prevent them being - // upgraded to the version specified in containerd, which is not relevant to the - // version needed. - // See https://github.com/docker/buildx/pull/948 for details. - // https://github.com/docker/buildx/blob/v0.8.1/go.mod#L62-L64 - k8s.io/api => k8s.io/api v0.22.4 - k8s.io/apimachinery => k8s.io/apimachinery v0.22.4 - k8s.io/client-go => k8s.io/client-go v0.22.4 -) +replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch diff --git a/go.sum b/go.sum index d86186f..87421f7 100644 --- a/go.sum +++ b/go.sum @@ -1,90 +1,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlecAivazis/survey/v2 v2.3.6 h1:NvTuVHISgTHEHeBFqt6BHOe4Ny/NwGZr7w+F8S9ziyw= -github.com/AlecAivazis/survey/v2 v2.3.6/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/JiaYongfei/respect v0.0.0-20211019032000-61a979c8e39a h1:e657JUpNdjAKVbnC1EIOh2A16TVulW1trokPsnFoZCI= github.com/JiaYongfei/respect v0.0.0-20211019032000-61a979c8e39a/go.mod h1:3hhXC4vv/BOhxZqS+9SqcuMIEhJZxUHcA9zSikZschQ= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= -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= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/Microsoft/hcsshim v0.9.5 h1:AbV+VPfTrIVffukazHcpxmz/sRiE6YaMDzHWR9BXZHo= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.44.4 h1:ePN0CVJMdiz2vYUcJH96eyxRrtKGSDMgyhP6rah2OgE= github.com/aws/aws-sdk-go v1.44.4/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/buger/goterm v1.0.4 h1:Z9YvGmOih81P0FbVtEYTFF6YsSgxSUKEhf/f9bTMXbY= -github.com/buger/goterm v1.0.4/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE= -github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/bugsnag-go v1.5.0 h1:tP8hiPv1pGGW3LA6LKy5lW6WG+y9J2xWUdPd3WC452k= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABFQA= -github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -95,157 +23,59 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= -github.com/cloudflare/cfssl v1.4.1 h1:vScfU2DrIUI9VPHBVeeAQ0q5A+9yshO1Gz+3QoUQiKw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/compose-spec/compose-go v1.6.0 h1:7Ol/UULMUtbPmB0EYrETASRoum821JpOh/XaEf+hN+Q= -github.com/compose-spec/compose-go v1.6.0/go.mod h1:os+Ulh2jlZxY1XT1hbciERadjSUU/BtZ6+gcN7vD7J0= -github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= -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/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= -github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= +github.com/containerd/containerd v1.6.12 h1:kJ9b3mOFKf8yqo05Ob+tMoxvt1pbVWhnB0re9Y+k+8c= +github.com/containerd/containerd v1.6.12/go.mod h1:K4Bw7gjgh4TnkmQY+py/PYQGp4e7xgnHAeg87VeWb3A= 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/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= -github.com/containerd/ttrpc v1.1.0/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/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI= -github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 h1:AqcwAyaSEkILnr/bLybFnM2i/+EW67JJIRs/4dWmzxo= -github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31/go.mod h1:XrR+08YQxO57vT8gtNmhLfHy/YIutMmmEeKMhU7zXqY= -github.com/docker/buildx v0.9.1 h1:VLyyJ1s4seWHmBY+oNc0J4+jHluRHLyv8KHOYYdSu3U= -github.com/docker/buildx v0.9.1/go.mod h1:zHiKsXO4H8cgUQFaNCqitRroVta3Kj9TVzhMhe5GLlk= -github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible h1:je9pK1shVhf561ujVYyn8ycOEfbgXFXryWxNqkYqsxg= -github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/compose/v2 v2.12.2 h1:kNlu4y/5QAluTh9aLGWyjYYlY9g//eeIq/L4yBuLpVE= -github.com/docker/compose/v2 v2.12.2/go.mod h1:3GJzDFsUxPLgyL74R+sWEm+N0YbXh0GMW6aeQ7vyRjU= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible h1:ieHXawdo9MXKnRkKuVWEfEN3PDQUqIjz/T8vMfIaHkM= github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= -github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= -github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= -github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= -github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -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/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -257,703 +87,212 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/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/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 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/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -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-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-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= -github.com/jinzhu/gorm v1.9.11 h1:gaHGvE+UnWGlbWG4Y3FUwY1EcZ5n6S9WtqBA/uySMLE= -github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a h1:eeaG9XMUvRBYXJi4pg1ZKM7nxc5AfXfojeLLW7O5J3k= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 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/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -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/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lib/pq v0.0.0-20150723085316-0dad96c0b94f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/massenz/slf4go v0.3.2-g4eb5504 h1:tRrxPOKcqNKQn25eS8Dy9bW3NMNPpuK4Sla9jKfWmSs= github.com/massenz/slf4go v0.3.2-g4eb5504/go.mod h1:ZJjthXAnZMJGwXUz3Z3v5uyban00uAFFoDYODOoLFpw= github.com/massenz/statemachine-proto/golang v1.1.0-beta-g1fc5dd8 h1:Dp2yv070ogiHLwQU5LppXskUDnCoO8tDkqgszyZMNmk= github.com/massenz/statemachine-proto/golang v1.1.0-beta-g1fc5dd8/go.mod h1:g6CkyXxfs7XF8wv6OLdMZZDUu0fn4PY6HQQ2WDbW3GU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= -github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -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/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a h1:NI01Z14Hbwo1MHq8ylu4HNkmKGnhk8UZsD6c6FVMcA8= -github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a/go.mod h1:Wa+LkeUQ9NJTVXTAY38rhkfKVQcuCIo2fbavRSuGsbI= -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/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -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.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= -github.com/moby/sys/signal v0.7.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.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -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/moby/term v0.0.0-20221128092401-c43b287e0e0f h1:J/7hjLaHLD7epG0m6TBMGmp4NQ+ibBYLfeyJWdAIFLA= +github.com/moby/term v0.0.0-20221128092401-c43b287e0e0f/go.mod h1:15ce4BGCFxt7I5NQKT+HV0yEDxmf6fSysfEDiVo3zFM= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/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.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= 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.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 h1:9iFHD5Kt9hkOfeawBNiEeEaV7bmC4/Z5wJp8E9BptMs= -github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1/go.mod h1:K/JAU0m27RFhDRX4PcFdIKntROP6y5Ed6O91aZYDQfs= -github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw= -github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -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/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 h1:ka9QPuQg2u4LGipiZGsgkg3rJCo4iIUCy75FddM0GRQ= -github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94 h1:JmfC365KywYwHB946TTiQWEb8kqPY+pybPLoGE9GgVk= -github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431 h1:XTHrT015sxHyJ5FnQ0AeemSspZWaDq7DoTRW0EVsDCE= -github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.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= -github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c h1:2EejZtjFjKJGk71ANb+wtFK5EjUzUkEM3R0xnp559xg= -github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/testcontainers/testcontainers-go v0.16.0 h1:4joFeohTtUVnN98QEveaCFkbTNEGGp3gJum8wbGho5w= -github.com/testcontainers/testcontainers-go v0.16.0/go.mod h1:8mDvE1H0XxjM1HqV6U1GY2CE4Z6fRfKC4SaJSc4Du3Q= -github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c= -github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw= -github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 h1:NJ1nZs4j4XcBJKIY5sAwTGp9w5b78Zxr3+r0zXRuKnA= -github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5/go.mod h1:F83XRhNblQsKQH9hcKEE45GAOkL9590mtw9KsD0Q4fE= -github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= -github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= -github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f h1:DLpt6B5oaaS8jyXHa9VA4rrZloBVPVXeCtrOsrFauxc= -github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= +github.com/testcontainers/testcontainers-go v0.17.0 h1:UdKSw2DJXinlS6ijbFb4VHpQzD+EfTwcTq1/19a+8PU= +github.com/testcontainers/testcontainers-go v0.17.0/go.mod h1:n5trpHrB68IUelEqGNC8VipaCo6jOGusU44kIK11XRs= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/weppos/publicsuffix-go v0.15.1-0.20220329081811-9a40b608a236 h1:vMJBP3PQViZsF6cOINtvyMC8ptpLsyJ4EwyFnzuWNxc= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/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/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zmap/zcrypto v0.0.0-20220605182715-4dfcec6e9a8c h1:ufDm/IlBYZYLuiqvQuhpTKwrcAS2OlXEzWbDvTVGbSQ= -github.com/zmap/zlint v1.1.0 h1:Vyh2GmprXw5TLmKmkTa2BgFvvYAFBValBFesqkKsszM= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0 h1:Wjp9vsVSIEyvdiaECfqxY9xBqQ7JaSCGtvHgR4doXZk= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0/go.mod h1:vHItvsnJtp7ES++nFLLFBzUWny7fJQSvTlxFcqQGUr4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= -go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= -go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= -go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 h1:imIM3vRDMyZK1ypQlQlO+brE22I9lRhJsBDXpDWjlz8= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1 h1:AxqDiGk8CorEXStMDZF5Hz9vo9Z7ZZ+I5m8JRl/ko40= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1/go.mod h1:c6E4V3/U+miqjs/8l950wggHGL1qzlp0Ypj9xoGrPqo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1 h1:8qOago/OqoFclMUUj/184tZyRdDZFpcejSjbk5Jrl6Y= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1/go.mod h1:VwYo0Hak6Efuy0TXsZs8o1hnV3dHDPNtDbycG0hI8+M= -go.opentelemetry.io/otel/internal/metric v0.27.0 h1:9dAVGAfFiiEq5NVB9FUJ5et+btbDQAUIJehJ+ikyryk= -go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw= -go.opentelemetry.io/otel/metric v0.27.0 h1:HhJPsGhJoKRSegPQILFbODU56NS/L1UE4fS1sC5kIwQ= -go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g= -go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y= -go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= -go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= -go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= -go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= -go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220906165146-f3363e06e74c h1:yKufUcDwucU5urd+50/Opbt4AYpqthk7wHpHok8f1lo= golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= @@ -965,7 +304,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -973,70 +311,22 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= -gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM= -gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw= -k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/apimachinery v0.22.4 h1:9uwcvPpukBw/Ri0EUmWz+49cnFtaoiyEhQTK+xOe7Ck= -k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/client-go v0.22.4 h1:aAQ1Wk+I3bjCNk35YWUqbaueqrIonkfDPJSPDDe8Kfg= -k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From a721b653e57baf851a06bb618fe61a2f4c3c03da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:24:25 -0800 Subject: [PATCH 3/9] Bump github.com/containerd/containerd from 1.6.12 to 1.6.18 (#79) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.12 to 1.6.18. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.6.12...v1.6.18) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 85f18f0..7b699b5 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/Microsoft/go-winio v0.5.2 // indirect github.com/cenkalti/backoff/v4 v4.2.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/containerd v1.6.12 // indirect + github.com/containerd/containerd v1.6.18 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/docker v20.10.20+incompatible // indirect diff --git a/go.sum b/go.sum index 87421f7..d6cf1be 100644 --- a/go.sum +++ b/go.sum @@ -7,7 +7,7 @@ github.com/JiaYongfei/respect v0.0.0-20211019032000-61a979c8e39a h1:e657JUpNdjAK github.com/JiaYongfei/respect v0.0.0-20211019032000-61a979c8e39a/go.mod h1:3hhXC4vv/BOhxZqS+9SqcuMIEhJZxUHcA9zSikZschQ= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/hcsshim v0.9.5 h1:AbV+VPfTrIVffukazHcpxmz/sRiE6YaMDzHWR9BXZHo= +github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.44.4 h1:ePN0CVJMdiz2vYUcJH96eyxRrtKGSDMgyhP6rah2OgE= github.com/aws/aws-sdk-go v1.44.4/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -30,8 +30,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.6.12 h1:kJ9b3mOFKf8yqo05Ob+tMoxvt1pbVWhnB0re9Y+k+8c= -github.com/containerd/containerd v1.6.12/go.mod h1:K4Bw7gjgh4TnkmQY+py/PYQGp4e7xgnHAeg87VeWb3A= +github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns= +github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= From ee1dd7bd75e2d1eb261b9290f79ad78a55694f7e Mon Sep 17 00:00:00 2001 From: Marco Massenzio <1153951+massenz@users.noreply.github.com> Date: Sun, 19 Feb 2023 21:43:34 -0800 Subject: [PATCH 4/9] Streamlined build & container creation (#80) --- Makefile | 65 ++++++++++++++++++++++++++++----------------- README.md | 37 +++++++++++++++----------- build.settings | 3 --- docker/Dockerfile | 7 +++-- docker/compose.yaml | 19 +++++++++++++ get-tag | 18 ------------- 6 files changed, 86 insertions(+), 63 deletions(-) delete mode 100644 build.settings delete mode 100755 get-tag diff --git a/Makefile b/Makefile index 11274e1..aaac92c 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,18 @@ # Copyright (c) 2022 AlertAvert.com. All rights reserved. # Created by M. Massenzio, 2022-03-14 -bin := build/bin -out := $(bin)/sm-server -tag := $(shell ./get-tag) -image := massenz/statemachine -module := $(shell go list -m) +GOOS ?= $(shell uname -s | tr "[:upper:]" "[:lower:]") +GOARCH ?= amd64 +GOMOD := $(shell go list -m) + +version := v0.10.0 +release := $(version)-g$(shell git rev-parse --short HEAD) +prog := sm-server +bin := out/bin/$(prog)-$(version)_$(GOOS)-$(GOARCH) +dockerbin := out/bin/$(prog)-$(version)_linux-amd64 + +image := massenz/statemachine compose := docker/compose.yaml dockerfile := docker/Dockerfile @@ -40,21 +46,31 @@ help: ## Display this help. .PHONY: clean img=$(shell docker images -q --filter=reference=$(image)) clean: ## Cleans up the binary, container image and other data - @rm -f $(out) + @rm -f $(bin) @[ ! -z $(img) ] && docker rmi $(img) || true @rm -rf certs -.PHONY: build test container cov clean fmt +version: ## Displays the current version tag (release) + @echo $(release) fmt: ## Formats the Go source code using 'go fmt' @go fmt $(pkgs) ./cmd ./clients ##@ Development -$(out): cmd/main.go $(srcs) - go build -ldflags "-X $(module)/server.Release=$(tag)" -o $(out) cmd/main.go - @chmod +x $(out) +.PHONY: build test container cov clean fmt +$(bin): cmd/main.go $(srcs) + @mkdir -p $(shell dirname $(bin)) + GOOS=$(GOOS); GOARCH=$(GOARCH); go build \ + -ldflags "-X $(GOMOD)/server.Release=$(release)" \ + -o $(bin) cmd/main.go + +$(dockerbin): + GOOS=linux; GOARCH=amd64; go build \ + -ldflags "-X $(GOMOD)/server.Release=$(release)" \ + -o $(dockerbin) cmd/main.go -build: $(out) ## Builds the server +.PHONY: build +build: $(bin) ## Builds the server test: $(srcs) $(test_srcs) ## Runs all tests ginkgo $(pkgs) @@ -66,25 +82,26 @@ cov: $(srcs) $(test_srcs) ## Runs the Test Coverage target and opens a browser ##@ Container Management # Convenience targets to run locally containers and # setup the test environments. -# -.PHONY: container -container: $(out) ## Builds the container image - docker build -f $(dockerfile) -t $(image):$(tag) . -.PHONY: services -services: ## Starts the Redis and LocalStack containers - @docker compose -f $(compose) --project-name sm up -d +container: $(dockerbin) ## Builds the container image + docker build --build-arg appname=$(dockerbin) -f $(dockerfile) -t $(image):$(release) . -.PHONY: stop -stop: ## Stops the Redis and LocalStack containers - @docker compose -f $(compose) --project-name sm down - -.PHONY: queues -queues: ## Creates the SQS Queues in LocalStack +.PHONY: start +start: ## Starts the Redis and LocalStack containers, and Creates the SQS Queues in LocalStack + @RELEASE=$(release) BASEDIR=$(shell pwd) docker compose -f $(compose) --project-name sm up redis localstack -d + @echo "Waiting for LocalStack AWS to come up..." + @sleep 3 @for queue in events notifications acks; do \ aws --no-cli-pager --endpoint-url=http://localhost:4566 \ --region us-west-2 \ sqs create-queue --queue-name $$queue; done >/dev/null + # We need to wait for the SQS Queues to be up before starting the server. + @RELEASE=$(release) BASEDIR=$(shell pwd) docker compose -f $(compose) --project-name sm up server -d + +.PHONY: stop +stop: ## Stops the Redis and LocalStack containers + @docker compose -f $(compose) --project-name sm down + ##@ TLS Support # diff --git a/README.md b/README.md index f08c893..aedd3b6 100644 --- a/README.md +++ b/README.md @@ -297,42 +297,47 @@ Logs are sent to `stdout` by default, but this can be changed using the [`slf4go Running the server inside a container is much preferable; to build the container use: - make container + GOOS=linux make build && make container and then: - docker run --rm -d -p 7399:7399 --name sm-server \ - --env AWS_ENDPOINT=http://awslocal:4566 \ - --env DEBUG=-debug --network docker_sm-net \ - massenz/statemachine:$(./get-tag) +``` +docker run --rm -p 7398:7398 --name sm_server --network sm_sm-net \ + -v $(pwd)/docker/aws-credentials:/home/sm-bot/.aws/credentials \ + -v $(pwd)/certs:/etc/statemachine/certs \ + --env AWS_ENDPOINT=http://awslocal:4566 --env AWS_REGION=us-west-2 --env AWS_PROFILE=sm-bot \ + --env TIMEOUT=200ms --env DEBUG=-debug \ + massenz/statemachine:$(make version) +``` These are the environment variables whose values can be modified as necessary (see also the `Dockerfile`): ``` -ENV AWS_REGION=us-west-2 -ENV AWS_PROFILE=sm-bot - -# Sensible defaults for the server -# See entrypoint.sh ENV SERVER_PORT=7399 ENV EVENTS_Q=events ENV ERRORS_Q=notifications ENV REDIS=redis ENV REDIS_PORT=6379 ENV DEBUG="" - -# Optional settings for the server -ENV ACKS="-acks acks" -ENV CLUSTER="-cluster" -ENV NOTIFY_ERRORS_ONLY="-notify-errors-only" ``` Additionally, a valid `credentials` file will need to be mounted (using the `-v` flag) in the container if connecting to AWS (instead of LocalStack): - -v /full/path/to/.aws/credentials:/home/sm-bot/.aws/credentials + -v /full/path/to/.aws/credentials:/home/sm-bot/.aws/credentials where the `[profile]` matches the value in `AWS_PROFILE`. +To run with TLS enabled, generate certs with `make gencert` and then mount the volume on the Docker image: + + -v $(pwd)/certs:/etc/statemachine/certs + +Alternatively, use the `-insecure` flag to disable TLS. + +If you see this error: +``` +2023/02/20 03:15:44 main.go:201: [FATAL] open /etc/statemachine/certs/server.pem: no such file or directory +``` +run `make gencert`. # Contributing diff --git a/build.settings b/build.settings deleted file mode 100644 index f2e45f4..0000000 --- a/build.settings +++ /dev/null @@ -1,3 +0,0 @@ -# Build configuration - -version = 0.9.0 diff --git a/docker/Dockerfile b/docker/Dockerfile index 0234529..9fb4f1d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,7 +11,9 @@ LABEL org.opencontainers.image.source=https://github.com/massenz/go-statemachine LABEL org.opencontainers.image.description="Statemachine gRPC Server" LABEL org.opencontainers.image.licenses=Apache-2.0 -RUN apt-get update && apt-get install ca-certificates -y +ARG appname + +#RUN apt-get update && apt-get install ca-certificates -y RUN groupadd -r sm-bot && useradd -r -g sm-bot sm-bot # Sensible defaults for the server, for reference @@ -27,7 +29,8 @@ WORKDIR /app RUN chown sm-bot:sm-bot /app USER sm-bot -ADD build/bin/sm-server docker/entrypoint.sh ./ +ADD $appname ./sm-server +ADD docker/entrypoint.sh ./ EXPOSE ${SERVER_PORT} ENTRYPOINT ["./entrypoint.sh"] diff --git a/docker/compose.yaml b/docker/compose.yaml index 6c83570..a093928 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -31,6 +31,25 @@ services: - "/var/run/docker.sock:/var/run/docker.sock" networks: - sm-net + server: + depends_on: + - localstack + - redis + networks: + - sm-net + ports: + - '7398:7398' + - '7399:7399' + image: "massenz/statemachine:${RELEASE}" + environment: + AWS_ENDPOINT: "http://awslocal:4566" + AWS_REGION: us-west-2 + AWS_PROFILE: sm-bot + TIMEOUT: 200ms + DEBUG: -debug + volumes: + - ${BASEDIR}/docker/aws-credentials:/home/sm-bot/.aws/credentials + - ${BASEDIR}/certs:/etc/statemachine/certs # To connect to the servers in this stack, from a docker run # via Docker, use `--network statemachine_backend`. diff --git a/get-tag b/get-tag deleted file mode 100755 index 3268146..0000000 --- a/get-tag +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2022 AlertAvert.com. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Author: Marco Massenzio (marco@alertavert.com) -# -set -eu -workdir=$(dirname $0) - - -version=$(grep -E '^[[:blank:]]*version' ${workdir}/build.settings |\ - sed -E 's/^[[:blank:]]*version[[:blank:]]*=?[[:blank:]]*//' |\ - sed "s/'//g" | sed 's/[[:blank:]]*$//') - -echo "v${version}-g$(git rev-parse --short HEAD)" From dc14bfba4fdfe6202e919e978c38dc0ce63732a9 Mon Sep 17 00:00:00 2001 From: Marco Massenzio <1153951+massenz@users.noreply.github.com> Date: Sun, 19 Feb 2023 22:10:53 -0800 Subject: [PATCH 5/9] [#75] Use Redis store for PubSub tests (#81) * [#75] Use Redis store for PubSub tests * Continued cleaning up in preparation for removal of InMemoryStore --- cmd/main.go | 13 ++++++------ docker/Dockerfile | 4 ++-- docker/entrypoint.sh | 4 ++-- grpc/grpc_server_stream_test.go | 4 ++-- grpc/grpc_server_test.go | 4 ++-- grpc/grpc_suite_test.go | 11 ++++++---- grpc/grpc_tls_test.go | 5 +---- pubsub/listener_test.go | 2 +- pubsub/pubsub_suite_test.go | 36 +++++++++------------------------ 9 files changed, 33 insertions(+), 50 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 9b82160..50f5c5a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -10,6 +10,7 @@ package main import ( + "errors" "flag" "fmt" "github.com/massenz/go-statemachine/grpc" @@ -76,10 +77,9 @@ func main() { var notifyErrorsOnly = flag.Bool("notify-errors-only", false, "If set, only errors will be sent to notification topic (cannot be used with -acks)") var port = flag.Int("http-port", 7399, "HTTP Server port for the REST API") - var redisUrl = flag.String("redis", "", "For single node redis instances: URI "+ - "for the Redis instance (host:port). For redis clusters: a comma-separated list of redis nodes. "+ - "If using an ElastiCache Redis cluster with cluster mode enabled, "+ - "this can also be the configuration endpoint.") + var redisUrl = flag.String("redis", "", "For single node Redis instances: host:port "+ + "for the Redis instance. For redis clusters: a comma-separated list of redis nodes. "+ + "If using an ElastiCache Redis cluster with cluster mode enabled, this can also be the configuration endpoint.") var timeout = flag.Duration("timeout", storage.DefaultTimeout, "Timeout for Redis (as a Duration string, e.g. 1s, 20ms, etc.)") var trace = flag.Bool("trace", false, @@ -98,8 +98,7 @@ func main() { addr := fmt.Sprintf("%s:%d", host, *port) if *redisUrl == "" { - logger.Warn("in-memory storage configured, all data will NOT survive a server restart") - store = storage.NewInMemoryStore() + logger.Fatal(errors.New("in-memory store deprecated, a Redis server must be configured")) } else { logger.Info("connecting to Redis server at %s", *redisUrl) logger.Info("with timeout: %s, max-retries: %d", *timeout, *maxRetries) @@ -153,7 +152,7 @@ func main() { logger.Info("gRPC server running at tcp://:%d", *grpcPort) go startGrpcServer(*grpcPort, *noTls, eventsCh) - // TODO: configure & start server using TLS, if configured to do so. + // TODO: REST Server is deprecated and will be removed soon. scheme := "http" logger.Info("HTTP server (REST API) running at %s://%s", scheme, addr) srv := server.NewHTTPServer(addr, serverLogLevel) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9fb4f1d..5f41287 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,8 +22,8 @@ RUN groupadd -r sm-bot && useradd -r -g sm-bot sm-bot # ENV GRPC_PORT=7398 SERVER_PORT=7399 DEBUG="" \ EVENTS_Q="events" NOTIFICATIONS_Q="notifications" \ - ACKS_Q="" ERRORS_ONLY=1 \ - CLUSTER="" REDIS=redis REDIS_PORT=6379 + ACKS_Q="" ERRORS_ONLY=t \ + CLUSTER="" REDIS="redis:6379" WORKDIR /app RUN chown sm-bot:sm-bot /app diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 07895a2..d1dc162 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -48,8 +48,8 @@ then fi cmd="./sm-server -http-port ${SERVER_PORT} -grpc-port ${GRPC_PORT} \ --events ${EVENTS_Q} -redis ${REDIS}:${REDIS_PORT} \ -${CLUSTER:-} ${DEBUG:-} ${endpoint} \ +-events ${EVENTS_Q} -redis ${REDIS:-} \ +${DEBUG:-} ${endpoint} \ ${errors_only} ${timeout} ${retries} \ ${acks} ${notifications} \ $@" diff --git a/grpc/grpc_server_stream_test.go b/grpc/grpc_server_stream_test.go index 781853f..0eec2a8 100644 --- a/grpc/grpc_server_stream_test.go +++ b/grpc/grpc_server_stream_test.go @@ -39,7 +39,7 @@ var _ = Describe("gRPC Server Streams", func() { ) // Server setup BeforeEach(func() { - store = storage.NewRedisStoreWithDefaults(container.Address) + store = storage.NewRedisStoreWithDefaults(redisContainer.Address) store.SetLogLevel(logging.NONE) listener, _ = net.Listen("tcp", ":0") cc, _ := g.Dial(listener.Addr().String(), @@ -63,7 +63,7 @@ var _ = Describe("gRPC Server Streams", func() { AfterEach(func() { done() rdb := redis.NewClient(&redis.Options{ - Addr: container.Address, + Addr: redisContainer.Address, DB: storage.DefaultRedisDb, }) rdb.FlushDB(context.Background()) diff --git a/grpc/grpc_server_test.go b/grpc/grpc_server_test.go index e7633db..993bb40 100644 --- a/grpc/grpc_server_test.go +++ b/grpc/grpc_server_test.go @@ -171,7 +171,7 @@ var _ = Describe("the gRPC Server", func() { // Server setup BeforeEach(func() { - store = storage.NewRedisStoreWithDefaults(container.Address) + store = storage.NewRedisStoreWithDefaults(redisContainer.Address) store.SetLogLevel(slf4go.NONE) listener, _ = net.Listen("tcp", ":0") cc, _ := g.Dial(listener.Addr().String(), @@ -197,7 +197,7 @@ var _ = Describe("the gRPC Server", func() { AfterEach(func() { done() rdb := redis.NewClient(&redis.Options{ - Addr: container.Address, + Addr: redisContainer.Address, DB: storage.DefaultRedisDb, }) rdb.FlushDB(context.Background()) diff --git a/grpc/grpc_suite_test.go b/grpc/grpc_suite_test.go index 776524a..26e4324 100644 --- a/grpc/grpc_suite_test.go +++ b/grpc/grpc_suite_test.go @@ -14,6 +14,7 @@ import ( "crypto/tls" "github.com/massenz/go-statemachine/grpc" internals "github.com/massenz/go-statemachine/internal/testing" + slf4go "github.com/massenz/slf4go/logging" protos "github.com/massenz/statemachine-proto/golang/api" g "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -32,17 +33,19 @@ func TestGrpc(t *testing.T) { RunSpecs(t, "gRPC Server") } -var container *internals.Container +var redisContainer *internals.Container var _ = BeforeSuite(func() { var err error - container, err = internals.NewRedisContainer(context.Background()) + redisContainer, err = internals.NewRedisContainer(context.Background()) Expect(err).ToNot(HaveOccurred()) + // Muting the RootLog to prevent annoying warning re TLS + slf4go.RootLog.Level = slf4go.NONE // Note the timeout here is in seconds (and it's not a time.Duration either) }, 5.0) var _ = AfterSuite(func() { - if container != nil { - Expect(container.Terminate(context.Background())).To(Succeed()) + if redisContainer != nil { + Expect(redisContainer.Terminate(context.Background())).To(Succeed()) } }, 2.0) diff --git a/grpc/grpc_tls_test.go b/grpc/grpc_tls_test.go index fa23116..d3b5a5c 100644 --- a/grpc/grpc_tls_test.go +++ b/grpc/grpc_tls_test.go @@ -18,7 +18,6 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" "math/rand" "net" - "os" "time" . "github.com/onsi/ginkgo" @@ -46,13 +45,11 @@ var _ = Describe("gRPC Server with TLS", func() { // TODO: use GinkgoWriter for logs l := slf4go.NewLog("grpc-TLS-test") l.Level = slf4go.NONE - d, _ := os.Getwd() - fmt.Println(">>>>", d) server, err := grpc.NewGrpcServer(&grpc.Config{ EventsChannel: testCh, Logger: l, ServerAddress: addr, - Store: storage.NewInMemoryStore(), + Store: storage.NewRedisStoreWithDefaults(redisContainer.Address), TlsEnabled: true, TlsCerts: "../certs", // TODO: add mTLS tests diff --git a/pubsub/listener_test.go b/pubsub/listener_test.go index e7162e9..c39a18f 100644 --- a/pubsub/listener_test.go +++ b/pubsub/listener_test.go @@ -32,7 +32,7 @@ var _ = Describe("A Listener", func() { BeforeEach(func() { eventsCh = make(chan protos.EventRequest) notificationsCh = make(chan protos.EventResponse) - store = storage.NewInMemoryStore() + store = storage.NewRedisStoreWithDefaults(redisContainer.Address) store.SetLogLevel(logging.NONE) testListener = pubsub.NewEventsListener(&pubsub.ListenerOptions{ EventsChannel: eventsCh, diff --git a/pubsub/pubsub_suite_test.go b/pubsub/pubsub_suite_test.go index 935ac0b..7f9fa7a 100644 --- a/pubsub/pubsub_suite_test.go +++ b/pubsub/pubsub_suite_test.go @@ -42,12 +42,11 @@ func TestPubSub(t *testing.T) { RunSpecs(t, "Pub/Sub Suite") } - - // Although these are constants, we cannot take the pointers unless we declare them vars. var ( - awsLocal *internals.Container - testSqsClient *sqs.SQS + awsLocal *internals.Container + redisContainer *internals.Container + testSqsClient *sqs.SQS ) var _ = BeforeSuite(func() { @@ -55,7 +54,7 @@ var _ = BeforeSuite(func() { var err error awsLocal, err = internals.NewLocalstackContainer(context.Background()) - Expect(err).ToNot(HaveOccurred()) + Ω(err).ToNot(HaveOccurred()) // Can't take the address of a constant. region := internals.Region @@ -69,34 +68,19 @@ var _ = BeforeSuite(func() { for _, topic := range []string{eventsQueue, notificationsQueue, acksQueue} { topic = fmt.Sprintf("%s-%d", topic, GinkgoParallelProcess()) - - _, err := testSqsClient.GetQueueUrl(&sqs.GetQueueUrlInput{ - QueueName: &topic, - }) - if err != nil { + if _, err := testSqsClient.GetQueueUrl(&sqs.GetQueueUrlInput{QueueName: &topic}); err != nil { // the queue does not exist and ought to be created - _, err = testSqsClient.CreateQueue(&sqs.CreateQueueInput{ - QueueName: &topic, - }) + _, err = testSqsClient.CreateQueue(&sqs.CreateQueueInput{QueueName: &topic}) Expect(err).NotTo(HaveOccurred()) } } + redisContainer, err = internals.NewRedisContainer(context.Background()) + Ω(err).ToNot(HaveOccurred()) }, 2.0) var _ = AfterSuite(func() { - for _, topic := range []string{eventsQueue, notificationsQueue, acksQueue} { - topic = getQueueName(topic) - - out, err := testSqsClient.GetQueueUrl(&sqs.GetQueueUrlInput{ - QueueName: &topic, - }) - Expect(err).NotTo(HaveOccurred()) - if out != nil { - _, err = testSqsClient.DeleteQueue(&sqs.DeleteQueueInput{QueueUrl: out.QueueUrl}) - Expect(err).NotTo(HaveOccurred()) - } - } - Expect(awsLocal.Terminate(context.Background())).ToNot(HaveOccurred()) + Ω(awsLocal.Terminate(context.Background())).ToNot(HaveOccurred()) + Ω(redisContainer.Terminate(context.Background())).ToNot(HaveOccurred()) }, 2.0) // getQueueName provides a way to obtain a process-independent name for the SQS queue, From d838a4e7b9c2949f972b11f002e05bf107a21097 Mon Sep 17 00:00:00 2001 From: Marco Massenzio <1153951+massenz@users.noreply.github.com> Date: Mon, 20 Feb 2023 20:05:42 -0800 Subject: [PATCH 6/9] [#70] Removed acks for successful Event outcomes (#82) --- Makefile | 5 +- cmd/main.go | 16 +---- docker/entrypoint.sh | 23 ++----- pubsub/listener.go | 13 ++-- pubsub/listener_test.go | 119 +++++++++++++++++++++++------------- pubsub/pubsub_suite_test.go | 3 +- pubsub/sqs_pub.go | 26 ++------ pubsub/sqs_pub_test.go | 76 ++++------------------- 8 files changed, 114 insertions(+), 167 deletions(-) diff --git a/Makefile b/Makefile index aaac92c..26b61d6 100644 --- a/Makefile +++ b/Makefile @@ -89,9 +89,8 @@ container: $(dockerbin) ## Builds the container image .PHONY: start start: ## Starts the Redis and LocalStack containers, and Creates the SQS Queues in LocalStack @RELEASE=$(release) BASEDIR=$(shell pwd) docker compose -f $(compose) --project-name sm up redis localstack -d - @echo "Waiting for LocalStack AWS to come up..." - @sleep 3 - @for queue in events notifications acks; do \ + @sleep 1 + @for queue in events notifications; do \ aws --no-cli-pager --endpoint-url=http://localhost:4566 \ --region us-west-2 \ sqs create-queue --queue-name $$queue; done >/dev/null diff --git a/cmd/main.go b/cmd/main.go index 50f5c5a..7118226 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -54,9 +54,6 @@ var ( func main() { defer close(eventsCh) - var acksTopic = flag.String("acks", "", - "(Requires `-notifications`) The name of the topic in SQS to publish Ok outcomes to; "+ - "unless the -notify-errors-only flag is set") var awsEndpoint = flag.String("endpoint-url", "", "HTTP URL for AWS SQS to connect to; usually best left undefined, "+ "unless required for local testing purposes (LocalStack uses http://localhost:4566)") @@ -74,8 +71,6 @@ func main() { var notificationsTopic = flag.String("notifications", "", "(optional) The name of the topic to publish events' outcomes to; if not "+ "specified, no outcomes will be published") - var notifyErrorsOnly = flag.Bool("notify-errors-only", false, - "If set, only errors will be sent to notification topic (cannot be used with -acks)") var port = flag.Int("http-port", 7399, "HTTP Server port for the REST API") var redisUrl = flag.String("redis", "", "For single node Redis instances: host:port "+ "for the Redis instance. For redis clusters: a comma-separated list of redis nodes. "+ @@ -109,9 +104,6 @@ func main() { if *eventsTopic == "" { logger.Warn("no PubSub event topic configured, events can only be sent via gRPC calls") } - if *acksTopic != "" && *notifyErrorsOnly { - logger.Fatal(fmt.Errorf("cannot set an acks topic while disabling errors notifications")) - } logger.Info("connecting to SQS Topic: %s", *eventsTopic) sub = pubsub.NewSqsSubscriber(eventsCh, awsEndpoint) if sub == nil { @@ -120,19 +112,13 @@ func main() { if *notificationsTopic != "" { logger.Info("notifications topic: %s", *notificationsTopic) - if *notifyErrorsOnly { - logger.Info("only errors will be published to the notifications topic") - } - if *acksTopic != "" { - logger.Info("acks topic: %s", *acksTopic) - } notificationsCh = make(chan protos.EventResponse) defer close(notificationsCh) pub = pubsub.NewSqsPublisher(notificationsCh, awsEndpoint) if pub == nil { panic("Cannot create a valid SQS Publisher") } - go pub.Publish(*notificationsTopic, *acksTopic, *notifyErrorsOnly) + go pub.Publish(*notificationsTopic) } listener = pubsub.NewEventsListener(&pubsub.ListenerOptions{ EventsChannel: eventsCh, diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d1dc162..3419f8c 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,18 +1,16 @@ #!/usr/bin/env bash # -# Copyright (c) 2022 AlertAvert.com. All rights reserved. +# Copyright (c) 2022-2023 AlertAvert.com. All rights reserved. # # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Author: Marco Massenzio (marco@alertavert.com) -# set -eu declare endpoint="" -declare acks="" -declare errors_only="" +declare events="" declare notifications="" declare retries="" declare timeout="" @@ -22,14 +20,9 @@ then endpoint="-endpoint-url ${AWS_ENDPOINT}" fi -if [[ -n ${ERRORS_ONLY:-} ]] -then - errors_only="-notify-errors-only" -fi - -if [[ -n ${ACKS_Q:-} ]] +if [[ -n ${EVENTS_Q:-} ]] then - acks="-acks ${ACKS_Q}" + events="-events ${EVENTS_Q}" fi if [[ -n ${NOTIFICATIONS_Q:-} ]] @@ -47,12 +40,8 @@ then retries="-max-retries ${RETRIES}" fi -cmd="./sm-server -http-port ${SERVER_PORT} -grpc-port ${GRPC_PORT} \ --events ${EVENTS_Q} -redis ${REDIS:-} \ -${DEBUG:-} ${endpoint} \ -${errors_only} ${timeout} ${retries} \ -${acks} ${notifications} \ -$@" +cmd="./sm-server -grpc-port ${GRPC_PORT} -redis ${REDIS:-} ${DEBUG:-} +${endpoint} ${timeout} ${retries} ${events} ${notifications} $@" echo $cmd exec $cmd diff --git a/pubsub/listener.go b/pubsub/listener.go index 94bf1d3..a233a28 100644 --- a/pubsub/listener.go +++ b/pubsub/listener.go @@ -62,6 +62,13 @@ func (listener *EventsListener) ListenForMessages() { fmt.Sprintf("no Configuration name specified"))) continue } + // The event is well-formed, we can store for later retrieval + if err := listener.store.PutEvent(request.Event, config, storage.NeverExpire); err != nil { + listener.PostNotificationAndReportOutcome(makeResponse(&request, + protos.EventOutcome_InternalError, + fmt.Sprintf("could not store event: %v", err))) + continue + } fsm, ok := listener.store.GetStateMachine(fsmId, config) if !ok { listener.PostNotificationAndReportOutcome(makeResponse(&request, @@ -105,13 +112,9 @@ func (listener *EventsListener) ListenForMessages() { config, fsmId, err))) continue } - // All good, we want to report success too. listener.logger.Debug("Event `%s` transitioned FSM [%s] to state `%s` from state `%s` - updating store", request.Event.Transition.Event, fsmId, fsm.State, previousState) - listener.PostNotificationAndReportOutcome(makeResponse(&request, - protos.EventOutcome_Ok, - fmt.Sprintf("event [%s] transitioned FSM [%s] to state [%s]", - request.Event.Transition.Event, fsmId, fsm.State))) + listener.reportOutcome(makeResponse(&request, protos.EventOutcome_Ok, "")) } } diff --git a/pubsub/listener_test.go b/pubsub/listener_test.go index c39a18f..cb655a8 100644 --- a/pubsub/listener_test.go +++ b/pubsub/listener_test.go @@ -74,7 +74,7 @@ var _ = Describe("A Listener", func() { Fail("timed out waiting for notification") } }) - It("can receive events", func() { + It("can process well-formed events", func() { event := protos.Event{ EventId: "feed-beef", Originator: "me", @@ -107,25 +107,19 @@ var _ = Describe("A Listener", func() { eventsCh <- request close(eventsCh) - select { - case notification := <-notificationsCh: - // First we want to test that the outcome was successful - Ω(notification.EventId).To(Equal(event.GetEventId())) - Ω(notification.Outcome).ToNot(BeNil()) - Ω(notification.Outcome.Id).To(Equal(request.GetId())) - Ω(notification.Outcome.Details).To(ContainSubstring("transitioned")) - Ω(notification.Outcome.Code).To(Equal(protos.EventOutcome_Ok)) - + Eventually(func(g Gomega) { // Now we want to test that the state machine was updated fsm, ok := store.GetStateMachine("12345-faa44", "test") - Ω(ok).ToNot(BeFalse()) - Ω(fsm.State).To(Equal("end")) - Ω(len(fsm.History)).To(Equal(1)) - Ω(fsm.History[0].Details).To(Equal("more details")) - Ω(fsm.History[0].Transition.Event).To(Equal("move")) - case <-time.After(timeout): - Fail("the listener did not exit when the events channel was closed") - } + g.Ω(ok).ToNot(BeFalse()) + g.Ω(fsm.State).To(Equal("end")) + g.Ω(len(fsm.History)).To(Equal(1)) + g.Ω(fsm.History[0].Details).To(Equal("more details")) + g.Ω(fsm.History[0].Transition.Event).To(Equal("move")) + }).Should(Succeed()) + Eventually(func() bool { + _, found := store.GetEvent(event.EventId, "test") + return found + }).Should(BeTrue()) }) It("sends notifications for missing state-machine", func() { event := protos.Event{ @@ -146,15 +140,14 @@ var _ = Describe("A Listener", func() { }() eventsCh <- request close(eventsCh) - select { - case n := <-notificationsCh: - Ω(n.EventId).To(Equal(request.Event.EventId)) - Ω(n.Outcome).ToNot(BeNil()) - Ω(n.Outcome.Id).To(Equal(request.GetId())) - Ω(n.Outcome.Code).To(Equal(protos.EventOutcome_FsmNotFound)) - case <-time.After(timeout): - Fail("the listener did not exit when the events channel was closed") - } + Eventually(func(g Gomega) { + select { + case n := <-notificationsCh: + g.Ω(n.EventId).To(Equal(request.Event.EventId)) + g.Ω(n.Outcome.Id).To(Equal(request.GetId())) + g.Ω(n.Outcome.Code).To(Equal(protos.EventOutcome_FsmNotFound)) + } + }).Should(Succeed()) }) It("sends notifications for missing destinations", func() { request := protos.EventRequest{ @@ -165,15 +158,14 @@ var _ = Describe("A Listener", func() { go func() { testListener.ListenForMessages() }() eventsCh <- request close(eventsCh) - - select { - case n := <-notificationsCh: - Ω(n.EventId).To(Equal(request.Event.EventId)) - Ω(n.Outcome).ToNot(BeNil()) - Ω(n.Outcome.Code).To(Equal(protos.EventOutcome_MissingDestination)) - case <-time.After(timeout): - Fail("no error notification received") - } + Eventually(func(g Gomega) { + select { + case n := <-notificationsCh: + Ω(n.EventId).To(Equal(request.Event.EventId)) + Ω(n.Outcome).ToNot(BeNil()) + Ω(n.Outcome.Code).To(Equal(protos.EventOutcome_MissingDestination)) + } + }).Should(Succeed()) }) It("should exit when the channel is closed", func() { done := make(chan interface{}) @@ -182,12 +174,57 @@ var _ = Describe("A Listener", func() { testListener.ListenForMessages() }() close(eventsCh) - select { - case <-done: - Succeed() - case <-time.After(timeout): - Fail("the listener did not exit when the events channel was closed") + Eventually(done).Should(BeClosed()) + }) + It("should store a successful event and outcome (but no notification)", func() { + event := protos.Event{ + EventId: "1234", + Originator: "test-ok", + Transition: &protos.Transition{ + Event: "move", + }, + } + request := protos.EventRequest{ + Event: &event, + Config: "test", + Id: "1244", } + Ω(store.PutConfig(&protos.Configuration{ + Name: "test", + Version: "v2", + States: []string{"start", "end"}, + Transitions: []*protos.Transition{{From: "start", To: "end", Event: "move"}}, + StartingState: "start", + })).ToNot(HaveOccurred()) + Ω(store.PutStateMachine("1244", &protos.FiniteStateMachine{ + ConfigId: "test:v2", + State: "start", + History: nil, + })).ToNot(HaveOccurred()) + go func() { testListener.ListenForMessages() }() + eventsCh <- request + close(eventsCh) + + Consistently(func() *protos.EventResponse { + select { + case n := <-notificationsCh: + return &n + default: + return nil + } + }).Should(BeNil()) + Eventually(func() *protos.Event { + e, _ := store.GetEvent(event.EventId, request.Config) + return e + }, 100*time.Millisecond, 20*time.Millisecond).ShouldNot(BeNil()) + Eventually(func() protos.EventOutcome_StatusCode { + e, ok := store.GetOutcomeForEvent(event.EventId, request.Config) + if ok { + return e.Code + } else { + return protos.EventOutcome_GenericError + } + }, 100*time.Millisecond, 20*time.Millisecond).Should(Equal(protos.EventOutcome_Ok)) }) }) }) diff --git a/pubsub/pubsub_suite_test.go b/pubsub/pubsub_suite_test.go index 7f9fa7a..c9aa961 100644 --- a/pubsub/pubsub_suite_test.go +++ b/pubsub/pubsub_suite_test.go @@ -32,7 +32,6 @@ import ( const ( eventsQueue = "test-events" notificationsQueue = "test-notifications" - acksQueue = "test-acks" timeout = 1 * time.Second // Default timeout for Eventually is 1s pollingInterval = 10 * time.Millisecond // Default polling interval for Eventually is 10ms ) @@ -66,7 +65,7 @@ var _ = BeforeSuite(func() { }, }))) - for _, topic := range []string{eventsQueue, notificationsQueue, acksQueue} { + for _, topic := range []string{eventsQueue, notificationsQueue} { topic = fmt.Sprintf("%s-%d", topic, GinkgoParallelProcess()) if _, err := testSqsClient.GetQueueUrl(&sqs.GetQueueUrlInput{QueueName: &topic}); err != nil { // the queue does not exist and ought to be created diff --git a/pubsub/sqs_pub.go b/pubsub/sqs_pub.go index 7fb80a1..7f47600 100644 --- a/pubsub/sqs_pub.go +++ b/pubsub/sqs_pub.go @@ -16,7 +16,6 @@ import ( "github.com/golang/protobuf/proto" slf4go "github.com/massenz/slf4go/logging" protos "github.com/massenz/statemachine-proto/golang/api" - "strconv" ) // NewSqsPublisher will create a new `Publisher` to send error notifications received on the @@ -57,36 +56,21 @@ func GetQueueUrl(client *sqs.SQS, topic string) string { return *out.QueueUrl } -// Publish sends an message to provided topics depending on SQS Publisher settings. -// If an acksTopic is provided, it will send Ok outcomes to that topic and errors to errorsTopic; -// else, all outcomes will be sent to the errorsTopic. If notifyErrorsOnly is true, only error outcomes -// will be sent. -func (s *SqsPublisher) Publish(errorsTopic string, acksTopic string, notifyErrorsOnly bool) { +// Publish receives notifications from the SqsPublisher channel, and sends a message to a topic. +func (s *SqsPublisher) Publish(errorsTopic string) { errorsQueueUrl := GetQueueUrl(s.client, errorsTopic) - var acksQueueUrl string - if acksTopic != "" { - acksQueueUrl = GetQueueUrl(s.client, acksTopic) - } delay := int64(0) - s.logger.Info("SQS Publisher started for topics: %s %s", errorsQueueUrl, acksQueueUrl) - s.logger.Info("SQS Publisher notifyErrorsOnly: %s", strconv.FormatBool(notifyErrorsOnly)) for eventResponse := range s.notifications { isOKOutcome := eventResponse.Outcome != nil && eventResponse.Outcome.Code == protos.EventOutcome_Ok - if isOKOutcome && notifyErrorsOnly { - s.logger.Debug("Skipping notification for Ok outcome [Event ID: %s]", eventResponse.EventId) + if isOKOutcome { + s.logger.Warn("unexpected notification for Ok outcome [Event ID: %s]", eventResponse.EventId) continue } - queueUrl := errorsQueueUrl - if isOKOutcome && acksTopic != "" { - queueUrl = acksQueueUrl - } - - s.logger.Debug("[%s] %s", eventResponse.String(), queueUrl) msgResult, err := s.client.SendMessage(&sqs.SendMessageInput{ DelaySeconds: &delay, // Encodes the Event as a string, using Protobuf implementation. MessageBody: aws.String(proto.MarshalTextString(&eventResponse)), - QueueUrl: &queueUrl, + QueueUrl: &errorsQueueUrl, }) if err != nil { s.logger.Error("Cannot publish eventResponse (%s): %v", eventResponse.String(), err) diff --git a/pubsub/sqs_pub_test.go b/pubsub/sqs_pub_test.go index 0ce7b9b..2cc9d21 100644 --- a/pubsub/sqs_pub_test.go +++ b/pubsub/sqs_pub_test.go @@ -11,14 +11,14 @@ package pubsub_test import ( . "github.com/JiaYongfei/respect/gomega" - "github.com/google/uuid" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "fmt" + "github.com/golang/protobuf/proto" + "github.com/google/uuid" "github.com/massenz/slf4go/logging" - "time" "github.com/massenz/go-statemachine/api" "github.com/massenz/go-statemachine/pubsub" @@ -54,7 +54,7 @@ var _ = Describe("SQS Publisher", func() { done := make(chan interface{}) go func() { defer close(done) - go testPublisher.Publish(getQueueName(notificationsQueue), "", false) + go testPublisher.Publish(getQueueName(notificationsQueue)) }() notificationsCh <- notification res := getSqsMessage(getQueueName(notificationsQueue)) @@ -70,9 +70,9 @@ var _ = Describe("SQS Publisher", func() { close(notificationsCh) Eventually(done).Should(BeClosed()) }) - It("will publish successful outcomes", func() { + It("will not publish successful outcomes", func() { notification := protos.EventResponse{ - EventId: "dead-beef", + EventId: "ok-event", Outcome: &protos.EventOutcome{ Code: protos.EventOutcome_Ok, }, @@ -80,77 +80,33 @@ var _ = Describe("SQS Publisher", func() { done := make(chan interface{}) go func() { defer close(done) - go testPublisher.Publish(getQueueName(notificationsQueue), "", false) + go testPublisher.Publish(getQueueName(notificationsQueue)) }() notificationsCh <- notification - m := getSqsMessage(getQueueName(notificationsQueue)) - var response protos.EventResponse - Eventually(func(g Gomega) { - g.Expect(proto.UnmarshalText(*m.Body, &response)).ShouldNot(HaveOccurred()) - g.Expect(&response).To(Respect(¬ification)) + Consistently(func(g Gomega) { + m := getSqsMessage(getQueueName(notificationsQueue)) + g.Expect(m).To(BeNil()) }).Should(Succeed()) close(notificationsCh) Eventually(done).Should(BeClosed()) }) - It("will publish OK outcomes to acks queue if configured", func() { - errorResponse := protos.EventResponse{ - EventId: uuid.NewString(), - Outcome: &protos.EventOutcome{ - Code: protos.EventOutcome_InternalError, - }, - } - okResponse := protos.EventResponse{ - EventId: uuid.NewString(), - Outcome: &protos.EventOutcome{ - Code: protos.EventOutcome_Ok, - }, - } - done := make(chan interface{}) - go func() { - defer close(done) - go testPublisher.Publish(getQueueName(notificationsQueue), getQueueName(acksQueue), false) - }() - - notificationsCh <- errorResponse - notificationsCh <- okResponse - Eventually(func(g Gomega) { - var response protos.EventResponse - errMsg := getSqsMessage(getQueueName(notificationsQueue)) - g.Expect(proto.UnmarshalText(*errMsg.Body, &response)).ShouldNot(HaveOccurred()) - g.Expect(&response).To(Respect(&errorResponse)) - - okMsg := getSqsMessage(getQueueName(acksQueue)) - g.Expect(proto.UnmarshalText(*okMsg.Body, &response)).ShouldNot(HaveOccurred()) - g.Expect(&response).To(Respect(&okResponse)) - // There are no more messages in the notifications queue - g.Expect(getSqsMessage(getQueueName(notificationsQueue))).Should(BeNil()) - }).Should(Succeed()) - - close(notificationsCh) - select { - case <-done: - Succeed() - case <-time.After(timeout): - Fail("timed out waiting for Publisher to exit") - } - }) It("will terminate gracefully when the notifications channel is closed", func() { done := make(chan interface{}) go func() { defer close(done) - go testPublisher.Publish(getQueueName(notificationsQueue), "", false) + go testPublisher.Publish(getQueueName(notificationsQueue)) }() close(notificationsCh) Eventually(done).Should(BeClosed()) }) It("will survive an empty Message", func() { - go testPublisher.Publish(getQueueName(notificationsQueue), "", false) + go testPublisher.Publish(getQueueName(notificationsQueue)) notificationsCh <- protos.EventResponse{} close(notificationsCh) getSqsMessage(getQueueName(notificationsQueue)) }) It("will send several messages within a short timeframe", func() { - go testPublisher.Publish(getQueueName(notificationsQueue), "", false) + go testPublisher.Publish(getQueueName(notificationsQueue)) for i := range [10]int{} { evt := api.NewEvent("do-something") evt.EventId = fmt.Sprintf("event-%d", i) @@ -197,20 +153,14 @@ var _ = Describe("SQS Publisher", func() { done := make(chan interface{}) go func() { defer close(done) - go testPublisher.Publish(getQueueName(notificationsQueue), getQueueName(acksQueue), true) + go testPublisher.Publish(getQueueName(notificationsQueue)) }() notificationsCh <- responseOk - // Confirm neither queues got the Ok message - // Note we need to "consistently" check, or we may get a false positive if - // we check only once and the message is not yet in the queue. Consistently(func(g Gomega) { res := getSqsMessage(getQueueName(notificationsQueue)) Expect(res).To(BeNil()) - res = getSqsMessage(getQueueName(acksQueue)) - Expect(res).To(BeNil()) }, "200ms").Should(Succeed()) - close(notificationsCh) Eventually(done).Should(BeClosed()) }) From 4e6a2b794b1a216f40a7004a0f76f6f2e1f59989 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 22:09:02 -0800 Subject: [PATCH 7/9] Bump golang.org/x/net from 0.0.0-20220906165146-f3363e06e74c to 0.7.0 (#83) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220906165146-f3363e06e74c to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/commits/v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 7b699b5..b204899 100644 --- a/go.mod +++ b/go.mod @@ -45,9 +45,9 @@ require ( github.com/opencontainers/runc v1.1.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index d6cf1be..47e09ae 100644 --- a/go.sum +++ b/go.sum @@ -213,8 +213,8 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220906165146-f3363e06e74c h1:yKufUcDwucU5urd+50/Opbt4AYpqthk7wHpHok8f1lo= -golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -252,8 +252,8 @@ golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -262,8 +262,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 8bc346bc4c5e6b0781bf1fd119ee5042e6e29967 Mon Sep 17 00:00:00 2001 From: Marco Massenzio <1153951+massenz@users.noreply.github.com> Date: Sat, 25 Feb 2023 09:19:20 -0800 Subject: [PATCH 8/9] [#64, #67] Removes REST server & in-memory store (#85) --- .github/workflows/{build.yml => test.yml} | 4 +- .run/Run all tests.run.xml | 2 +- Makefile | 12 +- api/fsm.go | 4 +- cmd/main.go | 172 +++++---- server/configuration_handlers.go | 95 ----- server/configuration_handlers_test.go | 193 ---------- server/event_handlers.go | 62 ---- server/event_handlers_test.go | 173 --------- server/health_handler.go | 58 --- server/http_server.go | 99 ------ server/http_server_test.go | 37 -- server/server_suite_test.go | 22 -- server/statemachine_handlers.go | 180 ---------- server/statemachine_handlers_test.go | 413 ---------------------- server/types.go | 76 ---- storage/memory_store.go | 163 --------- storage/memory_store_test.go | 120 ------- 18 files changed, 109 insertions(+), 1776 deletions(-) rename .github/workflows/{build.yml => test.yml} (90%) delete mode 100644 server/configuration_handlers.go delete mode 100644 server/configuration_handlers_test.go delete mode 100644 server/event_handlers.go delete mode 100644 server/event_handlers_test.go delete mode 100644 server/health_handler.go delete mode 100644 server/http_server.go delete mode 100644 server/http_server_test.go delete mode 100644 server/server_suite_test.go delete mode 100644 server/statemachine_handlers.go delete mode 100644 server/statemachine_handlers_test.go delete mode 100644 server/types.go delete mode 100644 storage/memory_store.go delete mode 100644 storage/memory_store_test.go diff --git a/.github/workflows/build.yml b/.github/workflows/test.yml similarity index 90% rename from .github/workflows/build.yml rename to .github/workflows/test.yml index e90a88d..434796e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ # Copyright (c) 2022 AlertAvert.com. All rights reserved. # Author: Marco Massenzio (marco@alertavert.com) # -name: Build & Test +name: Test on: push: @@ -28,4 +28,4 @@ jobs: run: | mkdir -p ${HOME}/.aws && cp data/credentials ${HOME}/.aws/ export AWS_REGION=us-west-2 - go test ./api ./grpc ./pubsub ./server ./storage + go test ./api ./grpc ./pubsub ./storage diff --git a/.run/Run all tests.run.xml b/.run/Run all tests.run.xml index 7946e6a..69bd431 100644 --- a/.run/Run all tests.run.xml +++ b/.run/Run all tests.run.xml @@ -2,7 +2,7 @@ - + diff --git a/Makefile b/Makefile index 26b61d6..90dbe38 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ dockerfile := docker/Dockerfile # Edit only the packages list, when adding new functionality, # the rest is deduced automatically. # -pkgs := ./api ./grpc ./pubsub ./server ./storage +pkgs := ./api ./grpc ./pubsub ./storage all_go := $(shell for d in $(pkgs); do find $$d -name "*.go"; done) test_srcs := $(shell for d in $(pkgs); do find $$d -name "*_test.go"; done) srcs := $(filter-out $(test_srcs),$(all_go)) @@ -61,16 +61,16 @@ fmt: ## Formats the Go source code using 'go fmt' $(bin): cmd/main.go $(srcs) @mkdir -p $(shell dirname $(bin)) GOOS=$(GOOS); GOARCH=$(GOARCH); go build \ - -ldflags "-X $(GOMOD)/server.Release=$(release)" \ + -ldflags "-X $(GOMOD)/api.Release=$(release)" \ -o $(bin) cmd/main.go $(dockerbin): GOOS=linux; GOARCH=amd64; go build \ - -ldflags "-X $(GOMOD)/server.Release=$(release)" \ + -ldflags "-X $(GOMOD)/api.Release=$(release)" \ -o $(dockerbin) cmd/main.go .PHONY: build -build: $(bin) ## Builds the server +build: $(bin) ## Builds the Statemachine server binary test: $(srcs) $(test_srcs) ## Runs all tests ginkgo $(pkgs) @@ -89,13 +89,13 @@ container: $(dockerbin) ## Builds the container image .PHONY: start start: ## Starts the Redis and LocalStack containers, and Creates the SQS Queues in LocalStack @RELEASE=$(release) BASEDIR=$(shell pwd) docker compose -f $(compose) --project-name sm up redis localstack -d - @sleep 1 + @sleep 3 @for queue in events notifications; do \ aws --no-cli-pager --endpoint-url=http://localhost:4566 \ --region us-west-2 \ sqs create-queue --queue-name $$queue; done >/dev/null # We need to wait for the SQS Queues to be up before starting the server. - @RELEASE=$(release) BASEDIR=$(shell pwd) docker compose -f $(compose) --project-name sm up server -d + #@RELEASE=$(release) BASEDIR=$(shell pwd) docker compose -f $(compose) --project-name sm up server -d .PHONY: stop stop: ## Stops the Redis and LocalStack containers diff --git a/api/fsm.go b/api/fsm.go index 19bd24e..49f9501 100644 --- a/api/fsm.go +++ b/api/fsm.go @@ -25,6 +25,8 @@ const ( ) var ( + Release string + MalformedConfigurationError = fmt.Errorf("this configuration cannot be parsed") MissingNameConfigurationError = fmt.Errorf( "configuration must always specify a name (and optionally a version)") @@ -43,7 +45,7 @@ var ( // Logger is made accessible so that its `Level` can be changed // or can be sent to a `NullLog` during testing. - Logger = log.NewLog("fsm") + Logger = log.NewLog("api") ) // ConfiguredStateMachine is the internal representation of an FSM, which diff --git a/cmd/main.go b/cmd/main.go index 7118226..64695e6 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -13,14 +13,20 @@ import ( "errors" "flag" "fmt" + g "google.golang.org/grpc" + "net" + "os" + "os/signal" + "sync" + "syscall" + + log "github.com/massenz/slf4go/logging" + protos "github.com/massenz/statemachine-proto/golang/api" + + "github.com/massenz/go-statemachine/api" "github.com/massenz/go-statemachine/grpc" "github.com/massenz/go-statemachine/pubsub" - "github.com/massenz/go-statemachine/server" "github.com/massenz/go-statemachine/storage" - log "github.com/massenz/slf4go/logging" - protos "github.com/massenz/statemachine-proto/golang/api" - "net" - "sync" ) func SetLogLevel(services []log.Loggable, level log.LogLevel) { @@ -32,27 +38,34 @@ func SetLogLevel(services []log.Loggable, level log.LogLevel) { } var ( - logger = log.NewLog("sm-server") - serverLogLevel log.LogLevel = log.INFO + logger = log.NewLog("sm-server") - host = "0.0.0.0" - - store storage.StoreManager - - sub *pubsub.SqsSubscriber - pub *pubsub.SqsPublisher = nil listener *pubsub.EventsListener - - // TODO: for now blocking channels; we will need to confirm - // whether we can support a fully concurrent system with a - // buffered channel + pub *pubsub.SqsPublisher = nil + sub *pubsub.SqsSubscriber + store storage.StoreManager + wg sync.WaitGroup + + // notificationsCh is the channel over which we send error notifications + // to publish on the appropriate queue. + // The Listener will produce error notifications, which will be consumed + // by the PubSub Publisher (if configured) which in turn will produce to + // the -notifications topic. + // + // Not configured by default, it is only used if a -notifications queue + // is defined. notificationsCh chan protos.EventResponse = nil - eventsCh = make(chan protos.EventRequest) - wg sync.WaitGroup + + // eventsCh is the channel over which the Listener receive Events to process. + // Both the gRPC server and the PubSub Subscriber (if configured) will produce + // events for this channel. + // + // Currently, this is a blocking channel (capacity for one item), but once we + // parallelize events processing we can make it deeper. + eventsCh = make(chan protos.EventRequest) ) func main() { - defer close(eventsCh) var awsEndpoint = flag.String("endpoint-url", "", "HTTP URL for AWS SQS to connect to; usually best left undefined, "+ @@ -61,17 +74,14 @@ func main() { "If set, connects to Redis with cluster-mode enabled") var debug = flag.Bool("debug", false, "Verbose logs; better to avoid on Production services") - var eventsTopic = flag.String("events", "", "Topi name to receive events from") + var eventsTopic = flag.String("events", "", "Topic name to receive events from") var grpcPort = flag.Int("grpc-port", 7398, "The port for the gRPC server") var noTls = flag.Bool("insecure", false, "If set, TLS will be disabled (NOT recommended)") - var localOnly = flag.Bool("local", false, - "If set, it only listens to incoming requests from the local host") var maxRetries = flag.Int("max-retries", storage.DefaultMaxRetries, "Max number of attempts for a recoverable error to be retried against the Redis cluster") var notificationsTopic = flag.String("notifications", "", "(optional) The name of the topic to publish events' outcomes to; if not "+ "specified, no outcomes will be published") - var port = flag.Int("http-port", 7399, "HTTP Server port for the REST API") var redisUrl = flag.String("redis", "", "For single node Redis instances: host:port "+ "for the Redis instance. For redis clusters: a comma-separated list of redis nodes. "+ "If using an ElastiCache Redis cluster with cluster mode enabled, this can also be the configuration endpoint.") @@ -82,15 +92,7 @@ func main() { " performance, do not use in production or on heavily loaded systems (will override the -debug option)") flag.Parse() - logger.Info("starting State Machine Server - Rel. %s", server.Release) - - if *localOnly { - logger.Info("listening on local interface only") - host = "localhost" - } else { - logger.Warn("listening on all interfaces") - } - addr := fmt.Sprintf("%s:%d", host, *port) + logger.Info("starting State Machine Server - Rel. %s", api.Release) if *redisUrl == "" { logger.Fatal(errors.New("in-memory store deprecated, a Redis server must be configured")) @@ -99,27 +101,32 @@ func main() { logger.Info("with timeout: %s, max-retries: %d", *timeout, *maxRetries) store = storage.NewRedisStore(*redisUrl, *cluster, 1, *timeout, *maxRetries) } - server.SetStore(store) - - if *eventsTopic == "" { - logger.Warn("no PubSub event topic configured, events can only be sent via gRPC calls") - } - logger.Info("connecting to SQS Topic: %s", *eventsTopic) - sub = pubsub.NewSqsSubscriber(eventsCh, awsEndpoint) - if sub == nil { - panic("Cannot create a valid SQS Subscriber") + done := make(chan interface{}) + if *eventsTopic != "" { + logger.Info("connecting to SQS Topic: %s", *eventsTopic) + sub = pubsub.NewSqsSubscriber(eventsCh, awsEndpoint) + if sub == nil { + logger.Fatal(errors.New("cannot create a valid SQS Subscriber")) + } + wg.Add(1) + go func() { + defer wg.Done() + logger.Info("subscribing to events on topic [%s]", *eventsTopic) + sub.Subscribe(*eventsTopic, done) + }() } if *notificationsTopic != "" { - logger.Info("notifications topic: %s", *notificationsTopic) + logger.Info("sending errors to DLQ topic [%s]", *notificationsTopic) notificationsCh = make(chan protos.EventResponse) defer close(notificationsCh) pub = pubsub.NewSqsPublisher(notificationsCh, awsEndpoint) if pub == nil { - panic("Cannot create a valid SQS Publisher") + logger.Fatal(errors.New("cannot create a valid SQS Publisher")) } go pub.Publish(*notificationsTopic) } + listener = pubsub.NewEventsListener(&pubsub.ListenerOptions{ EventsChannel: eventsCh, NotificationsChannel: notificationsCh, @@ -127,50 +134,59 @@ func main() { // TODO: workers pool not implemented yet. ListenersPoolSize: 0, }) - go sub.Subscribe(*eventsTopic, nil) - - // This should not be invoked until we have initialized all the services. - setLogLevel(*debug, *trace) - logger.Info("starting events listener") - go listener.ListenForMessages() + wg.Add(1) + go func() { + defer wg.Done() + listener.ListenForMessages() + }() logger.Info("gRPC server running at tcp://:%d", *grpcPort) - go startGrpcServer(*grpcPort, *noTls, eventsCh) + svr := startGrpcServer(*grpcPort, *noTls, eventsCh) - // TODO: REST Server is deprecated and will be removed soon. - scheme := "http" - logger.Info("HTTP server (REST API) running at %s://%s", scheme, addr) - srv := server.NewHTTPServer(addr, serverLogLevel) - logger.Fatal(srv.ListenAndServe()) + // This should not be invoked until we have initialized all the services. + setLogLevel(*debug, *trace) + logger.Info("statemachine server ready for processing events...") + RunUntilStopped(done, svr) + logger.Info("...done. Goodbye.") +} + +func RunUntilStopped(done chan interface{}, svr *g.Server) { + // Trap Ctrl-C and SIGTERM (Docker/Kubernetes) to shutdown gracefully + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) + + // Block until a signal is received. + _ = <-c + logger.Info("shutting down services...") + close(done) + close(eventsCh) + svr.GracefulStop() + logger.Info("waiting for services to exit...") + wg.Wait() } // setLogLevel sets the logging level for all the services' loggers, depending on // whether the -debug or -trace flag is enabled (if neither, we log at INFO level). // If both are set, then -trace takes priority. func setLogLevel(debug bool, trace bool) { - if debug { + var logLevel log.LogLevel = log.INFO + if debug && !trace { logger.Info("verbose logging enabled") - logger.Level = log.DEBUG - SetLogLevel([]log.Loggable{store, pub, sub, listener}, log.DEBUG) - serverLogLevel = log.DEBUG - } - - if trace { - logger.Warn("trace logging Enabled") - logger.Level = log.TRACE - server.EnableTracing() - SetLogLevel([]log.Loggable{store, pub, sub, listener}, log.TRACE) - serverLogLevel = log.TRACE + logLevel = log.DEBUG + } else if trace { + logger.Info("trace logging enabled") + logLevel = log.TRACE } + logger.Level = logLevel + SetLogLevel([]log.Loggable{store, pub, sub, listener}, logLevel) } // startGrpcServer will start a new gRPC server, bound to // the local `port` and will send any incoming // `EventRequest` to the receiving channel. // This MUST be run as a go-routine, which never returns -func startGrpcServer(port int, disableTls bool, events chan<- protos.EventRequest) { - defer wg.Done() +func startGrpcServer(port int, disableTls bool, events chan<- protos.EventRequest) *g.Server { l, err := net.Listen("tcp", fmt.Sprintf(":%d", port)) if err != nil { panic(err) @@ -183,10 +199,16 @@ func startGrpcServer(port int, disableTls bool, events chan<- protos.EventReques TlsEnabled: !disableTls, }) if err != nil { - log.RootLog.Fatal(err) - } - err = grpcServer.Serve(l) - if err != nil { - log.RootLog.Fatal(err) + logger.Fatal(err) } + wg.Add(1) + go func() { + defer wg.Done() + err = grpcServer.Serve(l) + if err != nil { + logger.Fatal(err) + } + logger.Info("gRPC server exited") + }() + return grpcServer } diff --git a/server/configuration_handlers.go b/server/configuration_handlers.go deleted file mode 100644 index 36daa5b..0000000 --- a/server/configuration_handlers.go +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server - -import ( - "encoding/json" - "fmt" - "github.com/gorilla/mux" - . "github.com/massenz/go-statemachine/api" - "github.com/massenz/statemachine-proto/golang/api" - pj "google.golang.org/protobuf/encoding/protojson" - "net/http" - "strings" -) - -func CreateConfigurationHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - var config api.Configuration - err := json.NewDecoder(r.Body).Decode(&config) - if err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - if config.Version == "" { - config.Version = "v1" - } - logger.Debug("Creating new configuration with Version ID: %s", GetVersionId(&config)) - - // TODO: Check this configuration does not already exist. - - err = CheckValid(&config) - if err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - logger.Debug("Configuration is valid (starting state: %s)", config.StartingState) - - err = storeManager.PutConfig(&config) - if err != nil { - if strings.Contains(err.Error(), "already exists") { - logger.Debug("attempts to POST an existing configuration id: %v", err) - http.Error(w, err.Error(), http.StatusConflict) - return - } - logger.Error("cannot store Configuration to store: %v", err) - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - logger.Debug("Configuration stored: %s", GetVersionId(&config)) - - w.Header().Add("Location", ConfigurationsEndpoint+"/"+GetVersionId(&config)) - w.WriteHeader(http.StatusCreated) - err = json.NewEncoder(w).Encode(&config) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - return -} - -func GetConfigurationHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - vars := mux.Vars(r) - if vars == nil { - logger.Error("Unexpected missing path parameter in Request URI: %s", - r.RequestURI) - http.Error(w, UnexpectedError.Error(), http.StatusInternalServerError) - return - } - - cfgId := vars["cfg_id"] - config, ok := storeManager.GetConfig(cfgId) - if !ok { - http.Error(w, fmt.Sprintf("Configuration [%s] not found", cfgId), http.StatusNotFound) - return - } - resp, err := pj.Marshal(config) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - w.Write(resp) - return -} diff --git a/server/configuration_handlers_test.go b/server/configuration_handlers_test.go deleted file mode 100644 index d8c9ccb..0000000 --- a/server/configuration_handlers_test.go +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "bytes" - "encoding/json" - slf4go "github.com/massenz/slf4go/logging" - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "strings" - - . "github.com/massenz/go-statemachine/api" - "github.com/massenz/go-statemachine/server" - "github.com/massenz/go-statemachine/storage" - protos "github.com/massenz/statemachine-proto/golang/api" -) - -const ( - OrdersConfig = "../data/orders.json" -) - -var _ = Describe("Configuration Handlers", func() { - var ( - req *http.Request - writer *httptest.ResponseRecorder - store storage.StoreManager - - // NOTE: we are using the Router here as we need to correctly also parse - // the URI for path args (just using the handler will not do that) - // The `router` can be safely set for all the test contexts, once and for all. - router = server.NewRouter() - ) - // Disabling verbose logging, as it pollutes test output; - // set it back to DEBUG when tests fail, and you need to - // diagnose the failure. - server.SetLogLevel(slf4go.NONE) - - Context("when creating configurations", func() { - BeforeEach(func() { - writer = httptest.NewRecorder() - // TODO: use a RedisStore instead, once we have TestContainers enabled. - store = storage.NewInMemoryStore() - store.SetLogLevel(slf4go.NONE) - server.SetStore(store) - }) - Context("with a valid JSON", func() { - BeforeEach(func() { - body := ReadTestdata() - req = httptest.NewRequest(http.MethodPost, - strings.Join([]string{server.ApiPrefix, server.ConfigurationsEndpoint}, "/"), body) - }) - - It("should succeed", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - location := writer.Header().Get("Location") - Expect(strings.HasSuffix(location, "/test.orders:v2")).To(BeTrue()) - - var response protos.Configuration - Expect(json.Unmarshal(writer.Body.Bytes(), &response)).ToNot(HaveOccurred()) - Expect(response.Name).To(Equal("test.orders")) - Expect(response.States).To(Equal([]string{ - "start", - "pending", - "shipping", - "delivered", - "completed", - "closed", - })) - Expect(response.StartingState).To(Equal("start")) - }) - It("should fill the cache", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - _, found := store.GetConfig("test.orders:v2") - Expect(found).To(BeTrue()) - }) - It("should fail for an existing version", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - body := ReadTestdata() - - // POST the config again - writer2 := httptest.NewRecorder() - req2 := httptest.NewRequest(http.MethodPost, - strings.Join([]string{server.ApiPrefix, server.ConfigurationsEndpoint}, "/"), body) - router.ServeHTTP(writer2, req2) - Expect(writer2.Code).To(Equal(http.StatusConflict)) - }) - }) - - Context("with an invalid JSON", func() { - var body io.Reader - BeforeEach(func() { - req = httptest.NewRequest(http.MethodPost, - strings.Join([]string{server.ApiPrefix, server.ConfigurationsEndpoint}, "/"), body) - }) - It("without name, states or transitions, will fail", func() { - body = strings.NewReader(`{ - "version": "v1", - "starting_state": "source" - }`) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusBadRequest)) - }) - It("without states, will fail", func() { - body = strings.NewReader(`{ - "name": "fake", - "version": "v1", - "starting_state": "source" - "transitions": [ - {"from": "source", "to": "tested", "event": "test"}, - {"from": "tested", "to": "binary", "event": "build"} - ], - }`) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusBadRequest)) - }) - }) - }) - Context("when retrieving configurations", func() { - var spaceship = protos.Configuration{ - Name: "spaceship", - Version: "v1", - StartingState: "earth", - States: []string{"earth", "orbit", "mars"}, - Transitions: []*protos.Transition{ - {From: "earth", To: "orbit", Event: "launch"}, - {From: "orbit", To: "mars", Event: "land"}, - }, - } - var cfgId string - BeforeEach(func() { - writer = httptest.NewRecorder() - // We need an empty, clean store for each test to avoid cross-polluting it. - store = storage.NewInMemoryStore() - store.SetLogLevel(slf4go.NONE) - server.SetStore(store) - - Expect(store.PutConfig(&spaceship)).ToNot(HaveOccurred()) - cfgId = GetVersionId(&spaceship) - }) - It("with a valid ID should succeed", func() { - endpoint := strings.Join([]string{server.ApiPrefix, server.ConfigurationsEndpoint, - cfgId}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - var result protos.Configuration - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - Expect(json.NewDecoder(writer.Body).Decode(&result)).ToNot(HaveOccurred()) - Expect(GetVersionId(&result)).To(Equal(cfgId)) - Expect(result.States).To(Equal(spaceship.States)) - Expect(len(result.Transitions)).To(Equal(len(spaceship.Transitions))) - for n, t := range result.Transitions { - Expect(t.From).To(Equal(spaceship.Transitions[n].From)) - Expect(t.To).To(Equal(spaceship.Transitions[n].To)) - Expect(t.Event).To(Equal(spaceship.Transitions[n].Event)) - } - }) - It("with an invalid ID, it will return Not Found", func() { - endpoint := strings.Join([]string{server.ApiPrefix, server.ConfigurationsEndpoint, - "fake:v3"}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("without ID, it will fail with a NOT ALLOWED error", func() { - endpoint := strings.Join([]string{server.ApiPrefix, server.ConfigurationsEndpoint}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusMethodNotAllowed)) - }) - }) -}) - -func ReadTestdata() *bytes.Reader { - configJson, err := ioutil.ReadFile(OrdersConfig) - Expect(err).ToNot(HaveOccurred()) - return bytes.NewReader(configJson) -} diff --git a/server/event_handlers.go b/server/event_handlers.go deleted file mode 100644 index a44b1f0..0000000 --- a/server/event_handlers.go +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server - -import ( - "encoding/json" - "fmt" - "github.com/gorilla/mux" - "net/http" -) - -func GetEventHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - // We don't really need to check for the presence of the parameter, - // as the Mux router takes care of all the error handling for us. - vars := mux.Vars(r) - cfgName := vars["cfg_name"] - evtId := vars["evt_id"] - logger.Debug("Looking up Event: %s#%s", cfgName, evtId) - - event, ok := storeManager.GetEvent(evtId, cfgName) - if !ok { - http.Error(w, fmt.Sprintf("Event [%s] not found", evtId), http.StatusNotFound) - return - } - logger.Debug("Found Event: %s", event.String()) - - err := json.NewEncoder(w).Encode(&EventResponse{ID: evtId, Event: event}) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} - -func GetOutcomeHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - vars := mux.Vars(r) - cfgName := vars["cfg_name"] - evtId := vars["evt_id"] - logger.Debug("Looking up Outcome for Event: %s#%s", cfgName, evtId) - - outcome, ok := storeManager.GetOutcomeForEvent(evtId, cfgName) - if !ok { - http.Error(w, fmt.Sprintf("Outcome for Event [%s] not found", evtId), http.StatusNotFound) - return - } - logger.Debug("Found Event Outcome: %s", outcome.String()) - err := json.NewEncoder(w).Encode(MakeOutcomeResponse(outcome)) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} diff --git a/server/event_handlers_test.go b/server/event_handlers_test.go deleted file mode 100644 index f4b895b..0000000 --- a/server/event_handlers_test.go +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server_test - -import ( - . "github.com/JiaYongfei/respect/gomega" - "github.com/google/uuid" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "encoding/json" - log "github.com/massenz/slf4go/logging" - "net/http" - "net/http/httptest" - "strings" - - . "github.com/massenz/go-statemachine/api" - "github.com/massenz/go-statemachine/server" - "github.com/massenz/go-statemachine/storage" - - protos "github.com/massenz/statemachine-proto/golang/api" -) - -var _ = Describe("Event Handlers", func() { - var ( - req *http.Request - writer *httptest.ResponseRecorder - store storage.StoreManager - - // NOTE: we are using the Router here as we need to correctly also parse - // the URI for path args (just using the router will not do that) - // The `router` can be safely set for all the test contexts, once and for all. - router = server.NewRouter() - ) - // Disabling verbose logging, as it pollutes test output; - // set it back to DEBUG when tests fail, and you need to - // diagnose the failure. - server.SetLogLevel(log.NONE) - - Context("when retrieving an Event", func() { - var id string - var evt *protos.Event - - BeforeEach(func() { - store = storage.NewInMemoryStore() - store.SetLogLevel(log.NONE) - server.SetStore(store) - - writer = httptest.NewRecorder() - evt = NewEvent("test") - id = evt.EventId - Expect(store.PutEvent(evt, "test-cfg", storage.NeverExpire)).ToNot(HaveOccurred()) - }) - It("can be retrieved with a valid ID", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, "test-cfg", id}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - - var result server.EventResponse - Expect(json.NewDecoder(writer.Body).Decode(&result)).ToNot(HaveOccurred()) - Expect(result.ID).To(Equal(id)) - Expect(result.Event).To(Respect(evt)) - }) - It("with an invalid ID will return Not Found", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, "test-cfg", uuid.NewString()}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("with a missing Config will (eventually) return Not Found", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, "", "12345"}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - // Note: this is done by the router, automatically, removing the redundant slash - Expect(writer.Code).To(Equal(http.StatusMovedPermanently)) - newLoc := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, "12345"}, "/") - Expect(writer.Header().Get("Location")).To(Equal(newLoc)) - - req = httptest.NewRequest(http.MethodGet, newLoc, nil) - writer = httptest.NewRecorder() - router.ServeHTTP(writer, req) - // Note: this is done by the router, automatically, removing the redundant slash - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("with gibberish data will still fail gracefully", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, "fake", id}, "/") - - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - }) - - Context("when retrieving an Event Outcome", func() { - var id string - var outcome *protos.EventOutcome - var cfgName = "test-cfg" - - BeforeEach(func() { - store = storage.NewInMemoryStore() - store.SetLogLevel(log.NONE) - server.SetStore(store) - - writer = httptest.NewRecorder() - id = uuid.NewString() - outcome = &protos.EventOutcome{ - Code: protos.EventOutcome_Ok, - Id: "fake-sm", - Details: "something happened", - } - Expect(store.AddEventOutcome(id, cfgName, outcome, - storage.NeverExpire)).ToNot(HaveOccurred()) - }) - It("can be retrieved with a valid ID", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, server.EventsOutcome, cfgName, id}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - - var result server.OutcomeResponse - Expect(json.NewDecoder(writer.Body).Decode(&result)).ToNot(HaveOccurred()) - Expect(result.StatusCode).To(Equal(outcome.Code.String())) - Expect(result.Message).To(Equal(outcome.Details)) - Expect(result.Destination).To(Equal(outcome.Id)) - }) - It("with an invalid ID will return Not Found", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, server.EventsOutcome, cfgName, uuid.NewString()}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("with a missing Config will (eventually) return Not Found", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, server.EventsOutcome, "", "12345"}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - // Note: this is done by the router, automatically, removing the redundant slash - Expect(writer.Code).To(Equal(http.StatusMovedPermanently)) - newLoc := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, server.EventsOutcome, "12345"}, "/") - Expect(writer.Header().Get("Location")).To(Equal(newLoc)) - - req = httptest.NewRequest(http.MethodGet, newLoc, nil) - writer = httptest.NewRecorder() - router.ServeHTTP(writer, req) - // Note: this is done by the router, automatically, removing the redundant slash - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("with gibberish data will still fail gracefully", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.EventsEndpoint, server.EventsOutcome, "fake", id}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - }) -}) diff --git a/server/health_handler.go b/server/health_handler.go deleted file mode 100644 index 61aa7b2..0000000 --- a/server/health_handler.go +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server - -import ( - "encoding/json" - "fmt" - "net/http" -) - -// NOTE: We make the handlers "exportable" so they can be tested, do NOT call directly. - -type HealthResponse struct { - Status string `json:"status"` - Release string `json:"release"` -} - -func HealthHandler(w http.ResponseWriter, r *http.Request) { - // Standard preamble for all handlers, sets tracing (if enabled) and default content type. - defer trace(r.RequestURI)() - defaultContent(w) - - var response MessageResponse - res := HealthResponse{ - Status: "OK", - Release: Release, - } - var err error - if storeManager == nil { - err = fmt.Errorf("store manager is not initialized") - } else { - err = storeManager.Health() - } - if err != nil { - logger.Error("Health check failed: %s", err) - res.Status = "ERROR" - response = MessageResponse{ - Msg: res, - Error: fmt.Sprintf("error connecting to storage: %s", err), - } - } else { - response = MessageResponse{ - Msg: res, - } - } - err = json.NewEncoder(w).Encode(response) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } -} diff --git a/server/http_server.go b/server/http_server.go deleted file mode 100644 index bd08eb0..0000000 --- a/server/http_server.go +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server - -import ( - "github.com/massenz/go-statemachine/storage" - log "github.com/massenz/slf4go/logging" - "net/http" - "strings" - "time" - - "github.com/gorilla/mux" -) - -const ( - ApiPrefix = "/api/v1" - HealthEndpoint = "/health" - ConfigurationsEndpoint = "configurations" - StatemachinesEndpoint = "statemachines" - EventsEndpoint = "events" - EventsOutcome = "outcome" -) - -var ( - // Release carries the version of the binary, as set by the build script - // See: https://blog.alexellis.io/inject-build-time-vars-golang/ - Release string - - shouldTrace bool - logger = log.NewLog("server") - storeManager storage.StoreManager -) - -func trace(endpoint string) func() { - if !shouldTrace { - return func() {} - } - start := time.Now() - logger.Trace("Handling: [%s]\n", endpoint) - return func() { logger.Trace("%s took %s\n", endpoint, time.Since(start)) } -} - -func defaultContent(w http.ResponseWriter) { - w.Header().Add(ContentType, ApplicationJson) -} - -func EnableTracing() { - shouldTrace = true - logger.Level = log.TRACE -} - -func SetLogLevel(level log.LogLevel) { - logger.Level = level -} - -// NewRouter returns a gorilla/mux Router for the server routes; exposed so -// that path params are testable. -func NewRouter() *mux.Router { - r := mux.NewRouter() - r.HandleFunc(HealthEndpoint, HealthHandler).Methods("GET") - - r.HandleFunc(strings.Join([]string{ApiPrefix, ConfigurationsEndpoint}, "/"), - CreateConfigurationHandler).Methods("POST") - r.HandleFunc(strings.Join([]string{ApiPrefix, ConfigurationsEndpoint, "{cfg_id}"}, "/"), - GetConfigurationHandler).Methods("GET") - - r.HandleFunc(strings.Join([]string{ApiPrefix, StatemachinesEndpoint}, "/"), - CreateStatemachineHandler).Methods("POST") - r.HandleFunc(strings.Join([]string{ApiPrefix, StatemachinesEndpoint, "{cfg_name}", "{sm_id}"}, "/"), - GetStatemachineHandler).Methods("GET") - r.HandleFunc(strings.Join([]string{ApiPrefix, StatemachinesEndpoint, "{cfg_name}", "{sm_id}"}, "/"), - ModifyStatemachineHandler).Methods("PUT") - - r.HandleFunc(strings.Join([]string{ApiPrefix, EventsEndpoint, "{cfg_name}", "{evt_id}"}, "/"), - GetEventHandler).Methods("GET") - r.HandleFunc(strings.Join([]string{ApiPrefix, EventsEndpoint, EventsOutcome, "{cfg_name}", "{evt_id}"}, "/"), - GetOutcomeHandler).Methods("GET") - - return r -} - -func NewHTTPServer(addr string, logLevel log.LogLevel) *http.Server { - logger.Level = logLevel - return &http.Server{ - Addr: addr, - Handler: NewRouter(), - } -} - -func SetStore(store storage.StoreManager) { - storeManager = store -} diff --git a/server/http_server_test.go b/server/http_server_test.go deleted file mode 100644 index e6d32f4..0000000 --- a/server/http_server_test.go +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server_test - -import ( - "github.com/massenz/go-statemachine/server" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "net/http" - "net/http/httptest" -) - -var _ = Describe("Server", func() { - var ( - req *http.Request - handler http.Handler - writer *httptest.ResponseRecorder - ) - Context("when started", func() { - BeforeEach(func() { - handler = http.HandlerFunc(server.HealthHandler) - req = httptest.NewRequest(http.MethodGet, "/health", nil) - writer = httptest.NewRecorder() - }) - It("is healthy", func() { - handler.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - }) - }) -}) diff --git a/server/server_suite_test.go b/server/server_suite_test.go deleted file mode 100644 index ac087fe..0000000 --- a/server/server_suite_test.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestServer(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Server Suite") -} diff --git a/server/statemachine_handlers.go b/server/statemachine_handlers.go deleted file mode 100644 index 64969e1..0000000 --- a/server/statemachine_handlers.go +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server - -import ( - "encoding/json" - "fmt" - "github.com/google/uuid" - "github.com/gorilla/mux" - "github.com/massenz/go-statemachine/storage" - "net/http" - "strings" - - . "github.com/massenz/go-statemachine/api" - "github.com/massenz/statemachine-proto/golang/api" -) - -func CreateStatemachineHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - var request StateMachineRequest - err := json.NewDecoder(r.Body).Decode(&request) - if err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - if request.Configuration == "" { - http.Error(w, "must always specify a fully qualified configuration version", - http.StatusBadRequest) - return - } - if request.ID == "" { - request.ID = uuid.New().String() - } else { - logger.Debug("checking whether FSM [%s] already exists", request.ID) - configNameParts := strings.Split(request.Configuration, - storage.KeyPrefixComponentsSeparator) - if len(configNameParts) != 2 { - http.Error(w, fmt.Sprintf("config name is not properly formatted (name:version): %s", - request.Configuration), http.StatusBadRequest) - return - } - if _, found := storeManager.GetStateMachine(request.ID, configNameParts[0]); found { - logger.Debug("FSM already exists, returning a Conflict error") - http.Error(w, storage.AlreadyExistsError(request.ID).Error(), http.StatusConflict) - return - } - } - - logger.Debug("looking up Config [%s]", request.Configuration) - cfg, ok := storeManager.GetConfig(request.Configuration) - if !ok { - http.Error(w, "configuration not found", http.StatusNotFound) - return - } - logger.Debug("found configuration [%s]", cfg) - logger.Info("Creating a new statemachine [%s] (configuration [%s])", - request.ID, GetVersionId(cfg)) - fsm := &api.FiniteStateMachine{ - ConfigId: GetVersionId(cfg), - State: cfg.StartingState, - History: make([]*api.Event, 0), - } - err = storeManager.PutStateMachine(request.ID, fsm) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - w.Header().Add("Location", strings.Join([]string{ApiPrefix, StatemachinesEndpoint, cfg.Name, - request.ID}, "/")) - w.WriteHeader(http.StatusCreated) - err = json.NewEncoder(w).Encode(&StateMachineResponse{ - ID: request.ID, - StateMachine: fsm, - }) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} - -// ModifyStatemachineHandler handles PUT request and can be used to change an -// existing FSM to use a different configuration and, optionally, to change its state. -// Events history CANNOT be altered. -func ModifyStatemachineHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - vars := mux.Vars(r) - if vars == nil { - logger.Error("unexpected missing path parameters in Request URI: %s", - r.RequestURI) - http.Error(w, UnexpectedError.Error(), http.StatusMethodNotAllowed) - return - } - cfgName := vars["cfg_name"] - fsmId := vars["sm_id"] - - var request StateMachineChangeRequest - err := json.NewDecoder(r.Body).Decode(&request) - if err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - fsm, found := storeManager.GetStateMachine(fsmId, cfgName) - if !found { - http.Error(w, storage.NotFoundError(fsmId).Error(), http.StatusNotFound) - return - } - - if request.ConfigurationVersion != "" { - // If the Configuration is specified in the request, we assume - // that the caller wanted to update it. - configId := strings.Join([]string{cfgName, request.ConfigurationVersion}, storage.KeyPrefixComponentsSeparator) - logger.Debug("looking up Config [%s]", configId) - cfg, ok := storeManager.GetConfig(configId) - if !ok { - http.Error(w, "configuration not found", http.StatusNotFound) - return - } - logger.Debug("found configuration [%s]", cfg) - fsm.ConfigId = GetVersionId(cfg) - } - if request.CurrentState != "" && request.CurrentState != fsm.State { - logger.Debug("changing FSM state from [%s] to [%s]", fsm.State, request.CurrentState) - fsm.State = request.CurrentState - } - err = storeManager.PutStateMachine(fsmId, fsm) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - err = json.NewEncoder(w).Encode(&StateMachineResponse{ - ID: fsmId, - StateMachine: fsm, - }) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} - -func GetStatemachineHandler(w http.ResponseWriter, r *http.Request) { - defer trace(r.RequestURI)() - defaultContent(w) - - vars := mux.Vars(r) - if vars == nil { - logger.Error("unexpected missing path parameters in Request URI: %s", - r.RequestURI) - http.Error(w, UnexpectedError.Error(), http.StatusMethodNotAllowed) - return - } - cfgName := vars["cfg_name"] - smId := vars["sm_id"] - - logger.Debug("looking up FSM [%s]", storage.NewKeyForMachine(smId, cfgName)) - stateMachine, ok := storeManager.GetStateMachine(smId, cfgName) - if !ok { - http.Error(w, "FSM not found", http.StatusNotFound) - return - } - logger.Debug("found FSM in state '%s'", stateMachine.GetState()) - - err := json.NewEncoder(w).Encode(&StateMachineResponse{ - ID: smId, - StateMachine: stateMachine, - }) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } -} diff --git a/server/statemachine_handlers_test.go b/server/statemachine_handlers_test.go deleted file mode 100644 index 7664cda..0000000 --- a/server/statemachine_handlers_test.go +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "bytes" - "encoding/json" - log "github.com/massenz/slf4go/logging" - "google.golang.org/protobuf/types/known/timestamppb" - "io" - "net/http" - "net/http/httptest" - "strings" - - . "github.com/massenz/go-statemachine/api" - "github.com/massenz/go-statemachine/server" - "github.com/massenz/go-statemachine/storage" - - "github.com/massenz/statemachine-proto/golang/api" -) - -// ReaderFromRequest takes a request object and creates a Reader to be used -// as the body of the request. -func ReaderFromRequest(request interface{}) io.Reader { - jsonBytes, err := json.Marshal(request) - Expect(err).ToNot(HaveOccurred()) - return bytes.NewBuffer(jsonBytes) -} - -var _ = Describe("Statemachine Handlers", func() { - var ( - req *http.Request - writer *httptest.ResponseRecorder - store storage.StoreManager - - // NOTE: we are using the Router here as we need to correctly also parse - // the URI for path args (just using the router will not do that) - // The `router` can be safely set for all the test contexts, once and for all. - router = server.NewRouter() - ) - // Disabling verbose logging, as it pollutes test output; - // set it back to DEBUG when tests fail, and you need to - // diagnose the failure. - server.SetLogLevel(log.NONE) - - Context("when creating state machines", func() { - BeforeEach(func() { - writer = httptest.NewRecorder() - store = storage.NewInMemoryStore() - server.SetStore(store) - }) - Context("with a valid request", func() { - var request *server.StateMachineRequest - BeforeEach(func() { - request = &server.StateMachineRequest{ - ID: "test-machine", - Configuration: "test-config:v1", - } - config := &api.Configuration{ - Name: "test-config", - Version: "v1", - States: nil, - Transitions: nil, - StartingState: "start", - } - Expect(store.PutConfig(config)).ToNot(HaveOccurred()) - req = httptest.NewRequest(http.MethodPost, - strings.Join([]string{server.ApiPrefix, server.StatemachinesEndpoint}, "/"), - ReaderFromRequest(request)) - }) - It("should succeed", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - Expect(writer.Header().Get("Location")).To(Equal( - strings.Join([]string{server.ApiPrefix, server.StatemachinesEndpoint, - "test-config", "test-machine"}, "/"))) - response := server.StateMachineResponse{} - Expect(json.Unmarshal(writer.Body.Bytes(), &response)).ToNot(HaveOccurred()) - - Expect(response.ID).To(Equal("test-machine")) - Expect(response.StateMachine.ConfigId).To(Equal("test-config:v1")) - Expect(response.StateMachine.State).To(Equal("start")) - }) - It("should save it in the backing store", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - _, found := store.GetStateMachine("test-machine", "test-config") - Expect(found).To(BeTrue()) - }) - It("should store the correct data", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - fsm, found := store.GetStateMachine("test-machine", "test-config") - Expect(found).To(BeTrue()) - Expect(fsm).ToNot(BeNil()) - Expect(fsm.ConfigId).To(Equal("test-config:v1")) - Expect(fsm.State).To(Equal("start")) - }) - It("should return a Conflict error if the ID already exists", func() { - Expect(store.PutStateMachine(request.ID, &api.FiniteStateMachine{ - ConfigId: request.Configuration, - State: "start", - })).ToNot(HaveOccurred()) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusConflict)) - }) - }) - Context("without specifying an ID", func() { - BeforeEach(func() { - request := &server.StateMachineRequest{ - Configuration: "test-config:v1", - } - config := &api.Configuration{ - Name: "test-config", - Version: "v1", - States: nil, - Transitions: nil, - StartingState: "start", - } - Expect(store.PutConfig(config)).ToNot(HaveOccurred()) - req = httptest.NewRequest(http.MethodPost, - strings.Join([]string{server.ApiPrefix, server.StatemachinesEndpoint}, "/"), - ReaderFromRequest(request)) - }) - - It("should succeed with a newly assigned ID", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusCreated)) - location := writer.Header().Get("Location") - Expect(location).ToNot(BeEmpty()) - response := server.StateMachineResponse{} - Expect(json.Unmarshal(writer.Body.Bytes(), &response)).ToNot(HaveOccurred()) - - Expect(response.ID).ToNot(BeEmpty()) - - Expect(strings.HasSuffix(location, response.ID)).To(BeTrue()) - _, found := store.GetStateMachine(response.ID, "test-config") - Expect(found).To(BeTrue()) - }) - - }) - Context("with a non-existent configuration", func() { - BeforeEach(func() { - request := &server.StateMachineRequest{ - Configuration: "test-config:v2", - ID: "1234", - } - req = httptest.NewRequest(http.MethodPost, - strings.Join([]string{server.ApiPrefix, server.StatemachinesEndpoint}, "/"), - ReaderFromRequest(request)) - }) - It("should fail", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - location := writer.Header().Get("Location") - Expect(location).To(BeEmpty()) - response := server.StateMachineResponse{} - Expect(json.Unmarshal(writer.Body.Bytes(), &response)).To(HaveOccurred()) - _, found := store.GetConfig("1234") - Expect(found).To(BeFalse()) - }) - }) - }) - - Context("when modifying state machines", func() { - var configName string - var fsmId string - - BeforeEach(func() { - writer = httptest.NewRecorder() - store = storage.NewInMemoryStore() - server.SetStore(store) - }) - Context("with a valid request", func() { - var request *server.StateMachineChangeRequest - BeforeEach(func() { - configName = "test.config" - fsmId = "12345-abcdef" - request = &server.StateMachineChangeRequest{ - ConfigurationVersion: "v2", - CurrentState: "new-state", - } - config := &api.Configuration{ - Name: configName, - Version: "v1", - States: nil, - Transitions: nil, - StartingState: "old-state", - } - Expect(store.PutConfig(config)).ToNot(HaveOccurred()) - fsm := &api.FiniteStateMachine{ - ConfigId: GetVersionId(config), - State: config.StartingState, - History: []*api.Event{ - {Transition: &api.Transition{Event: "order_placed"}, Originator: ""}, - {Transition: &api.Transition{Event: "checked_out"}, Originator: ""}, - }, - } - Expect(store.PutStateMachine(fsmId, fsm)).ToNot(HaveOccurred()) - config.Version = request.ConfigurationVersion - Expect(store.PutConfig(config)).ToNot(HaveOccurred()) - req = httptest.NewRequest(http.MethodPut, - strings.Join([]string{ - server.ApiPrefix, server.StatemachinesEndpoint, configName, fsmId, - }, "/"), - ReaderFromRequest(request)) - }) - It("should succeed", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - response := server.StateMachineResponse{} - Expect(json.Unmarshal(writer.Body.Bytes(), &response)).ToNot(HaveOccurred()) - - Expect(response.ID).To(Equal(fsmId)) - Expect(response.StateMachine.ConfigId).To(Equal(configName + ":" + request.ConfigurationVersion)) - Expect(response.StateMachine.State).To(Equal(request.CurrentState)) - }) - It("should save it in the backing store", func() { - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - fsm, found := store.GetStateMachine(fsmId, configName) - Expect(found).To(BeTrue()) - Expect(fsm.State).To(Equal(request.CurrentState)) - Expect(fsm.ConfigId).To(Equal(configName + ":" + request.ConfigurationVersion)) - Expect(len(fsm.History)).To(Equal(2)) - }) - It("should return a NotFound if the FSM does not exist", func() { - req = httptest.NewRequest(http.MethodPut, - strings.Join([]string{ - server.ApiPrefix, server.StatemachinesEndpoint, configName, "fake-fsm", - }, "/"), - ReaderFromRequest(request)) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - - }) - It("should return a NotFound error if the Config does not exist", func() { - request = &server.StateMachineChangeRequest{ - ConfigurationVersion: "v8", - CurrentState: "fake-state", - } - req = httptest.NewRequest(http.MethodPut, - strings.Join([]string{ - server.ApiPrefix, server.StatemachinesEndpoint, configName, fsmId, - }, "/"), - ReaderFromRequest(request)) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("should fail gracefully with a malformed request", func() { - req = httptest.NewRequest(http.MethodPut, - strings.Join([]string{ - server.ApiPrefix, server.StatemachinesEndpoint, configName, fsmId, - }, "/"), - bytes.NewReader([]byte(`{"not": "my", "best": json}`))) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusBadRequest)) - }) - }) - }) - - Context("when retrieving a state machine", func() { - var id string - var fsm api.FiniteStateMachine - - BeforeEach(func() { - store = storage.NewInMemoryStore() - server.SetStore(store) - - writer = httptest.NewRecorder() - fsm = api.FiniteStateMachine{ - ConfigId: "order.card:v3", - State: "checkout", - History: []*api.Event{ - {Transition: &api.Transition{Event: "order_placed"}, Originator: ""}, - {Transition: &api.Transition{Event: "checked_out"}, Originator: ""}, - }, - } - id = "12345" - Expect(store.PutStateMachine(id, &fsm)).ToNot(HaveOccurred()) - }) - It("can be retrieved with a valid ID", func() { - store.SetLogLevel(log.NONE) - endpoint := strings.Join([]string{server.ApiPrefix, - server.StatemachinesEndpoint, "order.card", id}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - - var result server.StateMachineResponse - Expect(json.NewDecoder(writer.Body).Decode(&result)).ToNot(HaveOccurred()) - Expect(result.ID).To(Equal(id)) - sm := result.StateMachine - Expect(sm.ConfigId).To(Equal(fsm.ConfigId)) - Expect(sm.State).To(Equal(fsm.State)) - Expect(len(sm.History)).To(Equal(len(fsm.History))) - for n, t := range sm.History { - Expect(t.Transition.Event).To(Equal(fsm.History[n].Transition.Event)) - } - }) - It("with an invalid ID will return Not Found", func() { - endpoint := strings.Join([]string{server.ApiPrefix, - server.StatemachinesEndpoint, "foo"}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - It("with a missing ID will return Not Allowed", func() { - req = httptest.NewRequest(http.MethodGet, strings.Join([]string{server.ApiPrefix, - server.StatemachinesEndpoint}, "/"), nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusMethodNotAllowed)) - }) - It("with gibberish data will still fail gracefully", func() { - cfg := api.Configuration{} - Expect(store.PutConfig(&cfg)).ToNot(HaveOccurred()) - endpoint := strings.Join([]string{server.ApiPrefix, - server.StatemachinesEndpoint, "6789"}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusNotFound)) - }) - }) - - Context("when the statemachine has events", func() { - var store storage.StoreManager - var fsmId = "12345" - var config *api.Configuration - - BeforeEach(func() { - writer = httptest.NewRecorder() - store = storage.NewInMemoryStore() - server.SetStore(store) - config = &api.Configuration{ - Name: "car", - Version: "v1", - States: []string{"stopped", "running", "slowing"}, - Transitions: []*api.Transition{ - {From: "stopped", To: "running", Event: "start"}, - {From: "running", To: "slowing", Event: "brake"}, - {From: "slowing", To: "running", Event: "accelerate"}, - {From: "slowing", To: "stopped", Event: "stop"}, - }, - StartingState: "stopped", - } - car, _ := NewStateMachine(config) - Expect(store.PutConfig(config)).To(Succeed()) - Expect(store.PutStateMachine(fsmId, car.FSM)).To(Succeed()) - }) - It("it should show them", func() { - found, _ := store.GetStateMachine(fsmId, "car") - car := ConfiguredStateMachine{ - Config: config, - FSM: found, - } - Expect(car.SendEvent(&api.Event{ - EventId: "1", - Timestamp: timestamppb.Now(), - Transition: &api.Transition{Event: "start"}, - Originator: "test", - Details: "this is a test", - })).To(Succeed()) - Expect(car.SendEvent(&api.Event{ - EventId: "2", - Timestamp: timestamppb.Now(), - Transition: &api.Transition{Event: "brake"}, - Originator: "test", - Details: "a test is this not", - })).To(Succeed()) - Expect(store.PutStateMachine(fsmId, car.FSM)).To(Succeed()) - - endpoint := strings.Join([]string{server.ApiPrefix, server.StatemachinesEndpoint, - config.Name, fsmId}, "/") - req = httptest.NewRequest(http.MethodGet, endpoint, nil) - router.ServeHTTP(writer, req) - Expect(writer.Code).To(Equal(http.StatusOK)) - - var result server.StateMachineResponse - Expect(json.NewDecoder(writer.Body).Decode(&result)).To(Succeed()) - - Expect(result.ID).To(Equal(fsmId)) - Expect(result.StateMachine).ToNot(BeNil()) - fsm := result.StateMachine - Expect(fsm.State).To(Equal("slowing")) - Expect(len(fsm.History)).To(Equal(2)) - var history []*api.Event - history = fsm.History - event := history[0] - Expect(event.EventId).To(Equal("1")) - Expect(event.Originator).To(Equal("test")) - Expect(event.Transition.Event).To(Equal("start")) - Expect(event.Transition.From).To(Equal("stopped")) - Expect(event.Transition.To).To(Equal("running")) - Expect(event.Details).To(Equal("this is a test")) - event = history[1] - Expect(event.EventId).To(Equal("2")) - Expect(event.Transition.Event).To(Equal("brake")) - Expect(event.Transition.To).To(Equal("slowing")) - Expect(event.Details).To(Equal("a test is this not")) - }) - }) -}) diff --git a/server/types.go b/server/types.go deleted file mode 100644 index 8c449c5..0000000 --- a/server/types.go +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package server - -import ( - protos "github.com/massenz/statemachine-proto/golang/api" -) - -const ( - Authorization = "Authorization" - Bearer = "Bearer" - ContentType = "Content-Type" - ApplicationJson = "application/json" - AllContent = "*/*" - Html = "text/html" -) - -// MessageResponse is returned when a more appropriate response is not available. -type MessageResponse struct { - Msg interface{} `json:"message,omitempty"` - Error string `json:"error,omitempty"` -} - -// StateMachineRequest represents a request for a new FSM to be created, with an optional ID, -// and a reference to a fully qualified Configuration version. -// -// If the ID is not specified, a new UUID will be generated and returned. -// The Configuration is required and **must** match an existing Configuration full `name` and -// `version` (e.g., `orders:v2`) -type StateMachineRequest struct { - ID string `json:"id,omitempty"` - Configuration string `json:"configuration_version"` -} - -// StateMachineChangeRequest represents a request to modify (PUT)( an existing FSM. -// -// The ConfigurationVersion represents **only** the new `version` of the Configuration to be -// used (the `name` is passed in the API URI path). -// Both ConfigurationVersion and CurrentState are optional. -type StateMachineChangeRequest struct { - ConfigurationVersion string `json:"configuration_version,omitempty"` - CurrentState string `json:"current_state,omitempty"` -} - -// StateMachineResponse is returned when a new FSM is created, or as a response to a GET request -type StateMachineResponse struct { - ID string `json:"id"` - StateMachine *protos.FiniteStateMachine `json:"statemachine"` -} - -// EventResponse is returned as a response to a GET Event request -type EventResponse struct { - ID string `json:"id"` - Event *protos.Event `json:"event"` -} - -type OutcomeResponse struct { - StatusCode string `json:"status_code"` - Message string `json:"message"` - Destination string `json:"destination"` -} - -func MakeOutcomeResponse(outcome *protos.EventOutcome) *OutcomeResponse { - return &OutcomeResponse{ - StatusCode: outcome.Code.String(), - Message: outcome.Details, - Destination: outcome.Id, - } -} diff --git a/storage/memory_store.go b/storage/memory_store.go deleted file mode 100644 index b89ca35..0000000 --- a/storage/memory_store.go +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package storage - -import ( - "github.com/golang/protobuf/proto" - "github.com/massenz/go-statemachine/api" - slf4go "github.com/massenz/slf4go/logging" - "strings" - "sync" - "time" - - protos "github.com/massenz/statemachine-proto/golang/api" -) - -type InMemoryStore struct { - logger *slf4go.Log - mux sync.RWMutex - backingStore map[string][]byte -} - -func NewInMemoryStore() StoreManager { - return &InMemoryStore{ - backingStore: make(map[string][]byte), - logger: slf4go.NewLog("InMemoryStore"), - } -} - -func (csm *InMemoryStore) get(key string, value proto.Message) bool { - csm.mux.RLock() - defer csm.mux.RUnlock() - - bytes, ok := csm.backingStore[key] - csm.logger.Trace("key %s - Found: %t", key, ok) - if ok { - err := proto.Unmarshal(bytes, value) - if err != nil { - csm.logger.Error(err.Error()) - return false - } - } - return ok -} - -func (csm *InMemoryStore) put(key string, value proto.Message) error { - csm.mux.Lock() - defer csm.mux.Unlock() - - val, err := proto.Marshal(value) - if err == nil { - csm.logger.Trace("Storing key %s [%T]", key, value) - csm.backingStore[key] = val - } - return err -} - -func (csm *InMemoryStore) GetEvent(id string, cfg string) (*protos.Event, bool) { - key := NewKeyForEvent(id, cfg) - event := &protos.Event{} - return event, csm.get(key, event) -} - -func (csm *InMemoryStore) PutEvent(event *protos.Event, cfg string, ttl time.Duration) error { - key := NewKeyForEvent(event.EventId, cfg) - return csm.put(key, event) -} - -func (csm *InMemoryStore) AddEventOutcome(id string, cfg string, response *protos.EventOutcome, ttl time.Duration) error { - key := NewKeyForOutcome(id, cfg) - return csm.put(key, response) -} - -func (csm *InMemoryStore) GetOutcomeForEvent(id string, cfg string) (*protos.EventOutcome, bool) { - key := NewKeyForOutcome(id, cfg) - var outcome protos.EventOutcome - return &outcome, csm.get(key, &outcome) -} - -func (csm *InMemoryStore) GetConfig(id string) (cfg *protos.Configuration, ok bool) { - key := NewKeyForConfig(id) - csm.logger.Debug("Fetching Configuration [%s]", key) - cfg = &protos.Configuration{} - return cfg, csm.get(key, cfg) -} - -func (csm *InMemoryStore) PutConfig(cfg *protos.Configuration) error { - key := NewKeyForConfig(api.GetVersionId(cfg)) - if _, found := csm.backingStore[key]; found { - return AlreadyExistsError(key) - } - csm.logger.Debug("Storing Configuration [%s] with key: %s", api.GetVersionId(cfg), key) - return csm.put(key, cfg) -} - -func (csm *InMemoryStore) GetStateMachine(id string, cfg string) (*protos.FiniteStateMachine, bool) { - key := NewKeyForMachine(id, cfg) - csm.logger.Debug("Getting StateMachine [%s]", key) - var machine protos.FiniteStateMachine - if csm.get(key, &machine) { - csm.logger.Debug("Found StateMachine [%s] in state: %s", key, machine.State) - return &machine, true - } - csm.logger.Debug("Not found for key %s", key) - return nil, false -} - -func (csm *InMemoryStore) PutStateMachine(id string, machine *protos.FiniteStateMachine) error { - if machine == nil { - return IllegalStoreError(id) - } - key := NewKeyForMachine(id, strings.Split(machine.ConfigId, api.ConfigurationVersionSeparator)[0]) - csm.logger.Debug("Storing StateMachine [%s] with key: %s", id, key) - return csm.put(key, machine) -} - -func (csm *InMemoryStore) SetLogLevel(level slf4go.LogLevel) { - csm.logger.Level = level -} - -// SetTimeout does not really make sense for an in-memory store, so this is a no-op -func (csm *InMemoryStore) SetTimeout(_ time.Duration) { - // do nothing -} - -// GetTimeout does not really make sense for an in-memory store, -// so this just returns a NeverExpire constant. -func (csm *InMemoryStore) GetTimeout() time.Duration { - return NeverExpire -} - -func (csm *InMemoryStore) Health() error { - return nil -} - -func (csm *InMemoryStore) GetAllInState(cfg string, state string) []string { - // TODO [#33] Ability to query for all machines in a given state - csm.logger.Error(NotImplementedError("GetAllInState").Error()) - return nil -} - -func (csm *InMemoryStore) GetAllConfigs() []string { - // TODO [#33] Ability to query for all machines in a given state - csm.logger.Error(NotImplementedError("GetAllConfigs").Error()) - return nil -} - -func (csm *InMemoryStore) GetAllVersions(name string) []string { - // TODO [#33] Ability to query for all machines in a given state - csm.logger.Error(NotImplementedError("GetAllVersions").Error()) - return nil -} -func (csm *InMemoryStore) UpdateState(cfgName string, id string, oldState string, newState string) error { - // TODO [#33] Ability to query for all machines in a given state - csm.logger.Error(NotImplementedError("GetAllVersions").Error()) - return nil -} diff --git a/storage/memory_store_test.go b/storage/memory_store_test.go deleted file mode 100644 index 9a9f955..0000000 --- a/storage/memory_store_test.go +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2022 AlertAvert.com. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Author: Marco Massenzio (marco@alertavert.com) - */ - -package storage_test - -import ( - . "github.com/JiaYongfei/respect/gomega" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/massenz/go-statemachine/api" - "github.com/massenz/go-statemachine/storage" - protos "github.com/massenz/statemachine-proto/golang/api" -) - -var _ = Describe("InMemory Store", func() { - Context("for local testing", func() { - }) - Context("can be used to save and retrieve a Configuration", func() { - var store storage.StoreManager - var cfg *protos.Configuration - - BeforeEach(func() { - store = storage.NewInMemoryStore() - cfg = &protos.Configuration{ - Name: "my_conf", - Version: "v3", - StartingState: "start", - } - Expect(store.PutConfig(cfg)).ToNot(HaveOccurred()) - }) - It("can be created", func() { - Expect(store).ToNot(BeNil()) - }) - It("will give back the saved Configuration", func() { - found, ok := store.GetConfig(api.GetVersionId(cfg)) - Expect(ok).To(BeTrue()) - Expect(found).To(Respect(cfg)) - }) - It("will not allow to overwrite an existing config", func() { - Expect(store.PutConfig(&protos.Configuration{ - Name: "my_conf", - Version: "v3", - StartingState: "fake", - })).To(HaveOccurred()) - }) - It("will allow a different version", func() { - Expect(store.PutConfig(&protos.Configuration{ - Name: "my_conf", - Version: "v4", - StartingState: "fake", - })).ToNot(HaveOccurred()) - }) - }) - Context("can be used to save and retrieve a StateMachine", func() { - var store storage.StoreManager - var id string - var machine *protos.FiniteStateMachine - - BeforeEach(func() { - store = storage.NewInMemoryStore() - id = "1234" - machine = &protos.FiniteStateMachine{ - ConfigId: "test:v1", - State: "start", - History: nil, - } - Expect(store.PutStateMachine(id, machine)).ToNot(HaveOccurred()) - }) - It("will give it back unchanged", func() { - found, ok := store.GetStateMachine(id, "test") - Expect(ok).To(BeTrue()) - Expect(found).ToNot(BeNil()) - Expect(found.ConfigId).To(Equal(machine.ConfigId)) - Expect(found.History).To(Equal(machine.History)) - Expect(found.State).To(Equal(machine.State)) - }) - It("will return nil for a non-existent id", func() { - found, ok := store.GetStateMachine("fake", "test") - Expect(ok).To(BeFalse()) - Expect(found).To(BeNil()) - }) - It("will return an error for a nil FSM", func() { - machine.ConfigId = "missing" - Expect(store.PutStateMachine(id, nil)).To(HaveOccurred()) - }) - }) - Context("can be used to save and retrieve Events", func() { - var store = storage.NewInMemoryStore() - var id = "1234" - var event = &protos.Event{ - EventId: id, - Timestamp: timestamppb.Now(), - Transition: &protos.Transition{Event: "start"}, - Originator: "test", - Details: "some details", - } - BeforeEach(func() { - Expect(store.PutEvent(event, "test-cfg", storage.NeverExpire)).ToNot(HaveOccurred()) - }) - It("will give it back unchanged", func() { - found, ok := store.GetEvent(id, "test-cfg") - Expect(ok).To(BeTrue()) - Expect(found).ToNot(BeNil()) - Expect(found).To(Respect(event)) - }) - It("will return false for a non-existent id", func() { - _, ok := store.GetEvent("fake", "test-cfg") - Expect(ok).To(BeFalse()) - }) - }) -}) From 3270579ef54809ca5fe342939d87a7620bfe0d2c Mon Sep 17 00:00:00 2001 From: Marco Massenzio Date: Sat, 25 Feb 2023 19:11:50 -0800 Subject: [PATCH 9/9] Bumped Testcontainers to 0.18.0 --- go.mod | 5 ++--- go.sum | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index b204899..fa4f70f 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,11 @@ require ( github.com/go-redis/redis/v8 v8.11.5 github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 - github.com/gorilla/mux v1.8.0 github.com/massenz/slf4go v0.3.2-g4eb5504 github.com/massenz/statemachine-proto/golang v1.1.0-beta-g1fc5dd8 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.18.1 - github.com/testcontainers/testcontainers-go v0.17.0 + github.com/testcontainers/testcontainers-go v0.18.0 google.golang.org/grpc v1.51.0 google.golang.org/protobuf v1.28.1 ) @@ -26,7 +25,7 @@ require ( github.com/containerd/containerd v1.6.18 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.20+incompatible // indirect + github.com/docker/docker v23.0.0+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/go.sum b/go.sum index 47e09ae..8474dc4 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,6 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -180,8 +178,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/testcontainers/testcontainers-go v0.17.0 h1:UdKSw2DJXinlS6ijbFb4VHpQzD+EfTwcTq1/19a+8PU= -github.com/testcontainers/testcontainers-go v0.17.0/go.mod h1:n5trpHrB68IUelEqGNC8VipaCo6jOGusU44kIK11XRs= +github.com/testcontainers/testcontainers-go v0.18.0 h1:8RXrcIQv5xX/uBOSmZd297gzvA7F0yuRA37/918o7Yg= +github.com/testcontainers/testcontainers-go v0.18.0/go.mod h1:rLC7hR2SWRjJZZNrUYiTKvUXCziNxzZiYtz9icTWYNQ= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=