diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..bee8a64
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+__pycache__
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
new file mode 100644
index 0000000..4c3a3c8
--- /dev/null
+++ b/.github/workflows/pr-test.yml
@@ -0,0 +1,48 @@
+name: pr-test
+
+# 1. Runs tests
+# 2. Upload coverage
+
+on:
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up Docker Buildx
+ id: buildx
+ uses: docker/setup-buildx-action@v1
+ with:
+ install: true
+
+ - name: Bring up DBs
+ run: docker-compose -f docker-compose.db.yml up -d
+
+ - name: Run unit tests
+ run: cd src && go test -v -covermode=atomic -coverprofile=coverage.out ./...
+
+ - uses: codecov/codecov-action@v2
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: ./coverage.out
+ flags: unit
+ fail_ci_if_error: true
+
+ - name: Bring up stack
+ run: make up
+
+ - name: Run integration tests
+ run: cd tests && go test -v -covermode=atomic -coverprofile=coverage.out ./...
+
+ - uses: codecov/codecov-action@v2
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: ./coverage.out
+ flags: integration
+ fail_ci_if_error: true
diff --git a/.github/workflows/push-chart.yml b/.github/workflows/push-chart.yml
new file mode 100644
index 0000000..8971830
--- /dev/null
+++ b/.github/workflows/push-chart.yml
@@ -0,0 +1,49 @@
+name: push-chart
+
+# 1. Run unit and integration tests on chart
+# 2. Release the chart
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'chart/**'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Setup Minikube
+ uses: manusa/actions-setup-minikube@v2.3.1
+ with:
+ minikube version: 'v1.16.0'
+ kubernetes version: 'v1.19.2'
+
+ - name: Test
+ run: |
+ sudo apt-get -y install socat
+ export KUBE_CONFIG_PATH=$HOME/.kube/config
+ cd chart/test
+ go test .
+ cd ../..
+
+ - name: Configure Git
+ run: |
+ git config user.name "geometrybot"
+ git config user.email "geometrybot@users.noreply.github.com"
+
+ - name: Install Helm
+ uses: azure/setup-helm@v1
+ with:
+ version: v3.4.0
+
+ - name: Run chart-releaser
+ uses: helm/chart-releaser-action@v1.2.1
+ env:
+ CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml
new file mode 100644
index 0000000..8cdb29f
--- /dev/null
+++ b/.github/workflows/push-main.yml
@@ -0,0 +1,145 @@
+name: push-main
+
+# 1. Run unit and integration tests
+# 2. Push containers to AWS ECR with tag based on incrementing build number
+# 3. Recommit an update to the chart's deployments with the updated build number in the `deployment` branch
+
+on:
+ push:
+ branches:
+ - main
+ paths-ignore:
+ - 'chart/**'
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Install deps
+ run: |
+ pip3 install -r requirements_api.txt -r requirements_worker.txt -r requirements_dev.txt
+ pip3 install --upgrade protobuf
+
+ - name: Bring up stack
+ run: make up-dbs && sleep 30
+
+ - name: Check stack
+ run: make ps
+
+ - name: Run tests with coverage
+ run: make test-coverage
+
+ - uses: codecov/codecov-action@v2
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: ./.coverage
+ fail_ci_if_error: true
+
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v1
+ with:
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_WORKER }}
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_WORKER }}
+ aws-region: us-west-2
+
+ - name: Login to Amazon ECR
+ id: login-ecr-worker
+ uses: aws-actions/amazon-ecr-login@v1
+
+ - name: Worker - Build, tag, and push image to Amazon ECR
+ env:
+ ECR_REGISTRY: ${{ steps.login-ecr-worker.outputs.registry }}
+ ECR_REPOSITORY: icon-metrics-worker
+ IMAGE_TAG: ${{ github.run_number }}
+ run: |
+ docker build --target prod --build-arg SERVICE_NAME=worker -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
+
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v1
+ with:
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_API }}
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_API }}
+ aws-region: us-west-2
+
+ - name: Login to Amazon ECR
+ id: login-ecr-api
+ uses: aws-actions/amazon-ecr-login@v1
+
+ - name: API - Build, tag, and push image to Amazon ECR
+ env:
+ ECR_REGISTRY: ${{ steps.login-ecr-api.outputs.registry }}
+ ECR_REPOSITORY: icon-metrics-api
+ IMAGE_TAG: ${{ github.run_number }}
+ run: |
+ docker build --target prod --build-arg SERVICE_NAME=api -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
+
+ - name: Merge main -> deployment-dev
+ uses: devmasx/merge-branch@v1.3.1
+ with:
+ type: now
+ from_branch: main
+ target_branch: deployment-dev
+ github_token: ${{ github.token }}
+
+ - name: Checkout dev deployment
+ uses: actions/checkout@v2
+ with:
+ ref: deployment-dev
+ path: deployment-dev
+
+ - name: Update dev-mainnet deployment values file (API) and re-commit
+ uses: fjogeleit/yaml-update-action@master
+ with:
+ valueFile: 'chart/deployments/dev-mainnet/values.dev.yaml'
+ propertyPath: 'api.image.tag'
+ value: ${{ github.run_number }}
+ branch: deployment-dev
+ createPR: 'false'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ updateFile: true
+ commitChange: false
+ workDir: deployment-dev
+
+ - name: Update dev-mainnet deployment values file (WORKER) and re-commit
+ uses: fjogeleit/yaml-update-action@master
+ with:
+ valueFile: 'chart/deployments/dev-mainnet/values.dev.yaml'
+ propertyPath: 'worker.image.tag'
+ value: ${{ github.run_number }}
+ branch: deployment-dev
+ createPR: 'false'
+ message: 'Update dev deployment (mainnet) image versions to ${{ github.run_number }}'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ updateFile: true
+ workDir: deployment-dev
+
+# - name: Update dev-mainnet deployment values file (API) and re-commit
+# uses: fjogeleit/yaml-update-action@master
+# with:
+# valueFile: 'chart/deployments/dev-sejong/values.dev.yaml'
+# propertyPath: 'api.image.tag'
+# value: ${{ github.run_number }}
+# branch: deployment-dev
+# createPR: 'false'
+# token: ${{ secrets.GITHUB_TOKEN }}
+# updateFile: true
+# commitChange: false
+# workDir: deployment-dev
+#
+# - name: Update dev-mainnet deployment values file (WORKER) and re-commit
+# uses: fjogeleit/yaml-update-action@master
+# with:
+# valueFile: 'chart/deployments/dev-sejong/values.dev.yaml'
+# propertyPath: 'worker.image.tag'
+# value: ${{ github.run_number }}
+# branch: deployment-dev
+# createPR: 'false'
+# message: 'Update dev deployment (sejong) image versions to ${{ github.run_number }}'
+# token: ${{ secrets.GITHUB_TOKEN }}
+# updateFile: true
+# workDir: deployment-dev
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..23b7276
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,164 @@
+name: release
+
+# 1. Run unit and integration tests
+# 2. Push containers to AWS ECR and dockerhub tagged with release
+# 3. Recommit an update to the chart's deployments with the updated build number in the `deployment` branch
+
+on:
+ release:
+ tags:
+ - "v*.*.*"
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Install deps
+ run: |
+ pip3 install -r requirements_api.txt -r requirements_worker.txt -r requirements_dev.txt
+ pip3 install --upgrade protobuf
+
+ - name: Tag name
+ id: source
+ run: |
+ echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
+
+ - name: Bring up DBs
+ run: docker-compose -f docker-compose.db.yml up -d
+
+ - name: Run unit tests
+ run: cd src && go test ./... -v
+
+ - name: Bring up stack
+ run: make up
+
+ - name: Run integration tests
+ run: cd tests && go test ./... -v
+
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v1
+ with:
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_WORKER }}
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_WORKER }}
+ aws-region: us-west-2
+
+ - name: Login to Amazon ECR
+ id: login-ecr-worker
+ uses: aws-actions/amazon-ecr-login@v1
+
+ - name: Tag name
+ id: source
+ run: |
+ echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
+
+ - name: Worker - Build, tag, and push image to Amazon ECR
+ env:
+ ECR_REGISTRY: ${{ steps.login-ecr-worker.outputs.registry }}
+ ECR_REPOSITORY: icon-metrics-worker
+ IMAGE_TAG: ${{ steps.source.outputs.TAG }}
+ run: |
+ docker build --target prod --build-arg SERVICE_NAME=worker -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
+
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v1
+ with:
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_API }}
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_API }}
+ aws-region: us-west-2
+
+ - name: Login to Amazon ECR
+ id: login-ecr-api
+ uses: aws-actions/amazon-ecr-login@v1
+
+ - name: API - Build, tag, and push image to Amazon ECR
+ env:
+ ECR_REGISTRY: ${{ steps.login-ecr-api.outputs.registry }}
+ ECR_REPOSITORY: icon-metrics-api
+ IMAGE_TAG: ${{ steps.source.outputs.TAG }}
+ run: |
+ docker build --target prod --build-arg SERVICE_NAME=api -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
+
+ - name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
+
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ build-args:
+ - SERVICE_NAME=api
+ file: ./Dockerfile
+ target: prod
+ push: true
+ tags: |
+ geometrylabs/icon-metrics-api:latest
+ geometrylabs/icon-metrics-api:${{ steps.source.outputs.TAG }}
+
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ build-args:
+ - SERVICE_NAME=worker
+ file: ./Dockerfile
+ target: prod
+ push: true
+ tags: |
+ geometrylabs/icon-metrics-worker:latest
+ geometrylabs/icon-metrics-worker:${{ steps.source.outputs.TAG }}
+
+ - name: Update dev-mainnet deployment values file (API) and re-commit
+ uses: fjogeleit/yaml-update-action@master
+ with:
+ valueFile: 'chart/deployments/dev-mainnet/values.dev.yaml'
+ propertyPath: 'api.image.tag'
+ value: ${{ github.run_number }}
+ branch: deployment
+ targetBranch: main
+ createPR: 'false'
+ message: 'Update prod deployment (API) image version to ${{ github.run_number }}'
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Update dev-mainnet deployment values file (WORKER) and re-commit
+ uses: fjogeleit/yaml-update-action@master
+ with:
+ valueFile: 'chart/deployments/dev-mainnet/values.dev.yaml'
+ propertyPath: 'worker.image.tag'
+ value: ${{ github.run_number }}
+ branch: deployment
+ targetBranch: main
+ createPR: 'false'
+ message: 'Update prod deployment (WORKER) image version to ${{ github.run_number }}'
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Update dev-mainnet deployment values file (API) and re-commit
+ uses: fjogeleit/yaml-update-action@master
+ with:
+ valueFile: 'chart/deployments/dev-sejong/values.dev.yaml'
+ propertyPath: 'api.image.tag'
+ value: ${{ github.run_number }}
+ branch: deployment
+ targetBranch: main
+ createPR: 'false'
+ message: 'Update prod deployment (API) image version to ${{ github.run_number }}'
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Update dev-mainnet deployment values file (WORKER) and re-commit
+ uses: fjogeleit/yaml-update-action@master
+ with:
+ valueFile: 'chart/deployments/dev-sejong/values.dev.yaml'
+ propertyPath: 'worker.image.tag'
+ value: ${{ github.run_number }}
+ branch: deployment
+ targetBranch: main
+ createPR: 'false'
+ message: 'Update prod deployment (WORKER) image version to ${{ github.run_number }}'
+ token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..abc329b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,55 @@
+
+.idea/
+.vscode/
+
+vaults_common
+
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+
+# dotenv
+.env
+
+# virtualenv
+.venv
+venv/
+ENV/
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..2f0bbb7
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,19 @@
+repos:
+ - repo: https://github.com/timothycrosley/isort
+ rev: 5.7.0
+ hooks:
+ - id: isort
+ args: ["--profile", "black"]
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v3.4.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - repo: https://github.com/ambv/black
+ rev: 20.8b1
+ hooks:
+ - id: black
+ args:
+ - --safe
+ - --line-length
+ - "100"
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..a865e63
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+FROM python:3.9-slim-buster as base
+
+ARG SERVICE_NAME
+ENV SERVICE_NAME ${SERVICE_NAME:-api}
+
+# GO ENV VARS
+ENV PYTHONDONTWRITEBYTECODE 1
+ENV PYTHONUNBUFFERED 1
+ENV PYTHONPATH="/opt:${PYTHONPATH}"
+
+WORKDIR /opt
+
+RUN apt-get update \
+ && apt-get -y install gcc netcat net-tools \
+ && apt-get clean
+
+RUN pip install --upgrade pip
+COPY ./requirements_$SERVICE_NAME.txt .
+RUN pip install -r ./requirements_$SERVICE_NAME.txt
+
+COPY icon_metrics ./icon_metrics
+
+FROM base as test
+
+FROM base as prod
+COPY entrypoint.sh ./
+RUN chmod +x entrypoint.sh
+ENTRYPOINT ./entrypoint.sh $SERVICE_NAME
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..928eaa2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,48 @@
+.PHONY: test help
+
+test: up-dbs test-unit test-integration
+
+up-dbs: ## Bring up the DBs
+ docker-compose -f docker-compose.db.yml up -d
+ sleep 5
+ cd icon_metrics && PYTHONPATH=$PYTHONPATH:`pwd`/.. alembic upgrade head
+
+down-dbs: ## Take down the DBs
+ docker-compose -f docker-compose.db.yml down
+
+test-unit: ## Run unit tests
+ python3 -m pytest tests/unit
+
+test-integration: ## Run integration tests - Need DB compose up
+ python3 -m pytest tests/integration
+
+test-coverage: ## Run unit tests - Need DB compose up
+ PYTHONPATH=$PYTHONPATH:`pwd` pytest --cov=icon_metrics tests/integration
+ PYTHONPATH=$PYTHONPATH:`pwd` pytest --cov=icon_metrics --cov-append tests/unit
+
+up: ## Bring everything up as containers
+ docker-compose -f docker-compose.db.yml -f docker-compose.yml up -d
+
+down: ## Take down all the containers
+ docker-compose -f docker-compose.db.yml -f docker-compose.yml down
+
+clean:
+ docker volume rm $(docker volume ls -q)
+
+build: ## Build everything
+ docker-compose build
+
+build-api: ## Build the api
+ docker-compose build blocks-api
+
+build-worker: ## Build the worker
+ docker-compose build blocks-worker
+
+ps: ## List all containers and running status
+ docker-compose -f docker-compose.db.yml -f docker-compose.yml ps
+
+postgres-console: ## Start postgres terminal
+ docker-compose -f docker-compose.db.yml -f docker-compose.yml exec postgres psql -U postgres
+
+help:
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ef3e66d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,49 @@
+
+
ICON Governance Service
+
+
+[![loopchain](https://img.shields.io/badge/ICON-API-blue?logoColor=white&logo=icon&labelColor=31B8BB)](https://shields.io) [![GitHub Release](https://img.shields.io/github/release/geometry-labs/icon-metrics.svg?style=flat)]() ![](https://github.com/geometry-labs/icon-metrics/workflows/push-main/badge.svg?branch=main) [![codecov](https://codecov.io/gh/geometry-labs/icon-metrics/branch/main/graph/badge.svg)](https://codecov.io/gh/geometry-labs/icon-metrics) ![](https://img.shields.io/docker/pulls/geometrylabs/icon-metrics-api.svg) ![](https://img.shields.io/github/license/geometry-labs/icon-metrics)
+
+Off chain indexer for the ICON Blockchain serving **metrics** for the [icon-explorer](https://github.com/geometry-labs/icon-explorer). Service is broken up into API and worker components that are run as individual docker containers. Events are derived from various bespoke JSON RPC / REST calls against the nodes across the ecosystem and persisted in a postgres database.
+
+### Endpoints
+
+TODO: Links and table
+
+### Deployment
+
+Service can be run in the following ways:
+
+1. Independently from this repo with docker compose:
+```bash
+docker-compose -f docker-compose.db.yml -f docker-compose.yml up -d
+# Or alternatively
+make up
+```
+
+2. With the whole stack from the main [icon-explorer]() repo.
+
+3. With the helm chart.
+
+**Please note this is for advanced users who are capable of setting external DBs / Strimzi and configuring them properly.**
+
+TODO:
+
+```bash
+helm add
+helm install
+```
+
+Run `make help` for more options.
+
+### Development
+
+For local development, you will want to run the `docker-compose.db.yml` as you develop. To run the tests,
+
+```bash
+make test
+```
+
+### License
+
+Apache 2.0
diff --git a/chart/.helmignore b/chart/.helmignore
new file mode 100644
index 0000000..f82e96d
--- /dev/null
+++ b/chart/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/chart/Chart.yaml b/chart/Chart.yaml
new file mode 100644
index 0000000..57e7810
--- /dev/null
+++ b/chart/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: icon-metrics
+description: Chart to ICON Blockchain Contracts Service
+type: application
+version: 0.0.1
+appVersion: 0.1.0
diff --git a/chart/deployments/dev-mainnet/secrets.dev.yaml b/chart/deployments/dev-mainnet/secrets.dev.yaml
new file mode 100644
index 0000000..b84ec58
--- /dev/null
+++ b/chart/deployments/dev-mainnet/secrets.dev.yaml
@@ -0,0 +1,31 @@
+api:
+ db:
+ user: ENC[AES256_GCM,data:/V6KXqIM/RaPK2Hq,iv:Zk8MEBWWhedM/ZwJVXHYTSN0QAHteqJjskYAupQrD4c=,tag:z1HE8GOf48L6RLWVTqckaA==,type:str]
+ password: ENC[AES256_GCM,data:Za+IJ34ySkSOuPs3c33wx3quZUpyLITtF78F8wtTTPfwACp93PQUoooRL7BpFdnh7BVx8b/se2LcCT+VIu7WWg==,iv:PuIsghBdXPxxodnNE74tH/m6x0Hc+Zn7T6cB3nQGWeQ=,tag:lvep7tMXt1HiJ9g9M0MqEA==,type:str]
+ host: ENC[AES256_GCM,data:RgPLUsrkz/ReqIsYi38QB50WkhPq1FqJN/s/5PqKZlh9H+Kjba1zwU+5pg==,iv:Qna9OJk9sE/92LeMyoES6oFeDpVUPY/Krt/s9/qrgcw=,tag:FXQjvnhrYfV4eU4fPE1MWA==,type:str]
+worker:
+ db:
+ user: ENC[AES256_GCM,data:dZ+zPRD/aidM9UQC,iv:EElU/ZG6AKZBdkcDhvoWBQKZW1gd7+p7pPeOCpPbYe0=,tag:jW5eX4/agyRDmm4zXS/l1g==,type:str]
+ password: ENC[AES256_GCM,data:uhWxN8dozupZjULMWK0GZcrs61vU7BLu2UVwm9V8L6AnEEE6JuL3Z2iWWGxEu9pRQnN0XGrzS3ak50sYW5LCgg==,iv:wqnomM1nLZp/kQQXSJ1KXzdcY1y2biTEpq/plu1AkAk=,tag:2Gmys9VtpQXPtUQxI5TLvA==,type:str]
+ host: ENC[AES256_GCM,data:+NqHwhObArpbgEmhZIP0QH5qhSJIy956wNIiLWy+nOvx7rQFkvw=,iv:hVzCe4tFXshM2nI7XBaYcfGEdwQSQhHu1r0O1xm+Exg=,tag:dqUZvoqJAFARV0mmqTnndw==,type:str]
+kafka:
+ kafkaBrokerURL: ENC[AES256_GCM,data:xKLUH/foF/lzWNeZpQU97Fs0LU0K3kSEteLVwhglhXtwV5a9KrWMDDOxR2jQbFv1tORGzPA7oi8=,iv:Z8NAM3roRvMaDttqxbfiSJ5qXYjGbItKf0A4PiF1DFU=,tag:hCpVcxmOYJ0mSXnZWAWWgw==,type:str]
+ schemaRegistryURL: ENC[AES256_GCM,data:oQKw6cPSST6v0Xey5Im0fB5q3fzTYi+xdz8mAf1VpnocBi33soNLdZw5y8zKoSePP1l8Tf5S0PaXhMgVZw==,iv:pc8E0ZJgUJduz3t+q6kY9r+KrO5DUogc8SkDu78qRS8=,tag:izuTqnMX6IdMwLp5j92YxQ==,type:str]
+db:
+ name: ENC[AES256_GCM,data:SP43CwaT7MNaig==,iv:vFxjk22pgh2CExJcE7nwyEeMSypnpFLOVLbCTYI5qRA=,tag:+exO+Xo2rCipuEbyIKTqdw==,type:str]
+sops:
+ kms: []
+ gcp_kms: []
+ azure_kv: []
+ hc_vault:
+ - vault_address: https://vault.geometry-dev.net:8200
+ engine_path: sops
+ key_name: dev-us-west-2
+ created_at: "2021-07-23T01:22:05Z"
+ enc: vault:v1:kCwzP+5EAzPIP6uVN6ZeGCE8JkrPTECXE9OK3F9iytH6qp6S9p2fu+DzrDJzZ9fYpOBYpBS4xUiELEC0K/9R1rAp+8mbGTltaCrN4RaYgSZcgdf72IltPE3mU8ShGqhZ9sZka678FEEFZd+oFDbEbgpLIROF4YwZVo++Xs4YNbJPXZaaE4X7XlnD5UPdvGxc55L0DlqxICa5Iqc8HgvCKdAUM5rqYzabLjq7T0Nzj1qLm4J8xOnYBUwRBVcnLV1xoVKMvAxdV/LY5xufDXIhpvZY8GsVd/KnEW6puXtu1Zp4fRFcEbldiUORJC+eYl5n3J8hEf3vzWhZpBRT1GtjTytDUOuoidxLEDYcIRfPixaN1O7TkLbLrMJAIPRyjTDp9OXKBq9X6I4lqwZd3mL+JOIiWvZQ4nXJlIjuaGVaJ0Hyq6hRizZPEuPxDWa6Kgeno7ovoeKcE1BzB7nxkD1zcm98hmqXLDFF+jW8axfJ1vQ832e5nSkfWsvgeDNlwDm9GCFHNvw+Z7jAVJGglzxwnYerEKueTW7VME/Y+InalWY3D4Q62dpirxTlTJNAR4KK4KLAH+7HuPQY1ixvXgX7Eb1BytU7fsCyUbYfucvO8Ycol62CcBQ8pDdk4sbkxpV5wdxGBC1JgRuCIA9Q8NzAjYWCFqv/U+fUjmAlp0pKBPc=
+ age: []
+ lastmodified: "2021-10-05T06:25:04Z"
+ mac: ENC[AES256_GCM,data:NqjOzawO8lqML3z32HEuBqmq0Lro8HELTbkOA6XVChdzAVzG2Dk4MFnSoj3nS+0EXaJco0g4786qpxHErGvRsR5igU3MmfzVBgMlWrBBX8yttSVrr6PkbP6jQ5QLTYyj63M7ucNShkFO4B48/Ks/0lJsYEQreaofNMuF0etj7rc=,iv:lhk3bsS3B32ETfznck4Q3VHiftkdMmE8d9xSkFobN8Q=,tag:Ai5cR672Zv4k8xEFvW5wyg==,type:str]
+ pgp: []
+ unencrypted_suffix: _unencrypted
+ version: 3.7.1
diff --git a/chart/deployments/dev-mainnet/values.dev.yaml b/chart/deployments/dev-mainnet/values.dev.yaml
new file mode 100644
index 0000000..c2b67c4
--- /dev/null
+++ b/chart/deployments/dev-mainnet/values.dev.yaml
@@ -0,0 +1,28 @@
+ingress:
+ enabled: false
+api:
+ image:
+ tag: '7'
+ annotations: |
+ "consul.hashicorp.com/connect-inject": "true"
+ "consul.hashicorp.com/transparent-proxy": "false"
+ "geometrylabs.io/logging": "true"
+ "prometheus.io/scrape": "true"
+ "prometheus.io/port": "9400"
+ kafka:
+ topics:
+ blocks: blocks-raw
+ transactions: transactions-raw
+ logs: logs-raw
+worker:
+ annotations: |
+ "geometrylabs.io/logging": "true"
+ "prometheus.io/scrape": "true"
+ "prometheus.io/port": "9400"
+ image:
+ tag: '7'
+ kafka:
+ topics:
+ blocks: blocks-raw
+ transactions: transactions-raw
+ logs: logs-raw
diff --git a/chart/deployments/test/values.test.yaml b/chart/deployments/test/values.test.yaml
new file mode 100644
index 0000000..840c915
--- /dev/null
+++ b/chart/deployments/test/values.test.yaml
@@ -0,0 +1,3 @@
+deployment:
+ image:
+ repository: icon-metrics
diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl
new file mode 100644
index 0000000..6398a11
--- /dev/null
+++ b/chart/templates/_helpers.tpl
@@ -0,0 +1,55 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+*/}}
+{{- define "fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "labels" -}}
+helm.sh/chart: {{ include "chart" . }}
+{{ include "selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+
+{{/*
+Selector labels
+*/}}
+{{- define "selectorLabels" -}}
+app.kubernetes.io/name: {{ include "name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+
+{{/*{{- define "postgresDatabaseName" -}}*/}}
+{{/*{{- default .Chart.Name .Values.name | trunc 63 | trimSuffix "-" -}}*/}}
+{{/*{{- end }}*/}}
diff --git a/chart/templates/deployment-api.yaml b/chart/templates/deployment-api.yaml
new file mode 100644
index 0000000..dcf1074
--- /dev/null
+++ b/chart/templates/deployment-api.yaml
@@ -0,0 +1,99 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ .Release.Name }}-api
+ labels:
+{{ include "labels" . | indent 6 }}
+spec:
+ selector:
+ matchLabels:
+{{ include "selectorLabels" . | indent 6 }}
+ replicas: {{ .Values.api.replicas }}
+ template:
+ metadata:
+ {{- if .Values.api.annotations }}
+ annotations:
+{{ tpl .Values.api.annotations . | indent 8 }}
+ {{- end }}
+ labels:
+{{ include "labels" . | indent 8 }}
+ spec:
+ {{- if .Values.api.affinity }}
+ affinity:
+ {{ tpl .Values.api.affinity . | nindent 8 | trim }}
+ {{- end }}
+ {{- if .Values.api.tolerations }}
+ tolerations:
+ {{ tpl .Values.api.tolerations . | nindent 8 | trim }}
+ {{- end }}
+ {{- if .Values.api.priorityClassName }}
+ priorityClassName: {{ .Values.api.priorityClassName | quote }}
+ {{- end }}
+ containers:
+ - name: {{ .Chart.Name }}-api
+ image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}"
+ imagePullPolicy: {{ .Values.api.image.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.api.internal.port }}
+ - containerPort: {{ .Values.api.health.port }}
+ livenessProbe:
+ httpGet:
+ path: {{ .Values.api.health.prefix }}
+ port: {{ .Values.api.health.port }}
+ initialDelaySeconds: 60
+ readinessProbe:
+ httpGet:
+ path: {{ .Values.api.health.prefix }}
+ port: {{ .Values.api.health.port }}
+ initialDelaySeconds: 60
+ env:
+ - name: NAME
+ value: {{ .Values.networkName }}
+ - name: NETWORK_NAME
+ value: {{ .Values.networkName }}
+ - name: PORT
+ value: {{ .Values.api.internal.port | quote }}
+ - name: HEALTH_PORT
+ value: {{ .Values.api.health.port | quote }}
+ - name: METRICS_PORT
+ value: {{ .Values.api.metrics.port | quote }}
+ - name: REST_PREFIX
+ value: {{ .Values.api.rest.prefix }}
+ - name: HEALTH_PREFIX
+ value: {{ .Values.api.health.prefix }}
+ - name: METRICS_PREFIX
+ value: {{ .Values.api.metrics.prefix }}
+ - name: HEALTH_POLLING_INTERVAL
+ value: {{ .Values.api.health.pollingInterval | quote }}
+ - name: LOG_LEVEL
+ value: {{ .Values.api.logging.level }}
+ - name: LOG_TO_FILE
+ value: {{ .Values.api.logging.toFile | quote }}
+ - name: LOG_FILE_NAME
+ value: {{ .Values.api.logging.filename }}
+ - name: LOG_FORMAT
+ value: {{ .Values.api.logging.format }}
+ - name: POSTGRES_USER
+ value: {{ .Values.api.db.user }}
+ - name: POSTGRES_SERVER
+ value: {{ .Values.api.db.host }}
+ - name: POSTGRES_PORT
+ value: {{ .Values.api.db.port | quote }}
+ - name: POSTGRES_DATABASE
+ value: {{ .Values.api.db.database }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.name }}-pg-api-password
+ key: postgresPassword
+ resources:
+ requests:
+ cpu: {{ .Values.api.resources.requests.cpu }}
+ memory: {{ .Values.api.resources.requests.memory }}
+ limits:
+ cpu: {{ .Values.api.resources.limits.cpu }}
+ memory: {{ .Values.api.resources.limits.memory }}
+ {{- if .Values.api.nodeSelector }}
+ nodeSelector:
+ {{ tpl .Values.api.nodeSelector . | indent 8 | trim }}
+ {{- end }}
diff --git a/chart/templates/deployment-worker.yaml b/chart/templates/deployment-worker.yaml
new file mode 100644
index 0000000..65f21f2
--- /dev/null
+++ b/chart/templates/deployment-worker.yaml
@@ -0,0 +1,110 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ .Release.Name }}-worker
+ labels:
+{{ include "labels" . | indent 6 }}
+spec:
+ selector:
+ matchLabels:
+{{ include "selectorLabels" . | indent 6 }}
+ replicas: {{ .Values.worker.replicas }}
+ template:
+ metadata:
+ {{- if .Values.worker.annotations }}
+ annotations:
+{{ tpl .Values.worker.annotations . | indent 8 }}
+ {{- end }}
+ labels:
+{{ include "labels" . | indent 8 }}
+ spec:
+ {{- if .Values.worker.affinity }}
+ affinity:
+ {{ tpl .Values.worker.affinity . | nindent 8 | trim }}
+ {{- end }}
+ {{- if .Values.worker.tolerations }}
+ tolerations:
+ {{ tpl .Values.worker.tolerations . | nindent 8 | trim }}
+ {{- end }}
+ {{- if .Values.worker.priorityClassName }}
+ priorityClassName: {{ .Values.worker.priorityClassName | quote }}
+ {{- end }}
+ containers:
+ - name: {{ .Chart.Name }}-worker
+ image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag }}"
+ imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
+{{/* ports:*/}}
+{{/* - containerPort: {{ .Values.api.health.port }}*/}}
+{{/* livenessProbe:*/}}
+{{/* httpGet:*/}}
+{{/* path: {{ .Values.worker.health.prefix }}*/}}
+{{/* port: {{ .Values.worker.health.port }}*/}}
+{{/* initialDelaySeconds: 60*/}}
+{{/* readinessProbe:*/}}
+{{/* httpGet:*/}}
+{{/* path: {{ .Values.worker.health.prefix }}*/}}
+{{/* port: {{ .Values.worker.health.port }}*/}}
+{{/* initialDelaySeconds: 60*/}}
+ env:
+ - name: NAME
+ value: {{ .Values.name }}
+ - name: NETWORK_NAME
+ value: {{ .Values.networkName }}
+ - name: HEALTH_PORT
+ value: {{ .Values.worker.health.port | quote }}
+ - name: METRICS_PORT
+ value: {{ .Values.worker.metrics.port | quote }}
+ - name: REST_PREFIX
+ value: {{ .Values.worker.rest.prefix }}
+ - name: WEBSOCKET_PREFIX
+ value: {{ .Values.worker.websocket.prefix }}
+ - name: HEALTH_PREFIX
+ value: {{ .Values.worker.health.prefix }}
+ - name: METRICS_PREFIX
+ value: {{ .Values.worker.metrics.prefix }}
+ - name: HEALTH_POLLING_INTERVAL
+ value: {{ .Values.worker.health.pollingInterval | quote }}
+ - name: LOG_LEVEL
+ value: {{ .Values.worker.logging.level }}
+ - name: LOG_TO_FILE
+ value: {{ .Values.worker.logging.toFile | quote }}
+ - name: LOG_FILE_NAME
+ value: {{ .Values.worker.logging.filename }}
+ - name: LOG_FORMAT
+ value: {{ .Values.worker.logging.format }}
+ - name: KAFKA_BROKER_URL
+ value: {{ .Values.kafka.kafkaBrokerURL }}
+ - name: SCHEMA_REGISTRY_URL
+ value: {{ .Values.kafka.schemaRegistryURL }}
+ - name: CONSUMER_GROUP
+ value: {{ .Values.kafka.consumerGroup }}
+ - name: CONSUMER_TOPIC_BLOCKS
+ value: {{ .Values.worker.kafka.topics.blocks }}
+ - name: CONSUMER_TOPIC_TRANSACTIONS
+ value: {{ .Values.worker.kafka.topics.transactions }}
+ - name: CONSUMER_TOPIC_LOGS
+ value: {{ .Values.worker.kafka.topics.logs }}
+ - name: POSTGRES_USER
+ value: {{ .Values.worker.db.user }}
+ - name: POSTGRES_SERVER
+ value: {{ .Values.worker.db.host }}
+ - name: POSTGRES_PORT
+ value: {{ .Values.worker.db.port | quote }}
+ - name: POSTGRES_DATABASE
+ value: {{ .Values.worker.db.database }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.name }}-pg-worker-password
+ key: postgresPassword
+ resources:
+ requests:
+ cpu: {{ .Values.worker.resources.requests.cpu }}
+ memory: {{ .Values.worker.resources.requests.memory }}
+ limits:
+ cpu: {{ .Values.worker.resources.limits.cpu }}
+ memory: {{ .Values.worker.resources.limits.memory }}
+ {{- if .Values.api.nodeSelector }}
+ nodeSelector:
+ {{ tpl .Values.api.nodeSelector . | indent 8 | trim }}
+ {{- end }}
diff --git a/chart/templates/horizontal-pod-autoscaler.yaml b/chart/templates/horizontal-pod-autoscaler.yaml
new file mode 100644
index 0000000..218633c
--- /dev/null
+++ b/chart/templates/horizontal-pod-autoscaler.yaml
@@ -0,0 +1,23 @@
+{{- if .Values.autoscaler.enabled }}
+apiVersion: autoscaling/v2beta2
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ .Release.Name }}
+ labels:
+{{ include "labels" . | indent 6 }}
+
+spec:
+ minReplicas: 1
+ maxReplicas: {{ .Values.autoscaler.maxReplicas }}
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ .Release.Name }}
+ metrics:
+ - type: Resource
+ resource:
+ name: cpu
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaler.averageCPU }}
+{{- end }}
diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml
new file mode 100644
index 0000000..584fd17
--- /dev/null
+++ b/chart/templates/ingress.yaml
@@ -0,0 +1,55 @@
+{{- if .Values.ingress.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: {{ .Release.Name }}
+ labels:
+{{ include "labels" . | indent 4 }}
+ {{- if .Values.ingress.annotations }}
+ annotations:
+{{ tpl .Values.ingress.annotations . | indent 4 }}
+ {{- end }}
+spec:
+ tls:
+ - secretName: {{ .Release.Name }}-apex
+ hosts:
+ - {{ .Values.ingress.apexHost }}
+ - secretName: {{ .Release.Name }}-regional-tls
+ hosts:
+ - {{ .Values.ingress.regionalHost }}
+ rules:
+ - host: {{ .Values.ingress.regionalHost }}
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: {{ $.Release.Name }}
+ port:
+ number: {{ $.Values.service.externalPort }}
+ - path: /metrics
+ pathType: Prefix
+ backend:
+ service:
+ name: ingress-default-backend
+ port:
+ number: 80
+ - host: {{ .Values.ingress.apexHost }}
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: {{ $.Release.Name }}
+ port:
+ number: {{ $.Values.service.externalPort }}
+ - path: /metrics
+ pathType: Prefix
+ backend:
+ service:
+ name: ingress-default-backend
+ port:
+ number: 80
+ {{- end }}
diff --git a/chart/templates/secret-keys.yaml b/chart/templates/secret-keys.yaml
new file mode 100644
index 0000000..da44928
--- /dev/null
+++ b/chart/templates/secret-keys.yaml
@@ -0,0 +1,19 @@
+---
+
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ .Values.name }}-pg-api-password
+type: Opaque
+stringData:
+ postgresPassword: {{ .Values.api.db.password }}
+
+---
+
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ .Values.name }}-pg-worker-password
+type: Opaque
+stringData:
+ postgresPassword: {{ .Values.worker.db.password }}
diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml
new file mode 100644
index 0000000..22d04ac
--- /dev/null
+++ b/chart/templates/service.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Release.Name }}
+ labels:
+{{ include "labels" . | indent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ protocol: TCP
+ name: {{ .Values.service.name }}
+ selector:
+{{ include "selectorLabels" . | indent 4 }}
diff --git a/chart/test/chart_unit_test.go b/chart/test/chart_unit_test.go
new file mode 100644
index 0000000..3a1d7a9
--- /dev/null
+++ b/chart/test/chart_unit_test.go
@@ -0,0 +1,39 @@
+package test
+
+import (
+ "path/filepath"
+ "testing"
+
+ corev1 "k8s.io/api/core/v1"
+
+ "github.com/gruntwork-io/terratest/modules/helm"
+)
+
+func TestIconBlocksUnit(t *testing.T) {
+ helmChartPath := ".."
+
+ options := &helm.Options{
+ ValuesFiles: []string{
+ filepath.Join("..", "deployments", "test", "values.test.yaml"),
+ },
+ }
+
+ // Run RenderTemplate to render the template and capture the output.
+ apiOutput := helm.RenderTemplate(t, options, helmChartPath, "deployment-icon-metrics*", []string{"templates/deployment-api.yaml"})
+ workerOutput := helm.RenderTemplate(t, options, helmChartPath, "deployment-icon-metrics*", []string{"templates/deployment-worker.yaml"})
+
+ // Now we use kubernetes/client-go library to render the template output into the Pod struct.
+ var apiPod corev1.Pod
+ helm.UnmarshalK8SYaml(t, apiOutput, &apiPod)
+
+ if apiPod.TypeMeta.Kind != "Deployment" {
+ t.Fatalf("Failed to render API service.")
+ }
+
+ var workerPod corev1.Pod
+ helm.UnmarshalK8SYaml(t, workerOutput, &workerPod)
+
+ if workerPod.TypeMeta.Kind != "Deployment" {
+ t.Fatalf("Failed to render worker service.")
+ }
+}
diff --git a/chart/test/go.mod b/chart/test/go.mod
new file mode 100644
index 0000000..5aa7b01
--- /dev/null
+++ b/chart/test/go.mod
@@ -0,0 +1,8 @@
+module github.com/geometry-labs/icon-chart
+
+go 1.16
+
+require (
+ github.com/gruntwork-io/terratest v0.34.7
+ k8s.io/api v0.19.3
+)
diff --git a/chart/test/go.sum b/chart/test/go.sum
new file mode 100644
index 0000000..c369693
--- /dev/null
+++ b/chart/test/go.sum
@@ -0,0 +1,655 @@
+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.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM=
+cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
+cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
+cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
+cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
+cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v38.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v46.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
+github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0=
+github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
+github.com/Azure/go-autorest/autorest v0.11.0/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
+github.com/Azure/go-autorest/autorest v0.11.5/go.mod h1:foo3aIXRQ90zFve3r0QiDsrjGDUwWhKl0ZOQy1CT14k=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
+github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
+github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.2/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE=
+github.com/Azure/go-autorest/autorest/azure/auth v0.5.1/go.mod h1:ea90/jvmnAwDrSooLH4sRIehEPtG/EPUXavDh31MnA4=
+github.com/Azure/go-autorest/autorest/azure/cli v0.4.0/go.mod h1:JljT387FplPzBA31vUcvsetLKF3pec5bdAxjVU4kI2s=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
+github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc=
+github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
+github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8=
+github.com/Azure/go-autorest/autorest/validation v0.3.0/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
+github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
+github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
+github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
+github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
+github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
+github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
+github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
+github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
+github.com/aws/aws-sdk-go v1.27.1 h1:MXnqY6SlWySaZAqNnXThOvjRFdiiOuKtC6i7baFdNdU=
+github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
+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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
+github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
+github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
+github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
+github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
+github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
+github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
+github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
+github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
+github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/cli v0.0.0-20200109221225-a4f60165b7a3/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
+github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
+github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c h1:ZfSZ3P3BedhKGUhzj7BQlPSU4OvT6tfOKe3DVHzOA7s=
+github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
+github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1 h1:yY9rWGoXv1U5pl4gxqlULARMQD7x0QG85lqEXTWysik=
+github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
+github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
+github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
+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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
+github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 h1:skJKxRtNmevLqnayafdLe2AsenqRupVmzZSqrvb5caU=
+github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
+github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
+github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
+github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
+github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
+github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
+github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
+github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
+github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-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/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/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+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.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=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+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/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 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-containerregistry v0.0.0-20200110202235-f4fb41bf00a3/go.mod h1:2wIuQute9+hhWqvL3vEI7YB0EKluF4WcPzI1eAliazk=
+github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
+github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
+github.com/google/pprof v0.0.0-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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/gax-go/v2 v2.0.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.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
+github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
+github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
+github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
+github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/gruntwork-io/go-commons v0.8.0 h1:k/yypwrPqSeYHevLlEDmvmgQzcyTwrlZGRaxEM6G0ro=
+github.com/gruntwork-io/go-commons v0.8.0/go.mod h1:gtp0yTtIBExIZp7vyIV9I0XQkVwiQZze678hvDXof78=
+github.com/gruntwork-io/terratest v0.34.7 h1:mR4AhLW3posPzNPz8VaVnj7JnFRil86j9FeQAbeckuc=
+github.com/gruntwork-io/terratest v0.34.7/go.mod h1:IBb+b5b7p34oZLfpz/ZADyn8TSKeWSBu+vQMmNeePLE=
+github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
+github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI=
+github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
+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/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY=
+github.com/hashicorp/terraform-json v0.9.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=
+github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s=
+github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
+github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+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.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+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/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+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/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 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
+github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
+github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo=
+github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
+github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
+github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+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-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
+github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo 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.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
+github.com/oracle/oci-go-sdk v7.1.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
+github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+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/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+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/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
+github.com/pquerna/otp v1.2.0 h1:/A3+Jn+cagqayeR3iHs/L62m5ue7710D35zl1zJ1kok=
+github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
+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_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/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+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/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
+github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
+github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
+github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
+github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
+github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+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/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
+github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
+github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
+github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
+github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
+github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/vdemeester/k8s-pkg-credentialprovider v0.0.0-20200107171650-7c61ffa44238/go.mod h1:JwQJCMWpUDqjZrB5jpw0f5VbN7U95zxFy1ZDpoEarGo=
+github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
+github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
+github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
+go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
+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.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/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-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+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-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+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-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+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.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180811021610-c39426892332/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-20181220203305-927f97764cc3/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-20190813141303-74dc4d7220e7/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-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/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-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+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 h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-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-20181107165924-66b7b1311ac8/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-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190209173611-3b5209105503/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-20190502175342-a43fa875dd82/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-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/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-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+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 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/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-20190614205625-5aca471b1d59/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-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
+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-20190920225731-5eefd052ad72/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-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-20191205215504-7b8c8591a921/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20201110201400-7099162a900a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
+gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
+gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
+google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
+google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4=
+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.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+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 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
+google.golang.org/appengine v1.6.5/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-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+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.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
+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/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+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 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
+gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
+gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
+gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
+gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
+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=
+k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI=
+k8s.io/api v0.19.3 h1:GN6ntFnv44Vptj/b+OnMW7FmzkpDoIDLZRvKX3XH9aU=
+k8s.io/api v0.19.3/go.mod h1:VF+5FT1B74Pw3KxMdKyinLo+zynBaMBiAfGMuldcNDs=
+k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
+k8s.io/apimachinery v0.19.3 h1:bpIQXlKjB4cB/oNpnNnV+BybGPR7iP5oYpsOTEJ4hgc=
+k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
+k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg=
+k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k=
+k8s.io/client-go v0.19.3 h1:ctqR1nQ52NUs6LpI0w+a5U+xjYwflFwA13OJKcicMxg=
+k8s.io/client-go v0.19.3/go.mod h1:+eEMktZM+MG0KO+PTkci8xnbCZHvj9TqR6Q1XDUIJOM=
+k8s.io/cloud-provider v0.17.0/go.mod h1:Ze4c3w2C0bRsjkBUoHpFi+qWe3ob1wI2/7cUn+YQIDE=
+k8s.io/code-generator v0.0.0-20191121015212-c4c8f8345c7e/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
+k8s.io/component-base v0.17.0/go.mod h1:rKuRAokNMY2nn2A6LP/MiwpoaMRHpfRnrPaUJJj1Yoc=
+k8s.io/csi-translation-lib v0.17.0/go.mod h1:HEF7MEz7pOLJCnxabi45IPkhSsE/KmxPQksuCrHKWls=
+k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
+k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
+k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
+k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
+k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
+k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
+k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
+k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
+k8s.io/legacy-cloud-providers v0.17.0/go.mod h1:DdzaepJ3RtRy+e5YhNtrCYwlgyK87j/5+Yfp0L9Syp8=
+k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
+k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
+k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
+modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
+modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
+modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
+modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
+rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
+sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
+sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU=
+sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
diff --git a/chart/values.yaml b/chart/values.yaml
new file mode 100644
index 0000000..7872a2b
--- /dev/null
+++ b/chart/values.yaml
@@ -0,0 +1,120 @@
+name: icon-metrics
+networkName: mainnet
+
+autoscaler:
+ enabled: true
+ maxReplicas: 25
+ averageCPU: 50
+
+service:
+ name: icon-metrics
+ type: ClusterIP
+ externalPort: 80
+
+ingress:
+ enabled: true
+ regionalHost: "app.region.example.com"
+ apexHost: "app.example.com"
+ annotations: null
+
+api:
+ image:
+ repository: 868027517775.dkr.ecr.us-west-2.amazonaws.com/icon-metrics-api
+ tag: latest
+ pullPolicy: IfNotPresent
+ replicas: 1
+ annotations: null
+ internal:
+ port: 80
+ health:
+ port: 9300
+ prefix: "/health"
+ pollingInterval: 60
+ metrics:
+ port: 9400
+ prefix: "/metrics"
+ rest:
+ prefix: "/api/v1"
+ websocket:
+ prefix: "/ws/v1"
+ logging:
+ level: INFO
+ toFile: false
+ filename: "api.log"
+ format: string
+ db:
+ user: postgres
+ password: changeme
+ host: localhost
+ port: 5432
+ database: metrics
+ resources:
+ requests:
+ cpu: 250m
+ memory: 256Mi
+ limits:
+ cpu: 1000m
+ memory: 1024Mi
+ tolerations: ""
+ nodeSelector: null
+ affinity: null
+ priorityClassName: ""
+
+worker:
+ image:
+ repository: 868027517775.dkr.ecr.us-west-2.amazonaws.com/icon-metrics-worker
+ tag: latest
+ pullPolicy: IfNotPresent
+ replicas: 1
+ annotations: null
+ health:
+ port: 9300
+ prefix: "/health"
+ pollingInterval: 60
+ metrics:
+ port: 9400
+ prefix: "/metrics"
+ rest:
+ prefix: "/api/v1"
+ websocket:
+ prefix: "/ws/v1"
+ logging:
+ level: INFO
+ toFile: false
+ filename: "worker.log"
+ format: string
+ db:
+ user: postgres
+ password: changeme
+ host: localhost
+ port: 5432
+ database: metrics
+ kafka:
+ topics:
+ blocks: blocks
+ transactions: transactions
+ logs: logs
+ resources:
+ requests:
+ cpu: 250m
+ memory: 256Mi
+ limits:
+ cpu: 1000m
+ memory: 1024Mi
+ tolerations: ""
+ nodeSelector: null
+ affinity: null
+ priorityClassName: ""
+
+kafka:
+ kafkaBrokerURL: ""
+ schemaRegistryURL: ""
+# kafkaGroupID: websocket-group
+ consumerGroup: metrics-consumer-group
+# schemaNameTopics: "governance-ws:block"
+
+#db:
+# driver: postgres
+# name: governance
+# sslMode: disable
+# timezone: UTC
diff --git a/docker-compose.db.yml b/docker-compose.db.yml
new file mode 100644
index 0000000..4f83b6a
--- /dev/null
+++ b/docker-compose.db.yml
@@ -0,0 +1,109 @@
+version: "3.7"
+
+services:
+ ############
+ # Database #
+ ############
+ postgres:
+ image: postgres
+ environment:
+ POSTGRES_USER: ${POSTGRES_USER:-postgres}
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
+ ports:
+ - "5432:5432"
+
+ pgadmin:
+ image: dpage/pgadmin4
+ environment:
+ PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
+ PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
+ ports:
+ - "${PGADMIN_PORT:-5050}:80"
+
+# #########
+# # Kafka #
+# #########
+# zookeeper:
+# image: confluentinc/cp-zookeeper:${CP_ZOOKEEPER_TAG:-latest}
+# hostname: zookeeper
+# environment:
+# zk_id: "1"
+# ZOOKEEPER_CLIENT_PORT: 2181
+#
+# kafka:
+# image: confluentinc/cp-enterprise-kafka:${CP_ENTERPRISE_KAFKA_TAG:-latest}
+# hostname: kafka
+# depends_on:
+# - zookeeper
+# ports:
+# - "29092:29092"
+# environment:
+# KAFKA_BROKER_ID: 0
+# KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
+# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
+# KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
+# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
+# KAFKA_BROKER_RACK: "r1"
+# KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
+# KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
+# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
+# KAFKA_DELETE_TOPIC_ENABLE: "true"
+# KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
+# KAFKA_SCHEMA_REGISTRY_URL: "schemaregistry:8081"
+# KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: "schemaregistry:8081"
+# KAFKA_JMX_PORT: 9991
+# KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
+# KAFKA_CONFLUENT_SUPPORT_CUSTOMER_ID: anonymous
+# KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka:9092
+# KAFKA_CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper:2181
+# KAFKA_CONFLUENT_METRICS_ENABLE: 'true'
+# KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
+#
+# schemaregistry:
+# image: confluentinc/cp-schema-registry:${CP_SCHEMA_REGISTRY_TAG:-latest}
+# hostname: schemaregistry
+# depends_on:
+# - zookeeper
+# - kafka
+# ports:
+# - "8081:8081"
+# environment:
+# SCHEMA_REGISTRY_HOST_NAME: schemaregistry
+# SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181'
+# SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_ORIGIN: '*'
+# SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_METHODS: 'GET,POST,PUT,OPTIONS'
+# SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8081"
+#
+# rest-proxy:
+# image: confluentinc/cp-kafka-rest:${CP_KAFKA_REST_TAG:-latest}
+# hostname: rest-proxy
+# depends_on:
+# - kafka
+# - schemaregistry
+# environment:
+# KAFKA_REST_ZOOKEEPER_CONNECT: 'zookeeper:2181'
+# KAFKA_REST_BOOTSTRAP_SERVERS: 'kafka:9092'
+# KAFKA_REST_LISTENERS: 'http://0.0.0.0:8084'
+# KAFKA_REST_SCHEMA_REGISTRY_URL: 'http://schemaregistry:8081'
+# KAFKA_REST_HOST_NAME: 'rest-proxy'
+#
+# control-center:
+# image: confluentinc/cp-enterprise-control-center:5.5.1
+# hostname: control-center
+# depends_on:
+# - zookeeper
+# - kafka
+# ports:
+# - "9021:9021"
+# environment:
+# CONTROL_CENTER_BOOTSTRAP_SERVERS: 'kafka:29092'
+# CONTROL_CENTER_ZOOKEEPER_CONNECT: 'zookeeper:2181'
+# CONTROL_CENTER_REPLICATION_FACTOR: 1
+# CONTROL_CENTER_SCHEMA_REGISTRY_URL: 'schemaregistry:8081'
+# CONTROL_CENTER_INTERNAL_TOPICS_PARTITIONS: 1
+# CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS: 1
+# CONFLUENT_METRICS_TOPIC_REPLICATION: 1
+# PORT: 9021
+# networks:
+# - default
+# restart: always
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..13614ab
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,104 @@
+version: "3.7"
+
+x-env: &env
+ NAME: "metrics"
+ NETWORK_NAME: "mainnet"
+
+ # Ports
+ PORT: "8000"
+ HEALTH_PORT: "8180"
+ METRICS_PORT: "9400"
+
+ # Prefix
+ REST_PREFIX: "/api/v1"
+ WEBSOCKET_PREFIX: "/ws/v1"
+ HEALTH_PREFIX: "/heath"
+ METRICS_PREFIX: "/metrics"
+
+ CORS_ALLOW_ORIGINS: "*"
+
+ # Monitoring
+ HEALTH_POLLING_INTERVAL: "60"
+
+ # Logging
+ LOG_LEVEL: "INFO"
+ LOG_TO_FILE: "false"
+ LOG_FILE_NAME: "metrics.log"
+ LOG_FORMAT: "string"
+
+ # Kafka
+ KAFKA_BROKER_URL: "kafka:9092"
+ SCHEMA_REGISTRY_URL: "http://schemaregistry:8081"
+ KAFKA_GROUP_ID: "metrics-service"
+
+ # Topics
+ CONSUMER_GROUP: "metrics-consumer-group"
+ SCHEMA_NAME_TOPICS: "metrics-ws:block"
+
+ CONSUMER_TOPIC_BLOCKS: "blocks"
+ CONSUMER_TOPIC_TRANSACTIONS: "transactions"
+ CONSUMER_TOPIC_LOGS: "logs"
+
+ # DB
+ POSTGRES_USER: "postgres"
+ POSTGRES_PASSWORD: "changeme"
+ POSTGRES_SERVER: "postgres"
+ POSTGRES_PORT: "5432"
+ POSTGRES_DATABASE: "postgres"
+
+ # Endpoints
+ MAX_PAGE_SIZE: "100"
+
+ # Redis
+ REDIS_HOST: "redis"
+ REDIS_PORT: "6379"
+ REDIS_PASSWORD: ""
+ REDIS_CHANNEL: "metrics"
+ REDIS_SENTINEL_CLIENT_MODE: "false"
+ REDIS_SENTINEL_CLIENT_MASTER_NAME: "master"
+
+services:
+ metrics-api:
+ build:
+ context: ${METRICS_CONTEXT:-.}
+ target: ${METRICS_TARGET:-prod}
+ args:
+ - SERVICE_NAME=api
+ ports:
+ - "8000:8000" # API
+ - "8180:8180" # Health
+ - "9400:9400" # Prometheus
+ security_opt:
+ - "seccomp:unconfined"
+ cap_add:
+ - SYS_PTRACE
+ volumes:
+ - ${METRICS_CONTEXT:-.}/icon_metrics:/app
+ environment:
+ <<: *env
+
+ metrics-worker:
+ build:
+ context: ${METRICS_CONTEXT:-.}
+ target: ${METRICS_TARGET:-prod}
+ args:
+ - SERVICE_NAME=worker
+ ports:
+ - "8181:8181" # Health
+ - "9401:9401" # Prometheus
+ security_opt:
+ - "seccomp:unconfined"
+ cap_add:
+ - SYS_PTRACE
+ volumes:
+ - ${METRICS_CONTEXT:-.}/icon_metrics:/app
+ environment:
+ <<: *env
+
+# postgres:
+# image: postgres
+# environment:
+# POSTGRES_USER: ${POSTGRES_USER:-postgres}
+# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
+# ports:
+# - "5432:5432"
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100644
index 0000000..bfaa45e
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,17 @@
+#! /usr/bin/env bash
+
+if [ "$1" = "worker" ]; then
+ echo "Migrating backend..."
+ cd icon_metrics
+ alembic upgrade head
+ echo "Initializing DB..."
+ python data/db_init.py
+ echo "Starting worker..."
+ python main_worker.py
+
+elif [ "$1" = "api" ]; then
+ echo "Starting API..."
+ python icon_metrics/main_api.py
+else
+ echo "No args specified - exiting..."
+fi
diff --git a/icon_metrics/__init__.py b/icon_metrics/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/icon_metrics/alembic.ini b/icon_metrics/alembic.ini
new file mode 100644
index 0000000..99de8a3
--- /dev/null
+++ b/icon_metrics/alembic.ini
@@ -0,0 +1,39 @@
+[alembic]
+script_location = alembic
+
+;sqlalchemy.url = postgresql+asyncpg://postgres:postgres@db:5432/foo
+
+
+[loggers]
+keys = root,sqlalchemy,alembic
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = WARN
+handlers = console
+qualname =
+
+[logger_sqlalchemy]
+level = WARN
+handlers =
+qualname = sqlalchemy.engine
+
+[logger_alembic]
+level = INFO
+handlers =
+qualname = alembic
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(levelname)-5.5s [%(name)s] %(message)s
+datefmt = %H:%M:%S
diff --git a/icon_metrics/alembic/README b/icon_metrics/alembic/README
new file mode 100644
index 0000000..2500aa1
--- /dev/null
+++ b/icon_metrics/alembic/README
@@ -0,0 +1 @@
+Generic single-database configuration.
diff --git a/icon_metrics/alembic/env.py b/icon_metrics/alembic/env.py
new file mode 100644
index 0000000..ded623a
--- /dev/null
+++ b/icon_metrics/alembic/env.py
@@ -0,0 +1,97 @@
+import asyncio
+from logging.config import fileConfig
+
+from alembic import context
+from sqlalchemy import engine_from_config, pool
+from sqlalchemy.ext.asyncio import AsyncEngine
+from sqlmodel import SQLModel
+
+from icon_metrics.db import ASYNC_SQLALCHEMY_DATABASE_URL, SQLALCHEMY_DATABASE_URL
+from icon_metrics.models.addresses import Address
+from icon_metrics.models.metrics import Supply, Transactions
+
+# Other versions imported each object
+config = context.config
+
+config.set_main_option("sqlalchemy.url", ASYNC_SQLALCHEMY_DATABASE_URL)
+
+fileConfig(config.config_file_name)
+
+# add your model's MetaData object here
+# for 'autogenerate' support
+# from myapp import mymodel
+# target_metadata = mymodel.Base.metadata
+target_metadata = SQLModel.metadata
+
+
+# other values from the config, defined by the needs of env.py,
+# can be acquired:
+# my_important_option = config.get_main_option("my_important_option")
+# ... etc.
+
+
+def run_migrations_offline():
+ url = SQLALCHEMY_DATABASE_URL
+ context.configure(
+ url=url,
+ target_metadata=target_metadata,
+ literal_binds=True,
+ compare_type=True,
+ )
+
+ with context.begin_transaction():
+ context.run_migrations()
+
+
+def do_run_migrations(connection):
+ context.configure(connection=connection, target_metadata=target_metadata)
+
+ with context.begin_transaction():
+ context.run_migrations()
+
+
+async def run_migrations_online():
+ """Run migrations in 'online' mode.
+ In this scenario we need to create an Engine
+ and associate a connection with the context.
+ """
+ x = config.get_section(config.config_ini_section)
+ print()
+
+ connectable = AsyncEngine(
+ engine_from_config(
+ config.get_section(config.config_ini_section),
+ prefix="sqlalchemy.",
+ poolclass=pool.NullPool,
+ future=True,
+ )
+ )
+
+ async with connectable.connect() as connection:
+ await connection.run_sync(do_run_migrations)
+
+
+# def run_migrations_online():
+# configuration = config.get_section(config.config_ini_section)
+# configuration["sqlalchemy.url"] = SQLALCHEMY_DATABASE_URL
+# connectable = engine_from_config(
+# configuration,
+# prefix="sqlalchemy.",
+# poolclass=pool.NullPool,
+# )
+#
+# with connectable.connect() as connection:
+# context.configure(
+# connection=connection, target_metadata=target_metadata, compare_type=True
+# )
+#
+# with context.begin_transaction():
+# context.run_migrations()
+
+# if context.is_offline_mode():
+#
+# run_migrations_offline()
+# else:
+# asyncio.run(run_migrations_online())
+# # run_migrations_online()
+asyncio.run(run_migrations_online())
diff --git a/icon_metrics/alembic/script.py.mako b/icon_metrics/alembic/script.py.mako
new file mode 100644
index 0000000..e45068f
--- /dev/null
+++ b/icon_metrics/alembic/script.py.mako
@@ -0,0 +1,25 @@
+"""${message}
+
+Revision ID: ${up_revision}
+Revises: ${down_revision | comma,n}
+Create Date: ${create_date}
+
+"""
+from alembic import op
+import sqlalchemy as sa
+import sqlmodel
+${imports if imports else ""}
+
+# revision identifiers, used by Alembic.
+revision = ${repr(up_revision)}
+down_revision = ${repr(down_revision)}
+branch_labels = ${repr(branch_labels)}
+depends_on = ${repr(depends_on)}
+
+
+def upgrade():
+ ${upgrades if upgrades else "pass"}
+
+
+def downgrade():
+ ${downgrades if downgrades else "pass"}
diff --git a/icon_metrics/alembic/versions/86652ac19087_init.py b/icon_metrics/alembic/versions/86652ac19087_init.py
new file mode 100644
index 0000000..559cdb1
--- /dev/null
+++ b/icon_metrics/alembic/versions/86652ac19087_init.py
@@ -0,0 +1,65 @@
+"""init
+
+Revision ID: 86652ac19087
+Revises:
+Create Date: 2021-10-11 22:47:49.971077
+
+"""
+import sqlalchemy as sa
+import sqlmodel
+from alembic import op
+
+# revision identifiers, used by Alembic.
+revision = "86652ac19087"
+down_revision = None
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.create_table(
+ "addresses",
+ sa.Column("address", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
+ sa.Column("organization_wallet", sa.Boolean(), nullable=True),
+ sa.PrimaryKeyConstraint("address"),
+ )
+ op.create_index(op.f("ix_addresses_address"), "addresses", ["address"], unique=False)
+ op.create_index(
+ op.f("ix_addresses_organization_wallet"), "addresses", ["organization_wallet"], unique=False
+ )
+ op.create_table(
+ "supply",
+ sa.Column("id", sa.Integer(), nullable=True),
+ sa.Column("timestamp", sa.Integer(), nullable=True),
+ sa.Column("total_supply", sa.Float(), nullable=True),
+ sa.Column("organization_supply", sa.Float(), nullable=True),
+ sa.Column("circulating_supply", sa.Float(), nullable=True),
+ sa.PrimaryKeyConstraint("id"),
+ )
+ op.create_index(op.f("ix_supply_id"), "supply", ["id"], unique=False)
+ op.create_index(op.f("ix_supply_timestamp"), "supply", ["timestamp"], unique=False)
+ op.create_table(
+ "transactions",
+ sa.Column("id", sa.Integer(), nullable=True),
+ sa.Column("timestamp", sa.Integer(), nullable=True),
+ sa.Column("total_tx", sa.Integer(), nullable=True),
+ sa.PrimaryKeyConstraint("id"),
+ )
+ op.create_index(op.f("ix_transactions_id"), "transactions", ["id"], unique=False)
+ op.create_index(op.f("ix_transactions_timestamp"), "transactions", ["timestamp"], unique=False)
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.drop_index(op.f("ix_transactions_timestamp"), table_name="transactions")
+ op.drop_index(op.f("ix_transactions_id"), table_name="transactions")
+ op.drop_table("transactions")
+ op.drop_index(op.f("ix_supply_timestamp"), table_name="supply")
+ op.drop_index(op.f("ix_supply_id"), table_name="supply")
+ op.drop_table("supply")
+ op.drop_index(op.f("ix_addresses_organization_wallet"), table_name="addresses")
+ op.drop_index(op.f("ix_addresses_address"), table_name="addresses")
+ op.drop_table("addresses")
+ # ### end Alembic commands ###
diff --git a/icon_metrics/api/health.py b/icon_metrics/api/health.py
new file mode 100644
index 0000000..7f12c19
--- /dev/null
+++ b/icon_metrics/api/health.py
@@ -0,0 +1,7 @@
+from fastapi import Depends
+
+from icon_metrics.db import get_session
+
+
+def is_database_online(session: bool = Depends(get_session)):
+ return session
diff --git a/icon_metrics/api/v1/endpoints/__init_.py b/icon_metrics/api/v1/endpoints/__init_.py
new file mode 100644
index 0000000..e307fb7
--- /dev/null
+++ b/icon_metrics/api/v1/endpoints/__init_.py
@@ -0,0 +1,6 @@
+from pydantic import BaseModel
+
+
+class ListQueryParams(BaseModel):
+ skip: int = 0
+ limit: int = 100
diff --git a/icon_metrics/api/v1/endpoints/metrics.py b/icon_metrics/api/v1/endpoints/metrics.py
new file mode 100644
index 0000000..7b50f33
--- /dev/null
+++ b/icon_metrics/api/v1/endpoints/metrics.py
@@ -0,0 +1,16 @@
+from fastapi import APIRouter, Depends
+from sqlalchemy.ext.asyncio import AsyncSession
+from sqlmodel import select
+
+from icon_metrics.db import get_session
+from icon_metrics.models.metrics import Supply
+
+router = APIRouter()
+
+
+@router.get("/metrics/supply")
+async def get_supply(session: AsyncSession = Depends(get_session)) -> Supply:
+ """Get latest supply."""
+ result = await session.execute(select(Supply))
+ preps = result.scalars().one()
+ return preps
diff --git a/icon_metrics/api/v1/router.py b/icon_metrics/api/v1/router.py
new file mode 100644
index 0000000..f853f61
--- /dev/null
+++ b/icon_metrics/api/v1/router.py
@@ -0,0 +1,7 @@
+from fastapi import APIRouter
+
+from icon_metrics.api.v1.endpoints import addresses, metrics
+
+api_router = APIRouter()
+api_router.include_router(metrics.router)
+api_router.include_router(metrics.addresses)
diff --git a/icon_metrics/config.py b/icon_metrics/config.py
new file mode 100644
index 0000000..771b9e7
--- /dev/null
+++ b/icon_metrics/config.py
@@ -0,0 +1,67 @@
+from pydantic import BaseSettings
+
+
+class Settings(BaseSettings):
+
+ NAME: str = "metrics"
+ NETWORK_NAME: str = "mainnet"
+
+ # Ports
+ PORT: int = 8000
+ HEALTH_PORT: int = 8180
+ METRICS_PORT: int = 9400
+
+ METRICS_ADDRESS: str = "localhost"
+
+ # Prefix
+ REST_PREFIX: str = "/api/v1"
+ HEALTH_PREFIX: str = "/heath"
+ METRICS_PREFIX: str = "/metrics"
+ DOCS_PREFIX: str = "/api/v1/docs"
+
+ CORS_ALLOW_ORIGINS: str = "*"
+
+ # Monitoring
+ HEALTH_POLLING_INTERVAL: int = 60
+
+ # Logging
+ LOG_LEVEL: str = "INFO"
+ LOG_TO_FILE: str = "false"
+ LOG_FILE_NAME: str = "metrics.log"
+ LOG_FORMAT: str = "string"
+
+ # ICON Nodes
+ ICON_NODE_URL = "https://icon.geometry-dev.net/api/v3"
+ BACKUP_ICON_NODE_URL = "http://34.218.244.40:9000/api/v3"
+
+ # Targets
+ MAIN_PROMETHEUS_ENDPOINT: str = None
+
+ # DB
+ POSTGRES_USER: str = "postgres"
+ POSTGRES_PASSWORD: str = "changeme"
+ POSTGRES_SERVER: str = "127.0.0.1"
+ POSTGRES_PORT: str = "5432"
+ POSTGRES_DATABASE: str = "postgres"
+
+ # Endpoints
+ MAX_PAGE_SIZE: int = 100
+
+ # Redis
+ # REDIS_HOST: str = "redis"
+ # REDIS_PORT: int = 6379
+ # REDIS_PASSWORD: str = ""
+ # REDIS_CHANNEL: str = "governance"
+ # REDIS_SENTINEL_CLIENT_MODE: bool = False
+ # REDIS_SENTINEL_CLIENT_MASTER_NAME: str = "master"
+
+ _governance_address: str = "cx0000000000000000000000000000000000000000"
+
+ CRON_SLEEP_SEC: int = 600
+
+ class Config:
+ case_sensitive = True
+ # env_prefix = "METRICS_"
+
+
+settings = Settings()
diff --git a/icon_metrics/data/db_init.py b/icon_metrics/data/db_init.py
new file mode 100644
index 0000000..b41aa33
--- /dev/null
+++ b/icon_metrics/data/db_init.py
@@ -0,0 +1,30 @@
+import csv
+import os
+
+from sqlalchemy.orm import sessionmaker
+
+from icon_metrics.db import engine
+from icon_metrics.models.addresses import Address
+
+
+def init_db():
+ SessionMade = sessionmaker(bind=engine)
+ session = SessionMade()
+
+ # Import the organization-addresses.csv
+ with open(os.path.join(os.path.dirname(__file__), "organization-addresses.csv")) as f:
+ reader = csv.reader(f, delimiter=",")
+ for row in reader:
+ address = session.get(Address, row[0])
+ if address is None:
+ address = Address()
+
+ address.address = row[0]
+ address.organization_wallet = True
+
+ session.add(address)
+ session.commit()
+
+
+if __name__ == "__main__":
+ init_db()
diff --git a/icon_metrics/data/organization-addresses.csv b/icon_metrics/data/organization-addresses.csv
new file mode 100644
index 0000000..a8040a0
--- /dev/null
+++ b/icon_metrics/data/organization-addresses.csv
@@ -0,0 +1,51 @@
+hx0cc3a3d55ed55df7c8eee926a4fafb5412d0cca4
+hx10ed7a7065d920e146c86d3915491f5a67248647
+hx1216aa95cf2aea0a387b7c243412022f3d7cf29f
+hx206846faa5ba46a3717e7349bff9c20d6fe1bba3
+hx25c5dace83bceae42c11360a07c9e42a3b5c6122
+hx266c053380ad84224ea64ab4fa05541dccc56f5f
+hx27664cffd284b8cf488eefb7880f55ce82f42297
+hx314348ecbaf01ff6c65c2877a6c593a5facecb35
+hx3f945d146a87552487ad70a050eebfa2564e8e5c
+hx465a11b018bf72febe40d54bce71f3860695d4c2
+hx4d83813703f81cdb85f952a1d1ee736faf732655
+hx4df036dcb1809743e677681d43cf2e904421f1eb
+hx558b4cd8cd7c25fa25e3109414bb385e3c369660
+hx64e40ddd929de5d15b2aab2ef4a3a47f8fe40b3b
+hx6b38701ddc411e6f4e84a04f6abade7661a207e2
+hx6c22cdba886614d3173e3d2499dc1597bdb57f2c
+hx6d2240f9c5fd0db5df6977ee586c3d74e1b1e4aa
+hx7062a97bed64624846f3134fdab3fb856dce7075
+hx7cdec6f51903ec274e01722bed4c60b6e88ebcbd
+hx87b6da94535754c2baee9d69010eb1b91eaa4c37
+hx8913f49afe7f01ff0d7318b98f7b4ae9d3cd0d61
+hx8d6aa6dce658688c76341b7f70a56dce5361e7ef
+hx930bb66751f476babc2d49901cf77429c5cf05c1
+hx94a7cd360a40cbf39e92ac91195c2ee3c81940a6
+hx980ab0c7473013f656339795a1c63bf44898ce95
+hx9913b07fbb31f5e334547bdaa880a767b52e45e1
+hx9d9ad1bc19319bd5cdb5516773c0e376db83b644
+hx9db3998119addefc2b34eaf408f27ab8103edaef
+hx9e19d60c9d6a0ecc2bcace688eff9053622c0c4c
+hxa55446e81997c03ee856a58ee18432325a4ef924
+hxa9c54005bfa47bb8c3ff0d8adb5ddaac141556a3
+hxaafc8af9559d5d320745345ec006b0b2170194aa
+hxabdde23cda5b425e71907515940a8f23e29a3134
+hxb7750699ca417561b170a980017bfc5fc9cef42e
+hxbc2f530a7cb6170daae5876fd24d5d81170b93fe
+hxc05ec08b6446a2a16b64eb19b96ea02225b840ab
+hxc1481b2459afdbbde302ab528665b8603f7014dc
+hxc17ff524858dd51722367c5b04770936a78818de
+hxcd6f04b2a5184715ca89e523b6c823ceef2f9c3d
+hxcf1b360dbb5818940acc05198d9966e639380b54
+hxd3b53e10d8c4c755879be09ff9ba975069664b7a
+hxd3f062437b70ab6d6a5f21b208ede64973f70567
+hxd42f6e3abfb7f5b14dbdafa34f03ffecf2a53a92
+hxd8ba6317da2eec0d9d7d1feed4c9c1f3cf358ae1
+hxdd4bc4937923dc140adba57916e3559d039f4203
+hxded0165517700240279be84d532b683a8531d76d
+hxdf6bd350edae21f84e0a12392c17eac7e04817e7
+hxe322ab9b11b63c89b85b9bc7b23350b1d6604595
+hxf1b55731e7f597c4e2b8014b5bfb05ce4976d6bc
+hxf1e3d780c589901d8af69629d1ffae0ff8c92b1d
+hxfc7888bf63d45df125cf567fd8753c05facb3d12
diff --git a/icon_metrics/db.py b/icon_metrics/db.py
new file mode 100644
index 0000000..b2665e1
--- /dev/null
+++ b/icon_metrics/db.py
@@ -0,0 +1,44 @@
+from loguru import logger
+from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
+from sqlalchemy.orm import sessionmaker
+from sqlmodel import SQLModel, create_engine
+
+from icon_metrics.config import settings
+
+SQLALCHEMY_DATABASE_URL_STUB = "://{user}:{password}@{server}:{port}/{db}".format(
+ user=settings.POSTGRES_USER,
+ password=settings.POSTGRES_PASSWORD,
+ server=settings.POSTGRES_SERVER,
+ port=settings.POSTGRES_PORT,
+ db=settings.POSTGRES_DATABASE,
+)
+
+ASYNC_SQLALCHEMY_DATABASE_URL = "postgresql+asyncpg" + SQLALCHEMY_DATABASE_URL_STUB
+SQLALCHEMY_DATABASE_URL = "postgresql+psycopg2" + SQLALCHEMY_DATABASE_URL_STUB
+
+logger.info(f"Connecting to server: {settings.POSTGRES_SERVER} and {settings.POSTGRES_DATABASE}")
+
+async_engine = create_async_engine(ASYNC_SQLALCHEMY_DATABASE_URL, echo=True, future=True)
+
+
+# Run onetime if we want to init with a prebuilt table of attributes
+async def init_db():
+ async with async_engine.begin() as conn:
+ # await conn.run_sync(SQLModel.metadata.drop_all)
+ await conn.run_sync(SQLModel.metadata.create_all)
+
+
+async def get_session() -> AsyncSession:
+ async_session = sessionmaker(async_engine, class_=AsyncSession, expire_on_commit=False)
+ async with async_session() as session:
+ yield session
+
+
+engine = create_engine(SQLALCHEMY_DATABASE_URL)
+SessionMade = sessionmaker(bind=engine)
+session = SessionMade()
+
+if __name__ == "__main__":
+ import asyncio
+
+ asyncio.run(init_db())
diff --git a/icon_metrics/log.py b/icon_metrics/log.py
new file mode 100644
index 0000000..d58df4e
--- /dev/null
+++ b/icon_metrics/log.py
@@ -0,0 +1,23 @@
+import ast
+
+from loguru import logger
+
+
+def sink(message):
+ record = message.record
+ if "deserialize" in record["extra"]:
+ subset = {
+ "timestamp": record["time"].timestamp(),
+ "message": ast.literal_eval(record["message"]),
+ }
+ else:
+ subset = {
+ "timestamp": record["time"].timestamp(),
+ "message": record["message"],
+ }
+
+ print(subset)
+
+
+logger.remove()
+logger.add(sink, enqueue=True)
diff --git a/icon_metrics/main_api.py b/icon_metrics/main_api.py
new file mode 100644
index 0000000..45fd510
--- /dev/null
+++ b/icon_metrics/main_api.py
@@ -0,0 +1,56 @@
+from multiprocessing.pool import ThreadPool
+
+import uvicorn
+from fastapi import FastAPI
+from fastapi_health import health
+from prometheus_client import start_http_server
+from starlette.middleware.cors import CORSMiddleware
+
+from icon_metrics.api.health import is_database_online
+from icon_metrics.api.v1.router import api_router
+from icon_metrics.config import settings
+from icon_metrics.log import logger
+
+app = FastAPI()
+app.add_api_route("/health", health([is_database_online]))
+
+tags_metadata = [
+ {
+ "name": "icon-metrics",
+ "description": "...",
+ },
+]
+
+app = FastAPI(
+ title="ICON Metrics Service",
+ description="Various metrics to support odd queries for the ICON Tracker.",
+ version="v0.1.0",
+ openapi_tags=tags_metadata,
+ openapi_url=f"{settings.DOCS_PREFIX}/openapi.json",
+ docs_url=f"{settings.DOCS_PREFIX}",
+)
+
+app.add_middleware(
+ CORSMiddleware,
+ allow_origins=["*"],
+ allow_credentials=True,
+ allow_methods=["GET", "POST", "OPTIONS"],
+ allow_headers=["*"],
+)
+
+logger.info("Starting metrics server.")
+metrics_pool = ThreadPool(1)
+metrics_pool.apply_async(start_http_server, (settings.METRICS_PORT, settings.METRICS_ADDRESS))
+
+logger.info("Starting application...")
+app.include_router(api_router, prefix=settings.REST_PREFIX)
+
+if __name__ == "__main__":
+ uvicorn.run(
+ "main_api:app",
+ host="0.0.0.0",
+ port=settings.PORT,
+ log_level="info",
+ debug=True,
+ workers=1,
+ )
diff --git a/icon_metrics/main_worker.py b/icon_metrics/main_worker.py
new file mode 100644
index 0000000..1ad7656
--- /dev/null
+++ b/icon_metrics/main_worker.py
@@ -0,0 +1,30 @@
+import asyncio
+from multiprocessing.pool import ThreadPool
+from threading import Thread
+
+from loguru import logger
+from prometheus_client import start_http_server
+
+from icon_metrics.config import settings
+from icon_metrics.db import init_db
+from icon_metrics.workers.prometheus_cron import prometheus_cron_worker
+from icon_metrics.workers.supply_cron import supply_cron_worker
+
+logger.info("Starting metrics server.")
+metrics_pool = ThreadPool(1)
+metrics_pool.apply_async(start_http_server, (settings.METRICS_PORT, settings.METRICS_ADDRESS))
+
+asyncio.run(init_db())
+
+prometheus_cron_worker_thread = Thread(
+ target=prometheus_cron_worker,
+ args=(),
+)
+
+supply_cron_worker_thread = Thread(
+ target=supply_cron_worker,
+ args=(),
+)
+
+prometheus_cron_worker_thread.start()
+supply_cron_worker_thread.start()
diff --git a/icon_metrics/metrics.py b/icon_metrics/metrics.py
new file mode 100644
index 0000000..aee61ef
--- /dev/null
+++ b/icon_metrics/metrics.py
@@ -0,0 +1,10 @@
+from prometheus_client import Gauge
+
+
+class Metrics:
+ def __init__(self):
+ self.circulating_supply = Gauge("circulating_supply", "Total supply - org supply.")
+
+ self.organization_supply = Gauge("organization_supply", "All org wallet balances.")
+
+ self.total_supply = Gauge("total_supply", "Total supply.")
diff --git a/icon_metrics/models/__init__.py b/icon_metrics/models/__init__.py
new file mode 100644
index 0000000..ed06e55
--- /dev/null
+++ b/icon_metrics/models/__init__.py
@@ -0,0 +1 @@
+from icon_metrics.models import *
diff --git a/icon_metrics/models/addresses.py b/icon_metrics/models/addresses.py
new file mode 100644
index 0000000..260cae2
--- /dev/null
+++ b/icon_metrics/models/addresses.py
@@ -0,0 +1,15 @@
+from typing import Optional
+
+from sqlalchemy.orm import declared_attr
+from sqlmodel import Field, SQLModel
+
+
+class Address(SQLModel, table=True):
+ """Internal table to find lists of addresses to monitor."""
+
+ address: Optional[str] = Field(None, primary_key=True)
+ organization_wallet: Optional[bool] = Field(False, index=True)
+
+ @declared_attr
+ def __tablename__(cls) -> str: # noqa: N805
+ return "addresses"
diff --git a/icon_metrics/models/metrics.py b/icon_metrics/models/metrics.py
new file mode 100644
index 0000000..31a950a
--- /dev/null
+++ b/icon_metrics/models/metrics.py
@@ -0,0 +1,18 @@
+from datetime import datetime
+from typing import Optional
+
+from sqlmodel import Field, SQLModel
+
+
+class Transactions(SQLModel, table=True):
+ id: Optional[int] = Field(None, primary_key=True)
+ timestamp: Optional[int] = Field(datetime.now().timestamp(), index=True)
+ total_tx: Optional[int] = Field(None, index=False)
+
+
+class Supply(SQLModel, table=True):
+ id: Optional[int] = Field(None, primary_key=True)
+ timestamp: Optional[int] = Field(datetime.now().timestamp(), index=True)
+ total_supply: Optional[float] = Field(0, index=False)
+ organization_supply: Optional[float] = Field(0, index=False)
+ circulating_supply: Optional[float] = Field(0, index=False)
diff --git a/icon_metrics/utils/rpc.py b/icon_metrics/utils/rpc.py
new file mode 100644
index 0000000..98acd3e
--- /dev/null
+++ b/icon_metrics/utils/rpc.py
@@ -0,0 +1,68 @@
+import json
+
+import requests
+
+from icon_metrics.config import settings
+from icon_metrics.log import logger
+
+
+def post_rpc(payload: dict):
+ r = requests.post(settings.ICON_NODE_URL, data=json.dumps(payload))
+
+ if r.status_code != 200:
+ logger.info(f"Error {r.status_code} with payload {payload}")
+ r = requests.post(settings.BACKUP_ICON_NODE_URL, data=json.dumps(payload))
+ if r.status_code != 200:
+ logger.info(f"Error {r.status_code} with payload {payload} to backup")
+ return
+ return r.json()["result"]
+
+ x = int(r.json()["result"], 16)
+
+ return r.json()["result"]
+
+
+def icx_getTransactionResult(txHash: str):
+ payload = {
+ "jsonrpc": "2.0",
+ "method": "icx_getTransactionResult",
+ "id": 1234,
+ "params": {"txHash": txHash},
+ }
+ return post_rpc(payload)
+
+
+def getPReps():
+ payload = {
+ "jsonrpc": "2.0",
+ "id": 1234,
+ "method": "icx_call",
+ "params": {
+ "to": "cx0000000000000000000000000000000000000000",
+ "dataType": "call",
+ "data": {
+ "method": "getPReps",
+ "params": {"startRanking": "0x1", "endRanking": "0xaaa"}, # Should be all preps
+ },
+ },
+ }
+ return post_rpc(payload)
+
+
+def getBalance(address: str):
+ payload = {
+ "jsonrpc": "2.0",
+ "method": "icx_getBalance",
+ "id": 1234,
+ "params": {"address": address},
+ }
+ return post_rpc(payload)
+
+
+def getTotalSupply():
+ payload = {
+ "jsonrpc": "2.0",
+ "method": "icx_getTotalSupply",
+ "id": 1234,
+ }
+ return post_rpc(payload)
diff --git a/icon_metrics/workers/__init__.py b/icon_metrics/workers/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/icon_metrics/workers/prometheus_cron.py b/icon_metrics/workers/prometheus_cron.py
new file mode 100644
index 0000000..f50468f
--- /dev/null
+++ b/icon_metrics/workers/prometheus_cron.py
@@ -0,0 +1,17 @@
+from time import sleep
+
+from requests import get, post
+
+from icon_metrics.config import settings
+from icon_metrics.metrics import Metrics
+
+metrics = Metrics()
+
+
+def prometheus_cron_worker():
+ if settings.MAIN_PROMETHEUS_ENDPOINT:
+ return
+
+ while True:
+ r = get(settings.MAIN_PROMETHEUS_ENDPOINT)
+ sleep(settings.CRON_SLEEP_SEC)
diff --git a/icon_metrics/workers/supply_cron.py b/icon_metrics/workers/supply_cron.py
new file mode 100644
index 0000000..eea375e
--- /dev/null
+++ b/icon_metrics/workers/supply_cron.py
@@ -0,0 +1,61 @@
+from time import sleep
+
+from sqlalchemy.orm import sessionmaker
+from sqlmodel import select
+
+from icon_metrics.config import settings
+from icon_metrics.db import engine
+from icon_metrics.log import logger
+from icon_metrics.metrics import Metrics
+from icon_metrics.models.addresses import Address
+from icon_metrics.models.metrics import Supply
+from icon_metrics.utils.rpc import getBalance, getTotalSupply
+
+metrics = Metrics()
+
+
+def calculate_organization_supply(addresses):
+ organization_supply = 0
+
+ for address in addresses:
+ address_balance = int(getBalance(address), 16)
+ organization_supply += address_balance
+
+ return organization_supply
+
+
+def supply_cron_worker():
+ """Cron job to scrape a list of known address balances and sum them to get the total supply."""
+ SessionMade = sessionmaker(bind=engine)
+ session = SessionMade()
+
+ i = 0
+ addresses = []
+ while True:
+
+ supply = Supply()
+ supply.total_supply = int(getTotalSupply(), 16)
+
+ if i % 100 == 0:
+ # Wait 100 iterations to refresh
+ query = select(Address).where(Address.organization_wallet)
+ result = session.execute(query)
+ addresses = result.scalars().all()
+ logger.info(f"Iteration {i}")
+
+ supply.organization_supply = calculate_organization_supply([i.address for i in addresses])
+
+ supply.circulating_supply = supply.total_supply - supply.organization_supply
+
+ session.add(supply)
+ session.commit()
+
+ metrics.organization_supply = supply.organization_supply
+ metrics.circulating_supply = supply.circulating_supply
+ metrics.total_supply = supply.total_supply
+ sleep(settings.CRON_SLEEP_SEC)
+ i += 1
+
+
+if __name__ == "__main__":
+ supply_cron_worker()
diff --git a/requirements_api.txt b/requirements_api.txt
new file mode 100644
index 0000000..b4957ec
--- /dev/null
+++ b/requirements_api.txt
@@ -0,0 +1,8 @@
+requests==2.26.0
+loguru==0.5.3
+prometheus_client==0.11.0
+asyncpg==0.24.0
+fastapi==0.68.1
+sqlmodel==0.0.4
+uvicorn==0.15.0
+fastapi_health
diff --git a/requirements_dev.txt b/requirements_dev.txt
new file mode 100644
index 0000000..04a5524
--- /dev/null
+++ b/requirements_dev.txt
@@ -0,0 +1,6 @@
+pytest
+pytest-mock
+pytest-cov
+
+docker-compose
+grpcio-tools==1.40.0
diff --git a/requirements_worker.txt b/requirements_worker.txt
new file mode 100644
index 0000000..c37a626
--- /dev/null
+++ b/requirements_worker.txt
@@ -0,0 +1,11 @@
+nanoid==2.0.0
+requests==2.26.0
+loguru==0.5.3
+prometheus_client==0.11.0
+grpcio==1.40.0
+protobuf
+confluent_kafka
+alembic==1.7.1
+asyncpg==0.24.0
+psycopg2-binary
+sqlmodel==0.0.4
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..f781a70
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,34 @@
+import logging
+import os
+from typing import Generator
+
+import pytest
+from _pytest.logging import caplog as _caplog
+from fastapi.testclient import TestClient
+from loguru import logger
+
+
+@pytest.fixture(scope="module")
+def client() -> Generator:
+ from icon_metrics.main_api import app
+
+ with TestClient(app) as c:
+ yield c
+
+
+@pytest.fixture(scope="module")
+def data_dir():
+ return os.path.join(
+ os.path.dirname(__file__), "..", "icon_metrics", "data", "organization-addresses.csv"
+ )
+
+
+@pytest.fixture
+def caplog(_caplog):
+ class PropogateHandler(logging.Handler):
+ def emit(self, record):
+ logging.getLogger(record.name).handle(record)
+
+ handler_id = logger.add(PropogateHandler(), format="{message} {extra}")
+ yield _caplog
+ logger.remove(handler_id)
diff --git a/tests/integration/api/test_preps.py b/tests/integration/api/test_preps.py
new file mode 100644
index 0000000..67b0c33
--- /dev/null
+++ b/tests/integration/api/test_preps.py
@@ -0,0 +1,9 @@
+from fastapi.testclient import TestClient
+from sqlalchemy.orm import Session
+
+from icon_metrics.config import settings
+
+
+def test_api_get_preps(db: Session, client: TestClient):
+ response = client.get(f"{settings.REST_PREFIX}/preps")
+ assert response.status_code == 200
diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py
new file mode 100644
index 0000000..1842a7c
--- /dev/null
+++ b/tests/integration/conftest.py
@@ -0,0 +1,112 @@
+import os
+from threading import Thread
+from time import sleep
+
+import pytest
+from compose.cli.command import project_from_options
+from compose.service import ImageType
+
+from icon_metrics.db import session
+from icon_metrics.models.preps import Prep
+
+
+@pytest.fixture(scope="session")
+def db():
+ yield session
+
+
+@pytest.fixture()
+def db_migration():
+ import alembic.config
+
+ cur_dir = os.path.abspath(os.path.dirname(__file__))
+ alembic_dir = os.path.join(cur_dir, "../../icon_metrics")
+ os.chdir(alembic_dir)
+
+ alembicArgs = [
+ "--raiseerr",
+ "upgrade",
+ "head",
+ ]
+ alembic.config.main(argv=alembicArgs)
+ yield
+
+ # from icon_metrics.alembic.env import run_migrations_offline
+ # run_migrations_offline()
+
+
+@pytest.fixture()
+def get_path_to_file():
+ def f(file_name):
+
+ cur_dir = os.getcwd()
+
+ while True:
+ file_list = os.listdir(cur_dir)
+ parent_dir = os.path.dirname(cur_dir)
+
+ if file_name in file_list:
+ return cur_dir
+ else:
+ if cur_dir == parent_dir:
+ break
+ else:
+ cur_dir = parent_dir
+
+ return f
+
+
+@pytest.fixture()
+def get_compose_project(get_path_to_file):
+ def f(compose_files=None):
+ if compose_files is None:
+ compose_files = ["docker-compose.db.yml"]
+
+ project_dir = get_path_to_file(compose_files[0])
+
+ project = project_from_options(
+ project_dir=str(project_dir),
+ options={"--file": compose_files},
+ )
+ return project
+
+ return f
+
+
+@pytest.fixture()
+def docker_up_block(get_compose_project):
+ def f(block, compose_files=None):
+ get_compose_project(compose_files)
+ os.environ["START_BLOCK"] = block
+
+ project = get_compose_project()
+ project.up()
+
+ return project
+
+ return f
+
+
+@pytest.fixture()
+def docker_project_down(get_compose_project):
+ def f(project):
+ project.down(ImageType.none, "--docker-compose-remove-volumes")
+
+ return f
+
+
+@pytest.fixture()
+def run_process_wait():
+ def f(target, timeout: int = 1):
+ thread = Thread(
+ target=target,
+ args=(),
+ )
+ thread.daemon = True
+ thread.start()
+
+ # Let worker work
+ sleep(timeout)
+ assert thread.is_alive()
+
+ return f
diff --git a/tests/integration/utils/test_details.py b/tests/integration/utils/test_details.py
new file mode 100644
index 0000000..26b3450
--- /dev/null
+++ b/tests/integration/utils/test_details.py
@@ -0,0 +1,10 @@
+from icon_metrics.utils.details import get_details
+
+
+def test_utils_details():
+ details = get_details(
+ "https://hugobyte-mainnet-aws-us-west-2.s3-us-west-2.amazonaws.com/details.json"
+ )
+
+ assert "logo_256" in details
+ assert "location" not in details
diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py
new file mode 100644
index 0000000..2d0b72d
--- /dev/null
+++ b/tests/unit/test_config.py
@@ -0,0 +1,4 @@
+def test_settings():
+ from icon_metrics.config import settings
+
+ assert settings
diff --git a/tests/unit/worker/test_supply_cron.py b/tests/unit/worker/test_supply_cron.py
new file mode 100644
index 0000000..14bc992
--- /dev/null
+++ b/tests/unit/worker/test_supply_cron.py
@@ -0,0 +1,21 @@
+import csv
+
+import pytest
+
+from icon_metrics.workers.supply_cron import calculate_organization_supply
+
+
+@pytest.fixture()
+def organization_addresses(data_dir):
+ addresses = []
+ with open(data_dir) as f:
+ reader = csv.reader(f, delimiter=",")
+ for row in reader:
+ addresses.append(row[0])
+ return addresses
+
+
+def test_calculate_organization_supply(organization_addresses):
+ organization_supply = calculate_organization_supply(organization_addresses) / 1e18
+
+ assert organization_supply < 240000000