diff --git a/.bra.toml b/.bra.toml deleted file mode 100644 index bc2edd8..0000000 --- a/.bra.toml +++ /dev/null @@ -1,31 +0,0 @@ -[run] -watch_all = true -watch_dirs = ["cmd", "pkg"] -watch_exts = [".go"] -ignore = [".git", "bin", "dist"] -ignore_files = [] -build_delay = 1500 -interrupt_timout = 15 -graceful_kill = false - -init_cmds = [ - ["make", "build"], - [ - "./bin/prometheus-scw-sd", - "--log.pretty", - "--log.level", - "debug", - "server" - ] -] - -cmds = [ - ["make", "build"], - [ - "./bin/prometheus-scw-sd", - "--log.pretty", - "--log.level", - "debug", - "server" - ] -] diff --git a/.codacy.yml b/.codacy.yml deleted file mode 100644 index d66398f..0000000 --- a/.codacy.yml +++ /dev/null @@ -1,3 +0,0 @@ -exclude_paths: - - _tools/** - - vendor/** diff --git a/.drone.star b/.drone.star new file mode 100644 index 0000000..0ef343f --- /dev/null +++ b/.drone.star @@ -0,0 +1,686 @@ +description = 'Prometheus Scaleway SD' + +def main(ctx): + return [ + testing(ctx), + + docker(ctx, 'amd64'), + docker(ctx, 'i386'), + docker(ctx, 'arm64v8'), + docker(ctx, 'arm32v6'), + + binary(ctx, 'linux'), + binary(ctx, 'darwin'), + binary(ctx, 'windows'), + + manifest(ctx), + docs(ctx), + changelog(ctx), + readme(ctx), + badges(ctx), + notify(ctx), + ] + +def testing(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'testing', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make generate', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'vet', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make vet', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'staticcheck', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make staticcheck', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'lint', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make lint', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'build', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make build', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'test', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make test', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'codacy', + 'image': 'plugins/codacy:1', + 'pull': 'always', + 'settings': { + 'token': { + 'from_secret': 'codacy_token', + }, + }, + }, + ], + 'volumes': [ + { + 'name': 'gopath', + 'temp': {}, + }, + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + 'refs/pull/**', + ], + }, + } + +def docker(ctx, arch): + if arch == 'i386': + agent = 'amd64' + environment = { + 'GOARCH': '386', + } + + if arch == 'amd64': + agent = 'amd64' + environment = {} + + if arch == 'arm32v6': + agent = 'arm' + environment = {} + + if arch == 'arm32v7': + agent = 'arm' + environment = {} + + if arch == 'arm64v8': + agent = 'arm64' + environment = {} + + if ctx.build.event == 'pull_request': + docker = { + 'dry_run': True, + 'tags': 'linux-%s' % (arch), + 'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), + 'repo': ctx.repo.slug, + } + else: + docker = { + 'username': { + 'from_secret': 'docker_username', + }, + 'password': { + 'from_secret': 'docker_password', + }, + 'auto_tag': True, + 'auto_tag_suffix': 'linux-%s' % (arch), + 'dockerfile': 'docker/Dockerfile.linux.%s' % (arch), + 'repo': ctx.repo.slug, + } + + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': arch, + 'platform': { + 'os': 'linux', + 'arch': agent, + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'environment': environment, + 'commands': [ + 'make generate', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'build', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'environment': environment, + 'commands': [ + 'make build', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'docker', + 'image': 'plugins/docker:18.09', + 'pull': 'always', + 'settings': docker, + }, + ], + 'volumes': [ + { + 'name': 'gopath', + 'temp': {}, + }, + ], + 'depends_on': [ + 'testing', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + 'refs/pull/**', + ], + }, + } + +def binary(ctx, name): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': name, + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make generate', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'build', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make release-%s' % (name), + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'finish', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make release-finish', + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ], + }, + { + 'name': 'gpgsign', + 'image': 'plugins/gpgsign:1', + 'pull': 'always', + 'settings': { + 'key': { + 'from_secret': 'gpgsign_key', + }, + 'passphrase': { + 'from_secret': 'gpgsign_passphrase', + }, + 'files': [ + 'dist/release/*', + ], + 'excludes': [ + 'dist/release/*.sha256', + ], + 'detach_sign': True, + }, + 'when': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + }, + { + 'name': 'changelog', + 'image': 'toolhippie/calens:latest', + 'pull': 'always', + 'commands': [ + 'calens --version %s -o dist/CHANGELOG.md' % ctx.build.ref.replace('refs/tags/v', '').split('-')[0], + ], + 'when': { + 'ref': [ + 'refs/tags/**', + ], + }, + }, + { + 'name': 'release', + 'image': 'plugins/github-release:1', + 'pull': 'always', + 'settings': { + 'api_key': { + 'from_secret': 'github_token', + }, + 'files': [ + 'dist/release/*', + ], + 'title': ctx.build.ref.replace('refs/tags/', ''), + 'note': 'dist/CHANGELOG.md', + 'overwrite': True, + }, + 'when': { + 'ref': [ + 'refs/tags/**', + ], + }, + }, + ], + 'volumes': [ + { + 'name': 'gopath', + 'temp': {}, + }, + ], + 'depends_on': [ + 'testing', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + 'refs/pull/**', + ], + }, + } + +def manifest(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'manifest', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'plugins/manifest:1', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'docker_username', + }, + 'password': { + 'from_secret': 'docker_password', + }, + 'spec': 'docker/manifest.tmpl', + 'auto_tag': True, + 'ignore_missing': True, + }, + }, + ], + 'depends_on': [ + 'amd64', + 'i386', + 'arm64v8', + 'arm32v6', + 'linux', + 'darwin', + 'windows', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + } + +def docs(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'docs', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'generate', + 'image': 'webhippie/hugo:latest', + 'pull': 'always', + 'commands': [ + 'make docs', + ], + }, + { + 'name': 'publish', + 'image': 'plugins/gh-pages:1', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'github_username', + }, + 'password': { + 'from_secret': 'github_token', + }, + 'pages_directory': 'docs/public/', + 'temporary_base': 'tmp/', + }, + 'when': { + 'event': { + 'exclude': [ + 'pull_request', + ], + } + }, + }, + ], + 'depends_on': [ + 'manifest', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/pull/**', + ], + }, + } + +def changelog(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'changelog', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'clone': { + 'disable': True, + }, + 'steps': [ + { + 'name': 'clone', + 'image': 'plugins/git-action:1', + 'pull': 'always', + 'settings': { + 'actions': [ + 'clone', + ], + 'remote': 'https://github.com/%s' % (ctx.repo.slug), + 'branch': ctx.build.source if ctx.build.event == 'pull_request' else 'master', + 'path': '/drone/src', + 'netrc_machine': 'github.com', + 'netrc_username': { + 'from_secret': 'github_username', + }, + 'netrc_password': { + 'from_secret': 'github_token', + }, + }, + }, + { + 'name': 'generate', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'make changelog', + ], + }, + { + 'name': 'changes', + 'image': 'webhippie/golang:1.13', + 'pull': 'always', + 'commands': [ + 'git diff CHANGELOG.md', + ], + }, + { + 'name': 'publish', + 'image': 'plugins/git-action:1', + 'pull': 'always', + 'settings': { + 'actions': [ + 'commit', + 'push', + ], + 'message': 'Automated changelog update [skip ci]', + 'branch': 'master', + 'author_email': 'drone@webhippie.de', + 'author_name': 'Drone', + 'netrc_machine': 'github.com', + 'netrc_username': { + 'from_secret': 'github_username', + }, + 'netrc_password': { + 'from_secret': 'github_token', + }, + }, + 'when': { + 'ref': { + 'exclude': [ + 'refs/pull/**', + ], + }, + }, + }, + ], + 'depends_on': [ + 'manifest', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + ], + }, + } + +def readme(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'readme', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'sheogorath/readme-to-dockerhub:latest', + 'pull': 'always', + 'environment': { + 'DOCKERHUB_USERNAME': { + 'from_secret': 'docker_username', + }, + 'DOCKERHUB_PASSWORD': { + 'from_secret': 'docker_password', + }, + 'DOCKERHUB_REPO_PREFIX': ctx.repo.namespace, + 'DOCKERHUB_REPO_NAME': ctx.repo.name, + 'SHORT_DESCRIPTION': description, + 'README_PATH': 'README.md', + }, + }, + ], + 'depends_on': [ + 'manifest', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + ], + }, + } + +def badges(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'badges', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'clone': { + 'disable': True, + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'plugins/webhook:1', + 'pull': 'always', + 'settings': { + 'urls': { + 'from_secret': 'microbadger_url', + }, + }, + }, + ], + 'depends_on': [ + 'manifest', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + }, + } + +def notify(ctx): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'notify', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'clone': { + 'disable': True, + }, + 'steps': [ + { + 'name': 'execute', + 'image': 'plugins/matrix:1', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'matrix_username', + }, + 'password': { + 'from_secret': 'matrix_password', + }, + 'roomid': { + 'from_secret': 'matrix_roomid', + }, + }, + }, + ], + 'depends_on': [ + 'docs', + 'changelog', + 'readme', + 'badges', + ], + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/**', + ], + 'status': [ + 'failure', + ], + }, + } diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index cd43e17..0000000 --- a/.drone.yml +++ /dev/null @@ -1,318 +0,0 @@ ---- -kind: pipeline -name: default - -platform: - os: linux - arch: amd64 - -workspace: - base: /srv/app - path: src/github.com/promhippie/prometheus-scw-sd - -steps: -- name: app-prepare - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make clean - - make retool - - make sync - - make generate - -- name: app-vet - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make vet - -- name: app-check - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make megacheck - -- name: app-lint - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make lint - -- name: app-test - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make test - -- name: app-build - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make build - -- name: app-windows - image: karalabe/xgo-1.10:latest - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make release-dirs release-windows - settings: - group: release - when: - event: - - push - - tag - -- name: app-linux - image: karalabe/xgo-1.10:latest - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make release-dirs release-linux - settings: - group: release - when: - event: - - push - - tag - -- name: app-darwin - image: karalabe/xgo-1.10:latest - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make release-dirs release-darwin - settings: - group: release - when: - event: - - push - - tag - -- name: app-finish - image: webhippie/golang:1.10 - pull: always - environment: - CGO_ENABLED: 0 - GOPATH: /srv/app - commands: - - make release-copy release-check - when: - event: - - push - - tag - -- name: app-gpgsign - pull: always - image: plugins/gpgsign:1 - settings: - key: - from_secret: gpgsign_key - passphrase: - from_secret: gpgsign_passphrase - detach_sign: true - excludes: - - "dist/release/*.sha256" - files: - - "dist/release/*" - when: - event: - - push - - tag - -- name: docker-amd64 - pull: always - image: plugins/docker:17.05 - settings: - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: linux-amd64 - dockerfile: docker/Dockerfile.linux.amd64 - repo: promhippie/prometheus-scw-sd - when: - event: - - push - - tag - -- name: docker-i386 - pull: always - image: plugins/docker:17.05 - settings: - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: linux-i386 - dockerfile: docker/Dockerfile.linux.i386 - repo: promhippie/prometheus-scw-sd - when: - event: - - push - - tag - -- name: docker-arm64v8 - pull: always - image: plugins/docker:17.05 - settings: - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: linux-arm64v8 - dockerfile: docker/Dockerfile.linux.arm64v8 - repo: promhippie/prometheus-scw-sd - when: - event: - - push - - tag - -- name: docker-arm32v7 - pull: always - image: plugins/docker:17.05 - settings: - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: linux-arm32v7 - dockerfile: docker/Dockerfile.linux.arm32v7 - repo: promhippie/prometheus-scw-sd - when: - event: - - push - - tag - -- name: docker-arm32v6 - pull: always - image: plugins/docker:17.05 - settings: - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - auto_tag_suffix: linux-arm32v6 - dockerfile: docker/Dockerfile.linux.arm32v6 - repo: promhippie/prometheus-scw-sd - when: - event: - - push - - tag - -- name: docker-manifests - pull: always - image: plugins/manifest:1 - settings: - username: - from_secret: docker_username - password: - from_secret: docker_password - auto_tag: true - ignore_missing: true - spec: manifest.tmpl - when: - event: - - push - - tag - -- name: docker-microbadger - pull: always - image: plugins/webhook:1 - settings: - urls: - from_secret: microbadger_token - when: - event: - - push - - tag - -- name: docs-build - pull: always - image: webhippie/hugo:latest - commands: - - make docs - when: - event: - - push - -- name: docs-publish - pull: always - image: plugins/gh-pages:1 - settings: - username: - from_secret: github_username - password: - from_secret: github_password - pages_directory: docs/public/ - temporary_base: tmp/ - when: - event: - - push - -- name: github-release - pull: always - image: plugins/github-release:1 - settings: - api_key: - from_secret: github_token - files: - - "dist/release/*" - when: - event: - - tag - -- name: notify-matrix - pull: always - image: plugins/matrix:1 - settings: - username: - from_secret: matrix_username - password: - from_secret: matrix_password - roomid: - from_secret: matrix_roomid - when: - event: - - push - - tag - status: - - changed - - failure - -trigger: - ref: - - refs/heads/master - - "refs/tags/**" - - "refs/pull/**" - -... diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..32ef92a --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,56 @@ +repository: + name: prometheus-scw-sd + description: Prometheus Service Discovery for Scaleway + homepage: https://promhippie.github.io/prometheus-scw-sd/ + topics: prometheus, service, discovery, sd, service-discovery, prometheus-exporter, scaleway, scw + + private: false + has_issues: true + has_wiki: false + has_downloads: false + + default_branch: master + + allow_squash_merge: true + allow_merge_commit: true + allow_rebase_merge: true + +labels: + - name: bug + color: d73a4a + description: Something isn't working + - name: duplicate + color: cfd3d7 + description: This issue or pull request already exists + - name: enhancement + color: a2eeef + description: New feature or request + - name: good first issue + color: 7057ff + description: Good for newcomers + - name: help wanted + color: 008672 + description: Extra attention is needed + - name: invalid + color: e4e669 + description: This doesn't seem right + - name: question + color: d876e3 + description: Further information is requested + - name: renovate + color: e99695 + description: Automated action from Renovate + - name: wontfix + color: ffffff + description: This will not be worked on + - name: outdated + color: cccccc + description: This is out of scope and outdated + +branches: + - name: master + protection: + required_status_checks: + strict: true + contexts: + - continuous-integration/drone/pr diff --git a/.gitignore b/.gitignore index 3c5dc2f..53db1c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,8 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - coverage.out +ab0x.go -/_tools -/vendor /bin /dist -.envrc scw.json config.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ad9ab5..159d4ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,37 +1,151 @@ -# Changelog +# Changelog for unreleased -## [0.3.0] - 2019-03-27 +The following sections list the changes for unreleased. -### Changed +## Summary -* Switch to cloud.drone.io for CI + * Chg #1337: Upgrade Scaleway SDK + * Chg #1337: Code and project restructuring -### Added +## Details -* Add support for server tags -* Support multiple credentials and config file -* Add simple healthcheck command + * Change #1337: Upgrade Scaleway SDK -### Removed + As Scaleway has dropped the previously used Go library we are forced to update to the new SDK. + With this change we are forced to update the required attributes which results in a breaking + change. The new Scaleway API requires an access and secret key instead of a single access token. + Beside that the region flag had to be dropped in favor of a zone flag. -* Region is not a requirement anymore + https://github.com/promhippie/prometheus-scw-sd/pull/1337 -## [0.2.0] - 2019-01-12 + * Change #1337: Code and project restructuring -### Added + To get the project and code structure into a new shape and to get it cleaned up we switched to Go + modules and restructured the project source in general. -* Add basic documentation -* Use xgo 1.10 for cross-compiling -* Add panic recover to metrics handler -* Add timeout to metrics handler -* Add labels for public/private dns name + https://github.com/promhippie/prometheus-scw-sd/pull/1337 -### Changed -* Update all build dependencies +# Changelog for 0.3.0 -## [0.1.0] - 2018-09-24 +The following sections list the changes for 0.3.0. + +## Summary + + * Chg #9: Define healthcheck command + * Chg #6: Support for multiple accounts + * Chg #6: Drop region requirement + * Chg #5: Add support for server tags + * Chg #4: Switch to cloud.drone.io + +## Details + + * Change #9: Define healthcheck command + + To check the health status of the service discovery especially within Docker we added a simple + subcommand which checks the healthz endpoint to show if the service is up and running. + + https://github.com/promhippie/prometheus-scw-sd/pull/9 + + * Change #6: Support for multiple accounts + + Make the deployments of this service discovery easier, previously we had to launch one + instance for every credentials we wanted to gather, with this change we are able to define + multiple credentials for a single instance of the service discovery. + + https://github.com/promhippie/prometheus-scw-sd/pull/6 + + * Change #6: Drop region requirement + + As the API doesn't enforce the requirement for the selected region we can safely remove this + hard requirement. + + https://github.com/promhippie/prometheus-scw-sd/pull/6 + + * Change #5: Add support for server tags + + Since Scaleway supports tags for servers we should also map these labels to the exported JSON + file. + + https://github.com/promhippie/prometheus-scw-sd/pull/5 + + * Change #4: Switch to cloud.drone.io + + We don't wanted to maintain our own Drone infrastructure anymore, since there is + cloud.drone.io available for free we switched the pipelines over to it. + + https://github.com/promhippie/prometheus-scw-sd/pull/4 + + +# Changelog for 0.2.0 + +The following sections list the changes for 0.2.0. + +## Summary + + * Chg #1: Add basic documentation + * Chg #2: Pin xgo to golang 1.10 to avoid issues + * Chg #3: Update dependencies + * Chg #3: Labels for DNS names + * Chg #3: Timeout for metrics handler + * Chg #3: Panic recover within handlers + +## Details + + * Change #1: Add basic documentation + + Add some basic documentation page which also includes build and installation instructions to + make clear how this project can be installed and used. + + https://github.com/promhippie/prometheus-scw-sd/pull/1 + + * Change #2: Pin xgo to golang 1.10 to avoid issues + + There had been issues while using the latest xgo version, let's pin this tag to 1.10 to ensure the + binaries are properly build. + + https://github.com/promhippie/prometheus-scw-sd/pull/2 + + * Change #3: Update dependencies + + Just make sure to update all the build dependencies to work with the latest versions available. + + https://github.com/promhippie/prometheus-scw-sd/pull/3 + + * Change #3: Labels for DNS names + + To filter or use the public and private DNS names we added separate labels for both values. + + https://github.com/promhippie/prometheus-scw-sd/pull/3 + + * Change #3: Timeout for metrics handler + + We added an additional middleware to properly timeout requests to the metrics endpoint for + long running request. + + https://github.com/promhippie/prometheus-scw-sd/pull/3 + + * Change #3: Panic recover within handlers + + To make sure panics are properly handled we added a middleware to recover properly from panics. + + https://github.com/promhippie/prometheus-scw-sd/pull/3 + + +# Changelog for 0.1.0 + +The following sections list the changes for 0.1.0. + +## Summary + + * Chg #10: Initial release of basic version + +## Details + + * Change #10: Initial release of basic version + + Just prepared an initial basic version which could be released to the public. + + https://github.com/promhippie/prometheus-scw-sd/issues/10 -### Added -* Initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c65ddd6..2825dc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,6 @@ Welcome! Our community focuses on helping others and making this project the best it can be. We gladly accept contributions and encourage you to get involved! - ## Bug reports Please search the issues on the issue tracker with a variety of keywords to ensure your bug is not already reported. @@ -13,33 +12,28 @@ The burden is on you to convince us that it is actually a bug in our project. Th Please be kind, remember that this project comes at no cost to you, and you're getting free help. - ## Check for assigned people We are using Github Issues for submitting known issues (e.g. bugs, features, etc.). Some issues will have someone assigned, meaning that there's already someone that takes responsability for fixing said issue. This is not done to discourage contributions, rather to not step in the work that has already been done by the assignee. If you want to work on a known issue with someone already assigned to it, please consider contacting the assignee first (e.g. by mentioning the assignee in a new comment on the specific issue). This way you can contribute with ideas, or even with code if the assignee decides that you can step in. If you plan to work on a non assigned issue, please add a comment on the issue to prevent duplicated work. - ## Minor improvements and new tests Submit pull requests at any time for minor changes or new tests. Make sure to write tests to assert your change is working properly and is thoroughly covered. We'll ask most pull requests to be squashed, especially with small commits. Your pull request may be thoroughly reviewed. This is because if we accept the PR, we also assume responsibility for it, although we would prefer you to help maintain your code after it gets merged. - ## Mind the Style We believe that in order to have a healthy codebase we need to abide to a certain code style. We use `gofmt` with Go and `eslint` with Javscript for this matter, which are tools that has proved to be useful. So, before submitting your Pull Request, make sure that `gofmt` and if viable `eslint` are passing for you. Finally, note that `gofmt` and if viable `eslint` are called on the CI system. This means that your Pull Request will not be merged until the changes are approved. - ## Update the Changelog We keep a changelog in the `CHANGELOG.md` file. This is useful to understand what has changed between each version. When you implement a new feature, or a fix for an issue, please also update the `CHANGELOG.md` file accordingly. We don't follow a strict style for the changelog, just try to be consistent with the rest of the file. - ## Sign your work The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: If you can certify [DCO](DCO), then you just add a line to every git commit message: @@ -50,7 +44,6 @@ Signed-off-by: Joe Smith Please use your real name, we really dislike pseudonyms or anonymous contributions. We are in the opensource world without secrets. If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. - ## Collaborator status If your pull request is merged, congratulations! You're technically a collaborator. We may also grant you "Collaborator status" which means you can push to the repository and merge other pull requests. We hope that you will stay involved by reviewing pull requests, submitting more of your own, and resolving issues as you are able to. Thanks for making this project amazing! @@ -62,12 +55,10 @@ Collaborator status may be removed for inactive users from time to time as we se **Reviewing pull requests:** Please help submit and review pull requests as you are able! We would ask that every pull request be reviewed by at least one collaborator who did not open the pull request before merging. This will help ensure high code quality as new collaborators are added to the project. - ## Vulnerabilities If you've found a vulnerability that is serious, please email to thomas@webhippie.de. If it's not a big deal, a pull request will probably be faster. - ## Thank you Thanks for your help! This project would not be what it is today without your contributions. diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index ab40172..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,920 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:5ad08b0e14866764a6d7475eb11c9cf05cad9a52c442593bdfa544703ff77f61" - name = "cloud.google.com/go" - packages = ["compute/metadata"] - pruneopts = "UT" - revision = "0ebda48a7f143b1cce9eb37a8c1106ac762a3430" - version = "v0.34.0" - -[[projects]] - digest = "1:b92928b73320648b38c93cacb9082c0fe3f8ac3383ad9bd537eef62c380e0e7a" - name = "contrib.go.opencensus.io/exporter/ocagent" - packages = ["."] - pruneopts = "UT" - revision = "00af367e65149ff1f2f4b93bbfbb84fd9297170d" - version = "v0.2.0" - -[[projects]] - digest = "1:37ee238802aa0b84f701894eccfc08dc2c643dc20de62b48f42350be2d67964d" - name = "github.com/Azure/azure-sdk-for-go" - packages = [ - "arm/compute", - "arm/network", - ] - pruneopts = "UT" - revision = "bd73d950fa4440dae889bd9917bff7cef539f86e" - -[[projects]] - digest = "1:caed1eb7addfa1f3dab5b62166db42a742011a5389a9015925dc3bbe3b8e6064" - name = "github.com/Azure/go-autorest" - packages = [ - "autorest", - "autorest/adal", - "autorest/azure", - "autorest/date", - "autorest/to", - "autorest/validation", - "logger", - "tracing", - ] - pruneopts = "UT" - revision = "f401b1ccc8eb505927fae7a0c7f6406d37ca1c7e" - version = "v11.2.8" - -[[projects]] - digest = "1:6c0f1bc4d83abbdcb860204b7935b5cf072d449e225c33946b68968aa06d20a0" - name = "github.com/armon/go-metrics" - packages = ["."] - pruneopts = "UT" - revision = "3df31a1ada83e310c2e24b267c8e8b68836547b4" - -[[projects]] - digest = "1:a55c28f5db05affbcf4ca07dd3ce3c79a713b1d0920580fac33b63938ede0538" - name = "github.com/aws/aws-sdk-go" - packages = [ - "aws", - "aws/awserr", - "aws/awsutil", - "aws/client", - "aws/client/metadata", - "aws/corehandlers", - "aws/credentials", - "aws/credentials/ec2rolecreds", - "aws/credentials/endpointcreds", - "aws/credentials/processcreds", - "aws/credentials/stscreds", - "aws/csm", - "aws/defaults", - "aws/ec2metadata", - "aws/endpoints", - "aws/request", - "aws/session", - "aws/signer/v4", - "internal/ini", - "internal/sdkio", - "internal/sdkrand", - "internal/sdkuri", - "internal/shareddefaults", - "private/protocol", - "private/protocol/ec2query", - "private/protocol/query", - "private/protocol/query/queryutil", - "private/protocol/rest", - "private/protocol/xml/xmlutil", - "service/ec2", - "service/sts", - ] - pruneopts = "UT" - revision = "3991042237b45cf58c9d5f34295942d5533c28c6" - version = "v1.16.11" - -[[projects]] - branch = "master" - digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" - name = "github.com/beorn7/perks" - packages = ["quantile"] - pruneopts = "UT" - revision = "3a771d992973f24aa725d07868b467d1ddfceafb" - -[[projects]] - digest = "1:7b69ec1477f4beff10335b7da13a3c0329dfdb3141c5653a249760d1ee177a7c" - name = "github.com/census-instrumentation/opencensus-proto" - packages = [ - "gen-go/agent/common/v1", - "gen-go/agent/trace/v1", - "gen-go/resource/v1", - "gen-go/trace/v1", - ] - pruneopts = "UT" - revision = "7f2434bc10da710debe5c4315ed6d4df454b4024" - version = "v0.1.0" - -[[projects]] - digest = "1:6b21090f60571b20b3ddc2c8e48547dffcf409498ed6002c2cada023725ed377" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "782f4967f2dc4564575ca782fe2d04090b5faca8" - -[[projects]] - digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55" - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - pruneopts = "UT" - revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" - version = "v3.2.0" - -[[projects]] - digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" - name = "github.com/ghodss/yaml" - packages = ["."] - pruneopts = "UT" - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - digest = "1:7c6b8979929c5542ff80ee1352a73b81ce2928f65f310ee0448d113ba5c48a4a" - name = "github.com/go-chi/chi" - packages = [ - ".", - "middleware", - ] - pruneopts = "UT" - revision = "b5294d10673813fac8558e7f47242bc9e61b4c25" - version = "v3.3.3" - -[[projects]] - digest = "1:879d3221bf278c4925544f8c86cb9a83659920c1be38f0d4d1cd0041ec8ffe98" - name = "github.com/go-kit/kit" - packages = [ - "log", - "log/level", - ] - pruneopts = "UT" - revision = "12210fb6ace19e0496167bb3e667dcd91fa9f69b" - version = "v0.8.0" - -[[projects]] - digest = "1:4062bc6de62d73e2be342243cf138cf499b34d558876db8d9430e2149388a4d8" - name = "github.com/go-logfmt/logfmt" - packages = ["."] - pruneopts = "UT" - revision = "07c9b44f60d7ffdfb7d8efe1ad539965737836dc" - version = "v0.4.0" - -[[projects]] - digest = "1:177f01fdf8b3ece9a5a15794878f7463e0d5790f5d4c7c8cb7148c1193460afc" - name = "github.com/gogo/protobuf" - packages = [ - "proto", - "sortkeys", - ] - pruneopts = "UT" - revision = "342cbe0a04158f6dcb03ca0079991a51a4248c02" - version = "v0.5" - -[[projects]] - branch = "master" - digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467" - name = "github.com/golang/glog" - packages = ["."] - pruneopts = "UT" - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - -[[projects]] - digest = "1:92a1b6546eab24700568ef2821fd42fccc527361056bbb70837442e14aa32f12" - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp", - "ptypes/wrappers", - ] - pruneopts = "UT" - revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" - version = "v1.2.0" - -[[projects]] - branch = "master" - digest = "1:0bfbe13936953a98ae3cfe8ed6670d396ad81edf069a806d2f6515d7bb6950df" - name = "github.com/google/btree" - packages = ["."] - pruneopts = "UT" - revision = "4030bb1f1f0c35b30ca7009e9ebd06849dd45306" - -[[projects]] - digest = "1:41bfd4219241b7f7d6e6fdb13fc712576f1337e68e6b895136283b76928fdd66" - name = "github.com/google/gofuzz" - packages = ["."] - pruneopts = "UT" - revision = "44d81051d367757e1c7c6a5a86423ece9afcf63c" - -[[projects]] - digest = "1:1d6cd25e67e73ad2532c382470a6f89454deb95a34b5c3f925b89b69ad886c9f" - name = "github.com/googleapis/gnostic" - packages = [ - "OpenAPIv2", - "compiler", - "extensions", - ] - pruneopts = "UT" - revision = "0c5108395e2debce0d731cf0287ddf7242066aba" - -[[projects]] - branch = "master" - digest = "1:fb5beac410bc179e215392f97a40b12c965047974fb6698b09fde01965b76941" - name = "github.com/gophercloud/gophercloud" - packages = [ - ".", - "openstack", - "openstack/compute/v2/extensions/floatingips", - "openstack/compute/v2/extensions/hypervisors", - "openstack/compute/v2/flavors", - "openstack/compute/v2/images", - "openstack/compute/v2/servers", - "openstack/identity/v2/tenants", - "openstack/identity/v2/tokens", - "openstack/identity/v3/tokens", - "openstack/utils", - "pagination", - ] - pruneopts = "UT" - revision = "94924357ebf6c7d448c70d65082ff7ca6f78ddc5" - -[[projects]] - digest = "1:2b7718265ba4d3a1935b9da9907fd30cb3d605fa2260845932b3728efa8f1c84" - name = "github.com/gregjones/httpcache" - packages = [ - ".", - "diskcache", - ] - pruneopts = "UT" - revision = "787624de3eb7bd915c329cba748687a3b22666a6" - -[[projects]] - digest = "1:1fe28872e1cfcfd1e044cf9c27c94dc400398d46c6f96c96b835852a55505dee" - name = "github.com/hashicorp/consul" - packages = ["api"] - pruneopts = "UT" - revision = "0bddfa23a2ebe3c0773d917fc104f53d74f7a5ec" - version = "v1.4.0" - -[[projects]] - digest = "1:77cb3be9b21ba7f1a4701e870c84ea8b66e7d74c7c8951c58155fdadae9414ec" - name = "github.com/hashicorp/go-cleanhttp" - packages = ["."] - pruneopts = "UT" - revision = "d5fe4b57a186c716b0e00b8c301cbd9b4182694d" - -[[projects]] - branch = "master" - digest = "1:35e9b9d8a799b6d4d4196f19cba3b0ffabf3c96b43eaedf388263d033c066616" - name = "github.com/hashicorp/go-rootcerts" - packages = ["."] - pruneopts = "UT" - revision = "6bb64b370b90e7ef1fa532be9e591a81c3493e00" - -[[projects]] - digest = "1:3f90d23757c18b1e07bf11494dbe737ee2c44d881c0f41e681611abdadad62fa" - name = "github.com/hashicorp/golang-lru" - packages = [ - ".", - "simplelru", - ] - pruneopts = "UT" - revision = "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" - -[[projects]] - digest = "1:2f6ca45e9b5cbc6c5c9361ccb68d4cd23b81c369b6e98385f9bd7d12ce376c0a" - name = "github.com/hashicorp/serf" - packages = ["coordinate"] - pruneopts = "UT" - revision = "19bbd39e421bdf3559d5025fb2c760f5ffa56233" - -[[projects]] - digest = "1:bb81097a5b62634f3e9fec1014657855610c82d19b9a40c17612e32651e35dca" - name = "github.com/jmespath/go-jmespath" - packages = ["."] - pruneopts = "UT" - revision = "c2b33e84" - -[[projects]] - digest = "1:ecd9aa82687cf31d1585d4ac61d0ba180e42e8a6182b85bd785fcca8dfeefc1b" - name = "github.com/joho/godotenv" - packages = ["."] - pruneopts = "UT" - revision = "23d116af351c84513e1946b527c88823e476be13" - version = "v1.3.0" - -[[projects]] - digest = "1:eaefc85d32c03e5f0c2b88ea2f79fce3d993e2c78316d21319575dd4ea9153ca" - name = "github.com/json-iterator/go" - packages = ["."] - pruneopts = "UT" - revision = "ab8a2e0c74be9d3be70b3184d9acc634935ded82" - version = "1.1.4" - -[[projects]] - branch = "master" - digest = "1:a64e323dc06b73892e5bb5d040ced475c4645d456038333883f58934abbf6f72" - name = "github.com/kr/logfmt" - packages = ["."] - pruneopts = "UT" - revision = "b84e30acd515aadc4b783ad4ff83aff3299bdfe0" - -[[projects]] - digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" - name = "github.com/matttproud/golang_protobuf_extensions" - packages = ["pbutil"] - pruneopts = "UT" - revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" - version = "v1.0.1" - -[[projects]] - digest = "1:e761c7c3b761147b20a0500d4bce55c78fb088ff5bb0bc76b3feb57a30e64fd1" - name = "github.com/miekg/dns" - packages = ["."] - pruneopts = "UT" - revision = "5364553f1ee9cddc7ac8b62dce148309c386695b" - -[[projects]] - digest = "1:78bbb1ba5b7c3f2ed0ea1eab57bdd3859aec7e177811563edc41198a760b06af" - name = "github.com/mitchellh/go-homedir" - packages = ["."] - pruneopts = "UT" - revision = "ae18d6b8b3205b561c79e8e5f69bff09736185f4" - version = "v1.0.0" - -[[projects]] - digest = "1:bba69fe95a60f59a68df402c23d57ffdc5596200901189958aea969c468d550f" - name = "github.com/mitchellh/mapstructure" - packages = ["."] - pruneopts = "UT" - revision = "5a380f224700b8a6c4eaad048804f5bff514cb35" - -[[projects]] - digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563" - name = "github.com/modern-go/concurrent" - packages = ["."] - pruneopts = "UT" - revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" - version = "1.0.3" - -[[projects]] - digest = "1:c56ad36f5722eb07926c979d5e80676ee007a9e39e7808577b9d87ec92b00460" - name = "github.com/modern-go/reflect2" - packages = ["."] - pruneopts = "UT" - revision = "94122c33edd36123c84d5368cfb2b69df93a0ec8" - version = "v1.0.1" - -[[projects]] - digest = "1:a94ab444832800c89c9d5b3ba46bcab73116a23d851f6c5918ce6f005230659e" - name = "github.com/moul/anonuuid" - packages = ["."] - pruneopts = "UT" - revision = "c6987e46f8a0231504bcd402962749f8dd9970b0" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:9f07f801988b225662081432361c430cad8f5293b134e80bdf1998d14969d7a6" - name = "github.com/mwitkow/go-conntrack" - packages = ["."] - pruneopts = "UT" - revision = "cc309e4a22231782e8893f3c35ced0967807a33e" - -[[projects]] - digest = "1:9ec6cf1df5ad1d55cf41a43b6b1e7e118a91bade4f68ff4303379343e40c0e25" - name = "github.com/oklog/run" - packages = ["."] - pruneopts = "UT" - revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:3bf17a6e6eaa6ad24152148a631d18662f7212e21637c2699bff3369b7f00fa2" - name = "github.com/petar/GoLLRB" - packages = ["llrb"] - pruneopts = "UT" - revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" - -[[projects]] - digest = "1:0e7775ebbcf00d8dd28ac663614af924411c868dca3d5aa762af0fae3808d852" - name = "github.com/peterbourgon/diskv" - packages = ["."] - pruneopts = "UT" - revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" - version = "v2.0.1" - -[[projects]] - digest = "1:32c1cb4c09d4eb89294d52c2df910ad981aa8d47f06fee22f0112702cf5f4e53" - name = "github.com/prometheus/client_golang" - packages = [ - "prometheus", - "prometheus/internal", - "prometheus/promhttp", - ] - pruneopts = "UT" - revision = "505eaef017263e299324067d40ca2c48f6a2cf50" - version = "v0.9.2" - -[[projects]] - branch = "master" - digest = "1:0f37e09b3e92aaeda5991581311f8dbf38944b36a3edec61cc2d1991f527554a" - name = "github.com/prometheus/client_model" - packages = ["go"] - pruneopts = "UT" - revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" - -[[projects]] - branch = "master" - digest = "1:28541ad4bed4084f45b9c4a1b813a9f4c3cf1df40f54c61718604865f410da4b" - name = "github.com/prometheus/common" - packages = [ - "config", - "expfmt", - "internal/bitbucket.org/ww/goautoneg", - "model", - ] - pruneopts = "UT" - revision = "67670fe90761d7ff18ec1d640135e53b9198328f" - -[[projects]] - branch = "master" - digest = "1:63f209d7f053d0a418b5dc3b35f6778a1dc725307e8f2068de592bef1c056a41" - name = "github.com/prometheus/procfs" - packages = [ - ".", - "internal/util", - "nfs", - "xfs", - ] - pruneopts = "UT" - revision = "1dc9a6cbc91aacc3e8b2d63db4d2e957a5394ac4" - -[[projects]] - digest = "1:7ede16ce5fd88b45e81c00e74be990dba3590e9c9e9c928ee57d4f5d89c4f189" - name = "github.com/prometheus/prometheus" - packages = [ - "discovery", - "discovery/azure", - "discovery/config", - "discovery/consul", - "discovery/dns", - "discovery/ec2", - "discovery/file", - "discovery/gce", - "discovery/kubernetes", - "discovery/marathon", - "discovery/openstack", - "discovery/targetgroup", - "discovery/triton", - "discovery/zookeeper", - "util/strutil", - "util/treecache", - ] - pruneopts = "UT" - revision = "dbd1d58c894775c0788470944b818cc724f550fb" - version = "v2.6.0" - -[[projects]] - digest = "1:3fd3d634f6815f19ac4b2c5e16d28ec9aa4584d0bba25d1ee6c424d813cca22a" - name = "github.com/renstrom/fuzzysearch" - packages = ["fuzzy"] - pruneopts = "UT" - revision = "b18e754edff4833912ef4dce9eaca885bd3f0de1" - version = "v1.0.1" - -[[projects]] - branch = "master" - digest = "1:4d92d3bcd412de705100c10f0428a0b63b12f3d12455ebae46e9ea384c23b333" - name = "github.com/samuel/go-zookeeper" - packages = ["zk"] - pruneopts = "UT" - revision = "c4fab1ac1bec58281ad0667dc3f0907a9476ac47" - -[[projects]] - branch = "master" - digest = "1:5f3582a7b90bcea7a2197d1fd862e5dccdb3b98b0c58b9d08926237fee98098e" - name = "github.com/scaleway/go-scaleway" - packages = [ - ".", - "cache", - "logger", - "types", - ] - pruneopts = "UT" - revision = "2d7df73e80ec0ad19582b68c3eb83d759ae66bab" - -[[projects]] - digest = "1:996e7a159bad6d51ceffbd64d17998356fbb5601dc6ed4a67d77ace392f9cdce" - name = "go.opencensus.io" - packages = [ - ".", - "exemplar", - "internal", - "internal/tagencoding", - "plugin/ochttp", - "plugin/ochttp/propagation/b3", - "plugin/ochttp/propagation/tracecontext", - "stats", - "stats/internal", - "stats/view", - "tag", - "trace", - "trace/internal", - "trace/propagation", - "trace/tracestate", - ] - pruneopts = "UT" - revision = "b7bf3cdb64150a8c8c53b769fdeb2ba581bd4d4b" - version = "v0.18.0" - -[[projects]] - branch = "master" - digest = "1:d141f1e32298f464586e161206ecfe995c0739db1753e325967f8c15e2ca5a92" - name = "golang.org/x/crypto" - packages = [ - "ed25519", - "ed25519/internal/edwards25519", - "ssh/terminal", - ] - pruneopts = "UT" - revision = "505ab145d0a99da450461ae2c1a9f6cd10d1f447" - -[[projects]] - branch = "master" - digest = "1:179e001aa3a40869bb0b482b15d6fdd7f57c63c28862febe96eaac3b68330e19" - name = "golang.org/x/net" - packages = [ - "bpf", - "context", - "context/ctxhttp", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/iana", - "internal/socket", - "internal/timeseries", - "ipv4", - "ipv6", - "trace", - ] - pruneopts = "UT" - revision = "927f97764cc334a6575f4b7a1584a147864d5723" - -[[projects]] - branch = "master" - digest = "1:45e8fd4fd9d1f254a2166bb2d837a34274a9e2b16c23ada2f1f03c421c8ef704" - name = "golang.org/x/oauth2" - packages = [ - ".", - "google", - "internal", - "jws", - "jwt", - ] - pruneopts = "UT" - revision = "d668ce993890a79bda886613ee587a69dd5da7a6" - -[[projects]] - branch = "master" - digest = "1:a4b267e58eba4f8efcf35d73d68e142126b0ce508c099d418f56a5f0179f59ef" - name = "golang.org/x/sync" - packages = [ - "errgroup", - "semaphore", - ] - pruneopts = "UT" - revision = "37e7f081c4d4c64e13b10787722085407fe5d15f" - -[[projects]] - branch = "master" - digest = "1:dc09916156071dc2a710631c3f726fc7b3d0dd4996ccddaad79042272f516c2f" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows", - ] - pruneopts = "UT" - revision = "b4a75ba826a64a70990f11a225237acd6ef35c9f" - -[[projects]] - digest = "1:7509ba4347d1f8de6ae9be8818b0cd1abc3deeffe28aeaf4be6d4b6b5178d9ca" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - digest = "1:d37b0ef2944431fe9e8ef35c6fffc8990d9e2ca300588df94a6890f3649ae365" - name = "golang.org/x/time" - packages = ["rate"] - pruneopts = "UT" - revision = "f51c12702a4d776e4c1fa9b0fabab841babae631" - -[[projects]] - branch = "master" - digest = "1:46092bab95e0e5fbf256867dcc17f6b2ce4976a986861fc7279f1e3cbae4d0e6" - name = "google.golang.org/api" - packages = [ - "compute/v1", - "gensupport", - "googleapi", - "googleapi/internal/uritemplates", - "support/bundler", - ] - pruneopts = "UT" - revision = "65a46cafb132eff435c7d1e0f439cc73c8eebb85" - -[[projects]] - digest = "1:0b4626f7673aa8961ae4d08df0d492a3d902e5f8356a1cab39ea598326c7f573" - name = "google.golang.org/appengine" - packages = [ - ".", - "internal", - "internal/app_identity", - "internal/base", - "internal/datastore", - "internal/log", - "internal/modules", - "internal/remote_api", - "internal/urlfetch", - "urlfetch", - ] - pruneopts = "UT" - revision = "e9657d882bb81064595ca3b56cbe2546bbabf7b1" - version = "v1.4.0" - -[[projects]] - branch = "master" - digest = "1:077c1c599507b3b3e9156d17d36e1e61928ee9b53a5b420f10f28ebd4a0b275c" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - pruneopts = "UT" - revision = "bd9b4fb69e2ffd37621a6caa54dcbead29b546f2" - -[[projects]] - digest = "1:851ba93ee00a247214f894bb3e85bb00d260a4e536e15539b2b2831a0405162f" - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "binarylog/grpc_binarylog_v1", - "codes", - "connectivity", - "credentials", - "credentials/internal", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/binarylog", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/grpcsync", - "internal/syscall", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "df014850f6dee74ba2fc94874043a9f3f75fbfd8" - version = "v1.17.0" - -[[projects]] - digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" - name = "gopkg.in/fsnotify/fsnotify.v1" - packages = ["."] - pruneopts = "UT" - revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" - version = "v1.4.7" - -[[projects]] - digest = "1:ef72505cf098abdd34efeea032103377bec06abb61d8a06f002d5d296a4b1185" - name = "gopkg.in/inf.v0" - packages = ["."] - pruneopts = "UT" - revision = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4" - version = "v0.9.0" - -[[projects]] - branch = "v2" - digest = "1:927bc5076aef9916f1920f2a07e3723e9da1dcd52baa84d29893a3f417c867b4" - name = "gopkg.in/urfave/cli.v2" - packages = ["."] - pruneopts = "UT" - revision = "d3ae77c26ac8db90639677e4831a728d33c36111" - -[[projects]] - branch = "v2" - digest = "1:2d56cd111a870bdf3ee37601877effe1fc79b8983645c147846f4769b6eb7051" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "UT" - revision = "7b8349ac747c6a24702b762d2c4fd9266cf4f1d6" - -[[projects]] - branch = "master" - digest = "1:4e07379d84d1af5dc7d63a5b91d1402aa6d9d1b1a8dea4adbc8720ff1c0778c9" - name = "k8s.io/api" - packages = [ - "admissionregistration/v1alpha1", - "admissionregistration/v1beta1", - "apps/v1", - "apps/v1beta1", - "apps/v1beta2", - "authentication/v1", - "authentication/v1beta1", - "authorization/v1", - "authorization/v1beta1", - "autoscaling/v1", - "autoscaling/v2beta1", - "batch/v1", - "batch/v1beta1", - "batch/v2alpha1", - "certificates/v1beta1", - "core/v1", - "events/v1beta1", - "extensions/v1beta1", - "networking/v1", - "policy/v1beta1", - "rbac/v1", - "rbac/v1alpha1", - "rbac/v1beta1", - "scheduling/v1alpha1", - "scheduling/v1beta1", - "settings/v1alpha1", - "storage/v1", - "storage/v1alpha1", - "storage/v1beta1", - ] - pruneopts = "UT" - revision = "173ce66c1e39d1d0f56e0b3347ff2988068aecd0" - -[[projects]] - branch = "release-1.11" - digest = "1:14f40d65889359013ad246cf60a9346d7e461b425c353ac6bb2d5518220aab97" - name = "k8s.io/apimachinery" - packages = [ - "pkg/api/errors", - "pkg/api/meta", - "pkg/api/resource", - "pkg/apis/meta/internalversion", - "pkg/apis/meta/v1", - "pkg/apis/meta/v1/unstructured", - "pkg/apis/meta/v1beta1", - "pkg/conversion", - "pkg/conversion/queryparams", - "pkg/fields", - "pkg/labels", - "pkg/runtime", - "pkg/runtime/schema", - "pkg/runtime/serializer", - "pkg/runtime/serializer/json", - "pkg/runtime/serializer/protobuf", - "pkg/runtime/serializer/recognizer", - "pkg/runtime/serializer/streaming", - "pkg/runtime/serializer/versioning", - "pkg/selection", - "pkg/types", - "pkg/util/cache", - "pkg/util/clock", - "pkg/util/diff", - "pkg/util/errors", - "pkg/util/framer", - "pkg/util/intstr", - "pkg/util/json", - "pkg/util/net", - "pkg/util/runtime", - "pkg/util/sets", - "pkg/util/validation", - "pkg/util/validation/field", - "pkg/util/wait", - "pkg/util/yaml", - "pkg/version", - "pkg/watch", - "third_party/forked/golang/reflect", - ] - pruneopts = "UT" - revision = "3d8ee2261517413977a62256b7d79644d7ffdc43" - -[[projects]] - digest = "1:98db1b136b75df7042a0e8c4d2c6fce5a6efa6a9ce0f53ec38bf278ad7d17fe7" - name = "k8s.io/client-go" - packages = [ - "discovery", - "kubernetes", - "kubernetes/scheme", - "kubernetes/typed/admissionregistration/v1alpha1", - "kubernetes/typed/admissionregistration/v1beta1", - "kubernetes/typed/apps/v1", - "kubernetes/typed/apps/v1beta1", - "kubernetes/typed/apps/v1beta2", - "kubernetes/typed/authentication/v1", - "kubernetes/typed/authentication/v1beta1", - "kubernetes/typed/authorization/v1", - "kubernetes/typed/authorization/v1beta1", - "kubernetes/typed/autoscaling/v1", - "kubernetes/typed/autoscaling/v2beta1", - "kubernetes/typed/batch/v1", - "kubernetes/typed/batch/v1beta1", - "kubernetes/typed/batch/v2alpha1", - "kubernetes/typed/certificates/v1beta1", - "kubernetes/typed/core/v1", - "kubernetes/typed/events/v1beta1", - "kubernetes/typed/extensions/v1beta1", - "kubernetes/typed/networking/v1", - "kubernetes/typed/policy/v1beta1", - "kubernetes/typed/rbac/v1", - "kubernetes/typed/rbac/v1alpha1", - "kubernetes/typed/rbac/v1beta1", - "kubernetes/typed/scheduling/v1alpha1", - "kubernetes/typed/scheduling/v1beta1", - "kubernetes/typed/settings/v1alpha1", - "kubernetes/typed/storage/v1", - "kubernetes/typed/storage/v1alpha1", - "kubernetes/typed/storage/v1beta1", - "pkg/apis/clientauthentication", - "pkg/apis/clientauthentication/v1alpha1", - "pkg/apis/clientauthentication/v1beta1", - "pkg/version", - "plugin/pkg/client/auth/exec", - "rest", - "rest/watch", - "tools/cache", - "tools/clientcmd/api", - "tools/metrics", - "tools/pager", - "tools/reference", - "transport", - "util/buffer", - "util/cert", - "util/connrotation", - "util/flowcontrol", - "util/integer", - "util/retry", - "util/workqueue", - ] - pruneopts = "UT" - revision = "7d04d0e2a0a1a4d4a1cd6baa432a2301492e4e65" - version = "v8.0.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/go-chi/chi", - "github.com/go-chi/chi/middleware", - "github.com/go-kit/kit/log", - "github.com/go-kit/kit/log/level", - "github.com/joho/godotenv", - "github.com/oklog/run", - "github.com/prometheus/client_golang/prometheus", - "github.com/prometheus/client_golang/prometheus/promhttp", - "github.com/prometheus/common/model", - "github.com/prometheus/prometheus/discovery", - "github.com/prometheus/prometheus/discovery/targetgroup", - "github.com/scaleway/go-scaleway", - "github.com/scaleway/go-scaleway/logger", - "gopkg.in/urfave/cli.v2", - "gopkg.in/yaml.v2", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 100d3af..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,59 +0,0 @@ -[[constraint]] - name = "github.com/go-chi/chi" - version = "3.3.3" - -[[constraint]] - name = "github.com/joho/godotenv" - version = "1.3.0" - -[[constraint]] - name = "github.com/oklog/run" - version = "1.0.0" - -[[constraint]] - name = "github.com/prometheus/client_golang" - version = "0.9.2" - -[[constraint]] - branch = "master" - name = "github.com/prometheus/common" - -[[constraint]] - name = "github.com/prometheus/prometheus" - version = "2.6.0" - -[[constraint]] - branch = "master" - name = "github.com/scaleway/go-scaleway" - -[[constraint]] - branch = "v2" - name = "gopkg.in/urfave/cli.v2" - -[[constraint]] - name = "github.com/go-kit/kit" - version = "0.8.0" - -[[override]] - name = "github.com/Azure/azure-sdk-for-go" - revision = "bd73d950fa4440dae889bd9917bff7cef539f86e" - -[[override]] - name = "github.com/miekg/dns" - revision = "5364553f1ee9cddc7ac8b62dce148309c386695b" - -[[override]] - name = "k8s.io/client-go" - version = "8.0.0" - -[[override]] - branch = "release-1.11" - name = "k8s.io/apimachinery" - -[prune] - go-tests = true - unused-packages = true - -[[constraint]] - branch = "v2" - name = "gopkg.in/yaml.v2" diff --git a/Makefile b/Makefile index 42b5c40..93c14e8 100644 --- a/Makefile +++ b/Makefile @@ -1,59 +1,67 @@ SHELL := bash - NAME := prometheus-scw-sd IMPORT := github.com/promhippie/$(NAME) +BIN := bin DIST := dist ifeq ($(OS), Windows_NT) EXECUTABLE := $(NAME).exe - HAS_RETOOL := $(shell where retool) + UNAME := Windows else EXECUTABLE := $(NAME) - HAS_RETOOL := $(shell command -v retool) + UNAME := $(shell uname -s) +endif + +ifeq ($(UNAME), Darwin) + GOBUILD ?= go build -i +else + GOBUILD ?= go build endif -PACKAGES ?= $(shell go list ./... | grep -v /vendor/ | grep -v /_tools/) -SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./vendor/*" -not -path "./_tools/*") +PACKAGES ?= $(shell go list ./...) +SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./node_modules/*") +GENERATE ?= $(PACKAGES) TAGS ?= -ifndef VERSION +ifndef OUTPUT ifneq ($(DRONE_TAG),) - VERSION ?= $(subst v,,$(DRONE_TAG)) + OUTPUT ?= $(subst v,,$(DRONE_TAG)) else - ifneq ($(DRONE_BRANCH),) - VERSION ?= 0.0.0-$(subst /,,$(DRONE_BRANCH)) - else - VERSION ?= 0.0.0-master - endif + OUTPUT ?= testing endif endif -ifndef SHA - SHA := $(shell git rev-parse --short HEAD) +ifndef VERSION + ifneq ($(DRONE_TAG),) + VERSION ?= $(subst v,,$(DRONE_TAG)) + else + VERSION ?= $(shell git rev-parse --short HEAD) + endif endif ifndef DATE DATE := $(shell date -u '+%Y%m%d') endif -LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.Version=$(VERSION)" -X "$(IMPORT)/pkg/version.Revision=$(SHA)" -X "$(IMPORT)/pkg/version.BuildDate=$(DATE)" +ifndef SHA + SHA := $(shell git rev-parse --short HEAD) +endif + +LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Revision=$(SHA)" -X "$(IMPORT)/pkg/version.Date=$(DATE)" +GCFLAGS += all=-N -l .PHONY: all all: build -.PHONY: update -update: - retool do dep ensure -update - .PHONY: sync sync: - retool do dep ensure + go mod download .PHONY: clean clean: go clean -i ./... - rm -rf bin/ $(DIST)/ + rm -rf $(BIN) $(DIST) .PHONY: fmt fmt: @@ -63,65 +71,57 @@ fmt: vet: go vet $(PACKAGES) -.PHONY: megacheck -megacheck: - retool do megacheck $(PACKAGES) +.PHONY: staticcheck +staticcheck: + go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES) .PHONY: lint lint: - for PKG in $(PACKAGES); do retool do golint -set_exit_status $$PKG || exit 1; done; + for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done; .PHONY: generate generate: - retool do go generate $(PACKAGES) + go generate $(GENERATE) + +.PHONY: changelog +changelog: + go run github.com/restic/calens >| CHANGELOG.md .PHONY: test test: - retool do goverage -v -coverprofile coverage.out $(PACKAGES) + go run github.com/haya14busa/goverage -v -coverprofile coverage.out $(PACKAGES) .PHONY: install install: $(SOURCES) go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME) .PHONY: build -build: bin/$(EXECUTABLE) +build: $(BIN)/$(EXECUTABLE) + +$(BIN)/$(EXECUTABLE): $(SOURCES) + $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME) -bin/$(EXECUTABLE): $(SOURCES) - go build -i -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME) +$(BIN)/$(EXECUTABLE)-debug: $(SOURCES) + $(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME) .PHONY: release -release: release-dirs release-windows release-linux release-darwin release-copy release-check +release: release-dirs release-linux release-windows release-darwin release-copy release-check .PHONY: release-dirs release-dirs: mkdir -p $(DIST)/binaries $(DIST)/release -.PHONY: release-windows -release-windows: -ifeq ($(DRONE),true) - xgo -go 1.10 -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out $(EXECUTABLE)-$(VERSION) ./cmd/$(NAME) - mv /build/* $(DIST)/binaries -else - retool do xgo -go 1.10 -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out $(EXECUTABLE)-$(VERSION) ./cmd/$(NAME) -endif - .PHONY: release-linux -release-linux: -ifeq ($(DRONE),true) - xgo -go 1.10 -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out $(EXECUTABLE)-$(VERSION) ./cmd/$(NAME) - mv /build/* $(DIST)/binaries -else - retool do xgo -go 1.10 -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out $(EXECUTABLE)-$(VERSION) ./cmd/$(NAME) -endif +release-linux: release-dirs + go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME) + +.PHONY: release-windows +release-windows: release-dirs + go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME) .PHONY: release-darwin -release-darwin: -ifeq ($(DRONE),true) - xgo -go 1.10 -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out $(EXECUTABLE)-$(VERSION) ./cmd/$(NAME) - mv /build/* $(DIST)/binaries -else - retool do xgo -go 1.10 -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out $(EXECUTABLE)-$(VERSION) ./cmd/$(NAME) -endif +release-darwin: release-dirs + go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME) .PHONY: release-copy release-copy: @@ -131,17 +131,13 @@ release-copy: release-check: cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;) -.PHONY: publish -publish: release +.PHONY: release-finish +release-finish: release-copy release-check .PHONY: docs docs: hugo -s docs/ -.PHONY: retool -retool: -ifndef HAS_RETOOL - go get -u github.com/twitchtv/retool -endif - retool sync - retool build +.PHONY: watch +watch: + go run github.com/cespare/reflex -c reflex.conf diff --git a/README.md b/README.md index 21cb98a..fdaaa28 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Prometheus Scaleway SD [![Build Status](http://cloud.drone.io/api/badges/promhippie/prometheus-scw-sd/status.svg)](http://cloud.drone.io/promhippie/prometheus-scw-sd) -[![Stories in Ready](https://badge.waffle.io/promhippie/prometheus-scw-sd.svg?label=ready&title=Ready)](http://waffle.io/promhippie/prometheus-scw-sd) [![Join the Matrix chat at https://matrix.to/#/#webhippie:matrix.org](https://img.shields.io/badge/matrix-%23webhippie-7bc9a4.svg)](https://matrix.to/#/#webhippie:matrix.org) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/4671e4dac861415db19d41c7959a530a)](https://www.codacy.com/app/promhippie/prometheus-scw-sd?utm_source=github.com&utm_medium=referral&utm_content=promhippie/prometheus-scw-sd&utm_campaign=Badge_Grade) [![Go Doc](https://godoc.org/github.com/promhippie/prometheus-scw-sd?status.svg)](http://godoc.org/github.com/promhippie/prometheus-scw-sd) @@ -10,11 +9,9 @@ This project provides a server to automatically discover nodes within your Scaleway account in a Prometheus SD compatible format. - ## Install -You can download prebuilt binaries from our [GitHub releases](https://github.com/promhippie/prometheus-scw-sd/releases), or you can use our Docker images published on [Docker Hub](https://hub.docker.com/r/promhippie/prometheus-scw-sd/tags/). - +You can download prebuilt binaries from our [GitHub releases](https://github.com/promhippie/prometheus-scw-sd/releases), or you can use our Docker images published on [Docker Hub](https://hub.docker.com/r/promhippie/prometheus-scw-sd/tags/). If you need further guidance how to install this take a look at our [documentation](https://promhippie.github.io/prometheus-scw-sd/#getting-started). ## Integration @@ -59,53 +56,37 @@ Here you get a snippet for the Prometheus `scrape_config` that configures Promet target_label: instance ``` - ## Development -Make sure you have a working Go environment, for further reference or a guide take a look at the [install instructions](http://golang.org/doc/install.html). This project requires Go >= v1.8. +Make sure you have a working Go environment, for further reference or a guide take a look at the [install instructions](http://golang.org/doc/install.html). This project requires Go >= v1.11. ```bash -go get -d github.com/promhippie/prometheus-scw-sd -cd $GOPATH/src/github.com/promhippie/prometheus-scw-sd - -# install retool -make retool - -# sync dependencies -make sync - -# generate code -make generate +git clone https://github.com/promhippie/prometheus-scw-sd.git +cd prometheus-scw-sd -# build binary -make build +make generate build ./bin/prometheus-scw-sd -h ``` - ## Security If you find a security issue please contact thomas@webhippie.de first. - ## Contributing Fork -> Patch -> Push -> Pull Request - ## Authors * [Thomas Boerger](https://github.com/tboerger) - ## License Apache-2.0 - ## Copyright -``` +```console Copyright (c) 2018 Thomas Boerger ``` diff --git a/changelog/0.1.0_2018-09-24/initial-release.md b/changelog/0.1.0_2018-09-24/initial-release.md new file mode 100644 index 0000000..8a010eb --- /dev/null +++ b/changelog/0.1.0_2018-09-24/initial-release.md @@ -0,0 +1,5 @@ +Change: Initial release of basic version + +Just prepared an initial basic version which could be released to the public. + +https://github.com/promhippie/prometheus-scw-sd/issues/10 diff --git a/changelog/0.2.0_2019-01-12/basic-docs.md b/changelog/0.2.0_2019-01-12/basic-docs.md new file mode 100644 index 0000000..d6b9bbe --- /dev/null +++ b/changelog/0.2.0_2019-01-12/basic-docs.md @@ -0,0 +1,6 @@ +Change: Add basic documentation + +Add some basic documentation page which also includes build and installation +instructions to make clear how this project can be installed and used. + +https://github.com/promhippie/prometheus-scw-sd/pull/1 diff --git a/changelog/0.2.0_2019-01-12/cross-compile.md b/changelog/0.2.0_2019-01-12/cross-compile.md new file mode 100644 index 0000000..4d7239a --- /dev/null +++ b/changelog/0.2.0_2019-01-12/cross-compile.md @@ -0,0 +1,6 @@ +Change: Pin xgo to golang 1.10 to avoid issues + +There had been issues while using the latest xgo version, let's pin this tag to +1.10 to ensure the binaries are properly build. + +https://github.com/promhippie/prometheus-scw-sd/pull/2 diff --git a/changelog/0.2.0_2019-01-12/dependency-update.md b/changelog/0.2.0_2019-01-12/dependency-update.md new file mode 100644 index 0000000..28b20ac --- /dev/null +++ b/changelog/0.2.0_2019-01-12/dependency-update.md @@ -0,0 +1,6 @@ +Change: Update dependencies + +Just make sure to update all the build dependencies to work with the latest +versions available. + +https://github.com/promhippie/prometheus-scw-sd/pull/3 diff --git a/changelog/0.2.0_2019-01-12/dns-label.md b/changelog/0.2.0_2019-01-12/dns-label.md new file mode 100644 index 0000000..1e12263 --- /dev/null +++ b/changelog/0.2.0_2019-01-12/dns-label.md @@ -0,0 +1,6 @@ +Change: Labels for DNS names + +To filter or use the public and private DNS names we added separate labels for +both values. + +https://github.com/promhippie/prometheus-scw-sd/pull/3 diff --git a/changelog/0.2.0_2019-01-12/metrics-timeout.md b/changelog/0.2.0_2019-01-12/metrics-timeout.md new file mode 100644 index 0000000..7e2f147 --- /dev/null +++ b/changelog/0.2.0_2019-01-12/metrics-timeout.md @@ -0,0 +1,6 @@ +Change: Timeout for metrics handler + +We added an additional middleware to properly timeout requests to the metrics +endpoint for long running request. + +https://github.com/promhippie/prometheus-scw-sd/pull/3 diff --git a/changelog/0.2.0_2019-01-12/panic-recover.md b/changelog/0.2.0_2019-01-12/panic-recover.md new file mode 100644 index 0000000..22f60c7 --- /dev/null +++ b/changelog/0.2.0_2019-01-12/panic-recover.md @@ -0,0 +1,6 @@ +Change: Panic recover within handlers + +To make sure panics are properly handled we added a middleware to recover +properly from panics. + +https://github.com/promhippie/prometheus-scw-sd/pull/3 diff --git a/changelog/0.3.0_2019-03-27/health-command.md b/changelog/0.3.0_2019-03-27/health-command.md new file mode 100644 index 0000000..d308264 --- /dev/null +++ b/changelog/0.3.0_2019-03-27/health-command.md @@ -0,0 +1,7 @@ +Change: Define healthcheck command + +To check the health status of the service discovery especially within Docker we +added a simple subcommand which checks the healthz endpoint to show if the +service is up and running. + +https://github.com/promhippie/prometheus-scw-sd/pull/9 diff --git a/changelog/0.3.0_2019-03-27/multi-credentials.md b/changelog/0.3.0_2019-03-27/multi-credentials.md new file mode 100644 index 0000000..1082512 --- /dev/null +++ b/changelog/0.3.0_2019-03-27/multi-credentials.md @@ -0,0 +1,8 @@ +Change: Support for multiple accounts + +Make the deployments of this service discovery easier, previously we had to +launch one instance for every credentials we wanted to gather, with this change +we are able to define multiple credentials for a single instance of the service +discovery. + +https://github.com/promhippie/prometheus-scw-sd/pull/6 diff --git a/changelog/0.3.0_2019-03-27/region-requirement.md b/changelog/0.3.0_2019-03-27/region-requirement.md new file mode 100644 index 0000000..6e5b40b --- /dev/null +++ b/changelog/0.3.0_2019-03-27/region-requirement.md @@ -0,0 +1,6 @@ +Change: Drop region requirement + +As the API doesn't enforce the requirement for the selected region we can safely +remove this hard requirement. + +https://github.com/promhippie/prometheus-scw-sd/pull/6 diff --git a/changelog/0.3.0_2019-03-27/server-tags.md b/changelog/0.3.0_2019-03-27/server-tags.md new file mode 100644 index 0000000..f75df7a --- /dev/null +++ b/changelog/0.3.0_2019-03-27/server-tags.md @@ -0,0 +1,6 @@ +Change: Add support for server tags + +Since Scaleway supports tags for servers we should also map these labels to the +exported JSON file. + +https://github.com/promhippie/prometheus-scw-sd/pull/5 diff --git a/changelog/0.3.0_2019-03-27/switch-drone.md b/changelog/0.3.0_2019-03-27/switch-drone.md new file mode 100644 index 0000000..9334969 --- /dev/null +++ b/changelog/0.3.0_2019-03-27/switch-drone.md @@ -0,0 +1,6 @@ +Change: Switch to cloud.drone.io + +We don't wanted to maintain our own Drone infrastructure anymore, since there is +cloud.drone.io available for free we switched the pipelines over to it. + +https://github.com/promhippie/prometheus-scw-sd/pull/4 diff --git a/changelog/CHANGELOG.tmpl b/changelog/CHANGELOG.tmpl new file mode 100644 index 0000000..e9e3b5c --- /dev/null +++ b/changelog/CHANGELOG.tmpl @@ -0,0 +1,28 @@ +{{- range $changes := . }}{{ with $changes -}} +# Changelog for {{ .Version }} + +The following sections list the changes for {{ .Version }}. + +## Summary +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .TypeShort }} #{{ .PrimaryID }}: {{ .Title }} +{{- end }}{{ end }} + +## Details +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +{{ range $par := .Paragraphs }} + {{ wrapIndent $par 80 3 }} +{{ end -}} +{{ range $url := .IssueURLs }} + {{ $url -}} +{{ end -}} +{{ range $url := .PRURLs }} + {{ $url -}} +{{ end -}} +{{ range $url := .OtherURLs }} + {{ $url -}} +{{ end }} +{{ end }}{{ end }} + +{{ end }}{{ end -}} diff --git a/changelog/README.md b/changelog/README.md new file mode 100644 index 0000000..0ae5d5b --- /dev/null +++ b/changelog/README.md @@ -0,0 +1,6 @@ +# Changelog + +We are using [calens](https://github.com/restic/calens) to properly generate a +changelog before we are tagging a new release. To get an idea how this could +look like would be the +best reference. diff --git a/changelog/TEMPLATE b/changelog/TEMPLATE new file mode 100644 index 0000000..5b79cf7 --- /dev/null +++ b/changelog/TEMPLATE @@ -0,0 +1,11 @@ +Bugfix: Fix behavior for foobar (in present tense) + +We've fixed the behavior for foobar, a long-standing annoyance for users. The +text should be wrapped at 80 characters length. + +The text in the paragraphs is written in past tense. The last section is a list +of issue URLs, PR URLs and other URLs. The first issue ID (or the first PR ID, +in case there aren't any issue links) is used as the primary ID. + +https://github.com/promhippie/prometheus-scw-sd/issues/1234 +https://github.com/promhippie/prometheus-scw-sd/pull/55555 diff --git a/changelog/unreleased/.keep b/changelog/unreleased/.keep new file mode 100644 index 0000000..e69de29 diff --git a/changelog/unreleased/scaleway-sdk.md b/changelog/unreleased/scaleway-sdk.md new file mode 100644 index 0000000..7d41e01 --- /dev/null +++ b/changelog/unreleased/scaleway-sdk.md @@ -0,0 +1,9 @@ +Change: Upgrade Scaleway SDK + +As Scaleway has dropped the previously used Go library we are forced to update +to the new SDK. With this change we are forced to update the required attributes +which results in a breaking change. The new Scaleway API requires an access and +secret key instead of a single access token. Beside that the region flag had to +be dropped in favor of a zone flag. + +https://github.com/promhippie/prometheus-scw-sd/pull/11 diff --git a/changelog/unreleased/structure-refactoring.md b/changelog/unreleased/structure-refactoring.md new file mode 100644 index 0000000..26d11e0 --- /dev/null +++ b/changelog/unreleased/structure-refactoring.md @@ -0,0 +1,6 @@ +Change: Code and project restructuring + +To get the project and code structure into a new shape and to get it cleaned up +we switched to Go modules and restructured the project source in general. + +https://github.com/promhippie/prometheus-scw-sd/pull/11 diff --git a/cmd/prometheus-scw-sd/main.go b/cmd/prometheus-scw-sd/main.go index 341a297..7aad906 100644 --- a/cmd/prometheus-scw-sd/main.go +++ b/cmd/prometheus-scw-sd/main.go @@ -4,63 +4,15 @@ import ( "os" "github.com/joho/godotenv" - "github.com/promhippie/prometheus-scw-sd/pkg/config" - "github.com/promhippie/prometheus-scw-sd/pkg/version" - "gopkg.in/urfave/cli.v2" + "github.com/promhippie/prometheus-scw-sd/pkg/command" ) func main() { - cfg := config.Load() - if env := os.Getenv("PROMETHEUS_SCW_ENV_FILE"); env != "" { godotenv.Load(env) } - app := &cli.App{ - Name: "prometheus-scw-sd", - Version: version.Version, - Usage: "Prometheus Scaleway SD", - Authors: []*cli.Author{ - { - Name: "Thomas Boerger", - Email: "thomas@webhippie.de", - }, - }, - Flags: []cli.Flag{ - &cli.StringFlag{ - Name: "log.level", - Value: "info", - Usage: "Only log messages with given severity", - EnvVars: []string{"PROMETHEUS_SCW_LOG_LEVEL"}, - Destination: &cfg.Logs.Level, - }, - &cli.BoolFlag{ - Name: "log.pretty", - Value: false, - Usage: "Enable pretty messages for logging", - EnvVars: []string{"PROMETHEUS_SCW_LOG_PRETTY"}, - Destination: &cfg.Logs.Pretty, - }, - }, - Commands: []*cli.Command{ - Health(cfg), - Server(cfg), - }, - } - - cli.HelpFlag = &cli.BoolFlag{ - Name: "help", - Aliases: []string{"h"}, - Usage: "Show the help, so what you see now", - } - - cli.VersionFlag = &cli.BoolFlag{ - Name: "version", - Aliases: []string{"v"}, - Usage: "Print the current version of that tool", - } - - if err := app.Run(os.Args); err != nil { + if err := command.Run(); err != nil { os.Exit(1) } } diff --git a/config/example.json b/config/example.json index 20512b1..c4ec8a8 100644 --- a/config/example.json +++ b/config/example.json @@ -13,21 +13,20 @@ "credentials": [ { "project": "example1", - "token": "", - "org": "", - "region": "par1" + "access_key": "", + "secret_key": "" }, { "project": "example2", - "token": "", - "org": "", - "region": "par1" + "access_key": "", + "secret_key": "", + "zone": "fr-par-1" }, { "project": "example3", - "token": "", - "org": "", - "region": "par1" + "access_key": "", + "secret_key": "", + "org": "" } ] } diff --git a/config/example.yaml b/config/example.yaml index faafc5d..38693b4 100644 --- a/config/example.yaml +++ b/config/example.yaml @@ -1,3 +1,4 @@ +--- server: addr: 0.0.0.0:9000 path: /metrics @@ -11,14 +12,15 @@ target: refresh: 30 credentials: - project: example1 - token: - org: - region: par1 + access_key: + secret_key: - project: example2 - token: - org: - region: par1 + access_key: + secret_key: + zone: fr-par-1 - project: example3 - token: + access_key: + secret_key: org: - region: par1 + +... diff --git a/docker/Dockerfile.linux.amd64 b/docker/Dockerfile.linux.amd64 index 31c2e2b..164a7ea 100644 --- a/docker/Dockerfile.linux.amd64 +++ b/docker/Dockerfile.linux.amd64 @@ -14,4 +14,4 @@ CMD ["server"] COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /etc/mime.types /etc/ -COPY dist/binaries/prometheus-scw-sd-*-linux-amd64 /usr/bin/prometheus-scw-sd +COPY bin/prometheus-scw-sd /usr/bin/prometheus-scw-sd diff --git a/docker/Dockerfile.linux.arm32v6 b/docker/Dockerfile.linux.arm32v6 index ac3df91..164a7ea 100644 --- a/docker/Dockerfile.linux.arm32v6 +++ b/docker/Dockerfile.linux.arm32v6 @@ -14,4 +14,4 @@ CMD ["server"] COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /etc/mime.types /etc/ -COPY dist/binaries/prometheus-scw-sd-*-linux-arm-6 /usr/bin/prometheus-scw-sd +COPY bin/prometheus-scw-sd /usr/bin/prometheus-scw-sd diff --git a/docker/Dockerfile.linux.arm32v7 b/docker/Dockerfile.linux.arm32v7 deleted file mode 100644 index ad2d480..0000000 --- a/docker/Dockerfile.linux.arm32v7 +++ /dev/null @@ -1,17 +0,0 @@ -FROM webhippie/alpine:latest AS build -RUN apk add --no-cache ca-certificates mailcap - -FROM scratch - -LABEL maintainer="Thomas Boerger " \ - org.label-schema.name="Prometheus Scaleway SD" \ - org.label-schema.vendor="Thomas Boerger" \ - org.label-schema.schema-version="1.0" - -ENTRYPOINT ["/usr/bin/prometheus-scw-sd"] -CMD ["server"] - -COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=build /etc/mime.types /etc/ - -COPY dist/binaries/prometheus-scw-sd-*-linux-arm-7 /usr/bin/prometheus-scw-sd diff --git a/docker/Dockerfile.linux.arm64v8 b/docker/Dockerfile.linux.arm64v8 index 140a07b..164a7ea 100644 --- a/docker/Dockerfile.linux.arm64v8 +++ b/docker/Dockerfile.linux.arm64v8 @@ -14,4 +14,4 @@ CMD ["server"] COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /etc/mime.types /etc/ -COPY dist/binaries/prometheus-scw-sd-*-linux-arm64 /usr/bin/prometheus-scw-sd +COPY bin/prometheus-scw-sd /usr/bin/prometheus-scw-sd diff --git a/docker/Dockerfile.linux.i386 b/docker/Dockerfile.linux.i386 index 6b550d5..164a7ea 100644 --- a/docker/Dockerfile.linux.i386 +++ b/docker/Dockerfile.linux.i386 @@ -14,4 +14,4 @@ CMD ["server"] COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /etc/mime.types /etc/ -COPY dist/binaries/prometheus-scw-sd-*-linux-386 /usr/bin/prometheus-scw-sd +COPY bin/prometheus-scw-sd /usr/bin/prometheus-scw-sd diff --git a/docker/Dockerfile.windows.amd64 b/docker/Dockerfile.windows.amd64 deleted file mode 100644 index aa278a5..0000000 --- a/docker/Dockerfile.windows.amd64 +++ /dev/null @@ -1,12 +0,0 @@ -# escape=` -FROM microsoft/nanoserver:10.0.14393.2430 - -LABEL maintainer="Thomas Boerger " ` - org.label-schema.name="Prometheus Scaleway SD" ` - org.label-schema.vendor="Thomas Boerger" ` - org.label-schema.schema-version="1.0" - -ENTRYPOINT ["c:\\prometheus-scw-sd.exe"] -CMD ["server"] - -COPY bin/prometheus-scw-sd.exe c:\prometheus-scw-sd.exe diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl new file mode 100644 index 0000000..7464d03 --- /dev/null +++ b/docker/manifest.tmpl @@ -0,0 +1,26 @@ +image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-i386 + platform: + architecture: 386 + os: linux + - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64v8 + platform: + architecture: arm64 + variant: v8 + os: linux + - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm32v6 + platform: + architecture: arm + variant: v6 + os: linux diff --git a/docs/content/building.md b/docs/content/building.md index 2d5cd2f..86e1b76 100644 --- a/docs/content/building.md +++ b/docs/content/building.md @@ -1,6 +1,6 @@ --- title: "Building" -date: 2018-05-02T00:00:00+00:00 +date: 2020-04-01T00:00:00+00:00 anchor: "building" weight: 20 --- @@ -8,24 +8,14 @@ weight: 20 As this project is built with Go you need to install Go first. The installation of Go is out of the scope of this document, please follow the [official documentation](https://golang.org/doc/install). After the installation of Go you need to get the sources: {{< highlight txt >}} -go get -d github.com/promhippie/prometheus-scw-sd -cd $GOPATH/src/github.com/promhippie/prometheus-scw-sd +git clone https://github.com/promhippie/prometheus-scw-sd.git +cd prometheus-scw-sd/ {{< / highlight >}} -All required tool besides Go itself are bundled or getting automatically installed within the `GOPATH`. We are using [retool](https://github.com/twitchtv/retool) to keep the used tools consistent and [dep](https://github.com/golang/dep) to manage the dependencies. All commands to build this project are part of our `Makefile`. +All required tool besides Go itself are bundled by Go modules, all you need is part of the `Makfile`: {{< highlight txt >}} -# install retool -make retool - -# sync dependencies -make sync - -# generate code -make generate - -# build binary -make build +make generate build {{< / highlight >}} Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/prometheus-scw-sd -h` to see all available options. diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index a4f6dca..ecbb6fb 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -44,16 +44,19 @@ Currently we have not prepared a deployment for Kubernetes, but this is somethin If you prefer to configure the service with environment variables you can see the available variables below, in case you want to configure multiple accounts with a single service you are forced to use the configuration file as the environment variables are limited to a single account. As the service is pretty lightweight you can even start an instance per account and configure it entirely by the variables, it's up to you. PROMETHEUS_SCW_CONFIG -: Path to Scaleway configuration file, optionally, required for muli credentials +: Path to Scaleway configuration file, optionally, required for multi credentials -PROMETHEUS_SCW_TOKEN -: Access token for the Scaleway API, required for authentication +PROMETHEUS_SCW_ACCESS_KEY +: Access key for the Scaleway API, required for authentication + +PROMETHEUS_SCW_SECRET_KEY +: Secret key for the Scaleway API, required for authentication PROMETHEUS_SCW_ORG -: Organization for the Scaleway API, required for authentication +: Organization for the Scaleway API, optionally -PROMETHEUS_SCW_REGION -: Region for the Scaleway API, required for authentication +PROMETHEUS_SCW_ZONE +: Zone for the Scaleway API, optionally PROMETHEUS_SCW_LOG_LEVEL : Only log messages with given severity, defaults to `info` @@ -73,33 +76,63 @@ PROMETHEUS_SCW_OUTPUT_FILE PROMETHEUS_SCW_OUTPUT_REFRESH : Discovery refresh interval in seconds, defaults to `30` +PROMETHEUS_SCW_CHECK_INSTANCE +: Enable fetching servers from instance API, defaults to `true` + +PROMETHEUS_SCW_CHECK_BAREMETAL +: Enable fetching servers from baremetal API, defaults to `true` + ### Configuration file Especially if you want to configure multiple accounts within a single service discovery you got to use the configuration file. So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/promhippie/prometheus-scw-sd/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options, they also include the default values. ## Labels -* `__meta_scaleway_name` -* `__meta_scaleway_id` +* `__address__` +* `__meta_scaleway_allowed_actions` * `__meta_scaleway_arch` +* `__meta_scaleway_boot_type` +* `__meta_scaleway_bootscript_id` +* `__meta_scaleway_bootscript_initrd` +* `__meta_scaleway_bootscript_kernel` +* `__meta_scaleway_bootscript_title` +* `__meta_scaleway_cluster` +* `__meta_scaleway_commercial_type` +* `__meta_scaleway_description` +* `__meta_scaleway_domain` +* `__meta_scaleway_dynamic_ip_required` +* `__meta_scaleway_enable_ipv6` +* `__meta_scaleway_hostname` +* `__meta_scaleway_hypervisor` +* `__meta_scaleway_id` * `__meta_scaleway_image_id` * `__meta_scaleway_image_name` -* `__meta_scaleway_public_ipv4` -* `__meta_scaleway_public_host` -* `__meta_scaleway_state` -* `__meta_scaleway_private_ipv4` -* `__meta_scaleway_private_host` -* `__meta_scaleway_hostname` +* `__meta_scaleway_install_hostname` +* `__meta_scaleway_install_os` +* `__meta_scaleway_install_status` +* `__meta_scaleway_ips` +* `__meta_scaleway_ipv6` +* `__meta_scaleway_kind` +* `__meta_scaleway_name` +* `__meta_scaleway_node` +* `__meta_scaleway_offer` * `__meta_scaleway_org` -* `__meta_scaleway_commercial_type` +* `__meta_scaleway_placement_group_id` +* `__meta_scaleway_placement_group_name` * `__meta_scaleway_platform` -* `__meta_scaleway_hypervisor` -* `__meta_scaleway_node` -* `__meta_scaleway_blade` -* `__meta_scaleway_chassis` -* `__meta_scaleway_cluster` -* `__meta_scaleway_zone` +* `__meta_scaleway_private_host` +* `__meta_scaleway_private_ipv4` +* `__meta_scaleway_project` +* `__meta_scaleway_protected` +* `__meta_scaleway_public_host` +* `__meta_scaleway_public_ipv4` +* `__meta_scaleway_security_group_id` +* `__meta_scaleway_security_group_name` +* `__meta_scaleway_state_detail` +* `__meta_scaleway_state` +* `__meta_scaleway_status` * `__meta_scaleway_tags` +* `__meta_scaleway_zone` ## Metrics diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fdb92c3 --- /dev/null +++ b/go.mod @@ -0,0 +1,21 @@ +module github.com/promhippie/prometheus-scw-sd + +go 1.14 + +require ( + github.com/cespare/reflex v0.2.0 // indirect + github.com/go-chi/chi v4.1.0+incompatible + github.com/go-kit/kit v0.10.0 + github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 // indirect + github.com/joho/godotenv v1.3.0 + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/ogier/pflag v0.0.1 // indirect + github.com/oklog/run v1.1.0 + github.com/prometheus/client_golang v1.5.1 + github.com/prometheus/common v0.9.1 + github.com/prometheus/prometheus v1.8.2-0.20200326161412-ae041f97cfc6 + github.com/restic/calens v0.2.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6 + github.com/urfave/cli/v2 v2.2.0 + gopkg.in/yaml.v2 v2.2.8 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..85913bd --- /dev/null +++ b/go.sum @@ -0,0 +1,727 @@ +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 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +github.com/Azure/azure-sdk-for-go v40.1.0+incompatible h1:VeXBqO/0U7yXiMgjRsfcmqPWXFZRA/heTlzE4qun0T4= +github.com/Azure/azure-sdk-for-go v40.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY= +github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +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 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +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/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4= +github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc= +github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.0.1 h1:RuaOafp+8qOLUPX1lInLfUrLc1MEVbnz7a40RLoixKY= +github.com/Masterminds/sprig/v3 v3.0.1/go.mod h1:Cp7HwZjmqKrC+Y7XqSJOU2yRvAJRGLiohfgz5ZJj8+4= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.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/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.29.18 h1:3T6OdmTwOiEX/didd+RkTdOm6WPzXKFLMVS+ZH9DX1I= +github.com/aws/aws-sdk-go v1.29.18/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/reflex v0.2.0 h1:6d9WpWJseKjJvZEevKP7Pk42nPx2+BUTqmhNk8wZPwM= +github.com/cespare/reflex v0.2.0/go.mod h1:ooqOLJ4algvHP/oYvKWfWJ9tFUzCLDk5qkIJduMYrgI= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/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/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/go-semver v0.2.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/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/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 h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +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/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +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/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-chi/chi v1.0.0 h1:s/kv1cTXfivYjdKJdyUzNGyAWZ/2t7duW1gKn5ivu+c= +github.com/go-chi/chi v4.1.0+incompatible h1:ETj3cggsVIY2Xao5ExCu6YhEh5MD6JTfcBzS37R260w= +github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +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-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/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.2.2-0.20190730201129-28a6bbf47e48/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 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/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/protobuf v0.0.0-20161109072736-4bd1920723d7/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 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.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-20200229191704-1ebb73c60ed3/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 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.8.0 h1:1ylFFLRx7otpfRPSuOm77q8HLSlSOwYCGDeXmXJhX7A= +github.com/gophercloud/gophercloud v0.8.0/go.mod h1:Kc/QKr9thLKruO/dG0szY8kRIYS+iENz0ziI0hJf76A= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +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/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/grpc-ecosystem/grpc-gateway v1.14.1/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.4.0 h1:jfESivXnO5uLdH650JU/6AnjRoHrLhULq0FnC3Kp9EY= +github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.12.0 h1:d4QkX8FRTYaKaCZBoXYY8zJX2BXjWxurN/GA2tkrmZM= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A= +github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +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/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +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/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +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.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kisielk/errcheck v1.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/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= +github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +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-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ogier/pflag v0.0.1 h1:RW6JSWSu/RkSatfcLtogGfFgpim5p7ARQ10ECk5O750= +github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +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.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/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.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/prometheus v1.8.2-0.20200326161412-ae041f97cfc6 h1:JZmhyWr62mP4RLOu6/OQvtw9h4AclwsyUgU+9pY/P5I= +github.com/prometheus/prometheus v1.8.2-0.20200326161412-ae041f97cfc6/go.mod h1:ZnfuiMn3LNsry2q7ECmRe4WcscxmJSd2dIFpOi4w3lM= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/restic/calens v0.2.0 h1:LVNAtmFc+Pb4ODX66qdX1T3Di1P0OTLyUsVyvM/xD7E= +github.com/restic/calens v0.2.0/go.mod h1:UXwyAKS4wsgUZGEc7NrzzygJbLsQZIo3wl+62Q1wvmU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +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/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6 h1:C1/pvkxkGN/H03mDxLzItaceYJDBk1HdClgR15suAzI= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +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/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +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/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.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.3 h1:FpNT6zq26xNpHZy08emi755QwzLPs6Pukqjlc7RfOMU= +github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +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.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +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/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/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-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +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-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/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-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-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/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-20181201002055-351d144fa1fc/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-20190125091013-d26f9f9a57f3/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-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/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-20190724013045-ca1201d0de80/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-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/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-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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-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/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-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-20181026203630-95b1ffbd15a5/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-20181122145206-62eef0e2fa9b/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-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/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-20191008105621-543471e840be/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-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/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 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +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-20180828015842-6cd1fcedba52/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-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-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/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-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/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-20191203134012-c197fd4bf371/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-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200305205014-bc073721adb6 h1:V/kH9fbTtfqZLJU7djyPh+n4yWxBZVU6H5npu6UeY54= +golang.org/x/tools v0.0.0-20200305205014-bc073721adb6/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +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= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +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/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-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +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/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +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/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/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/gcfg.v1 v1.2.3/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/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/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.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/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= +gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.17.3 h1:XAm3PZp3wnEdzekNkcmj/9Y1zdmQYJ1I4GKSBBZ8aG0= +k8s.io/api v0.17.3/go.mod h1:YZ0OTkuw7ipbe305fMpIdf3GLXZKRigjtZaV5gzC2J0= +k8s.io/apimachinery v0.17.3 h1:f+uZV6rm4/tHE7xXgLyToprg6xWairaClGVkm2t8omg= +k8s.io/apimachinery v0.17.3/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= +k8s.io/client-go v0.17.3 h1:deUna1Ksx05XeESH6XGCyONNFfiQmDdqeqUvicvP6nU= +k8s.io/client-go v0.17.3/go.mod h1:cLXlTMtWHkuK4tD360KpWz2gG2KtdWEr/OT02i3emRQ= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/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/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/manifest.tmpl b/manifest.tmpl deleted file mode 100644 index 29b59c0..0000000 --- a/manifest.tmpl +++ /dev/null @@ -1,36 +0,0 @@ -image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} -{{#if build.tags}} -tags: -{{#each build.tags}} - - {{this}} -{{/each}} -{{/if}} -manifests: - - - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64 - platform: - architecture: amd64 - os: linux - - - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-i386 - platform: - architecture: 386 - os: linux - - - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64v8 - platform: - architecture: arm64 - variant: v8 - os: linux - - - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm32v7 - platform: - architecture: arm - variant: v7 - os: linux - - - image: promhippie/prometheus-scw-sd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm32v6 - platform: - architecture: arm - variant: v6 - os: linux diff --git a/pkg/action/discoverer.go b/pkg/action/discoverer.go index d530413..2e497ad 100644 --- a/pkg/action/discoverer.go +++ b/pkg/action/discoverer.go @@ -11,33 +11,59 @@ import ( "github.com/go-kit/kit/log/level" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/scaleway/go-scaleway" + baremetal "github.com/scaleway/scaleway-sdk-go/api/baremetal/v1alpha1" + instance "github.com/scaleway/scaleway-sdk-go/api/instance/v1" + "github.com/scaleway/scaleway-sdk-go/scw" ) const ( - scwPrefix = model.MetaLabelPrefix + "scaleway_" - projectLabel = scwPrefix + "project" - nameLabel = scwPrefix + "name" - identifierLabel = scwPrefix + "id" - archLabel = scwPrefix + "arch" - imageIdentifierLabel = scwPrefix + "image_id" - imageNameLabel = scwPrefix + "image_name" - publicIPLabel = scwPrefix + "public_ipv4" - publicHostLabel = scwPrefix + "public_host" - stateLabel = scwPrefix + "state" - privateIPLabel = scwPrefix + "private_ipv4" - privateHostLabel = scwPrefix + "private_host" - hostnameLabel = scwPrefix + "hostname" - orgLabel = scwPrefix + "org" - commercialTypeLabel = scwPrefix + "commercial_type" - platformLabel = scwPrefix + "platform" - hypervisorLabel = scwPrefix + "hypervisor" - nodeLabel = scwPrefix + "node" - bladeLabel = scwPrefix + "blade" - chassisLabel = scwPrefix + "chassis" - clusterLabel = scwPrefix + "cluster" - zoneLabel = scwPrefix + "zone" - tagsLabel = scwPrefix + "tags" + scwPrefix = model.MetaLabelPrefix + "scaleway_" + allowedActionsLabel = scwPrefix + "allowed_actions" + archLabel = scwPrefix + "arch" + bladeLabel = scwPrefix + "blade" + bootTypeLabel = scwPrefix + "boot_type" + bootscriptIdentifierLabel = scwPrefix + "bootscript_id" + bootscriptInitrdLabel = scwPrefix + "bootscript_initrd" + bootscriptKernelLabel = scwPrefix + "bootscript_kernel" + bootscriptTitleLabel = scwPrefix + "bootscript_title" + chassisLabel = scwPrefix + "chassis" + clusterLabel = scwPrefix + "cluster" + commercialTypeLabel = scwPrefix + "commercial_type" + descriptionLabel = scwPrefix + "description" + domainLabel = scwPrefix + "domain" + dynamicIPRequiredLabel = scwPrefix + "dynamic_ip_required" + enableIPv6Label = scwPrefix + "enable_ipv6" + hostnameLabel = scwPrefix + "hostname" + hypervisorLabel = scwPrefix + "hypervisor" + identifierLabel = scwPrefix + "id" + imageIdentifierLabel = scwPrefix + "image_id" + imageNameLabel = scwPrefix + "image_name" + installHostnameLabel = scwPrefix + "install_hostname" + installOsLabel = scwPrefix + "install_os" + installStatusLabel = scwPrefix + "install_status" + ipsLabel = scwPrefix + "ips" + ipv6Label = scwPrefix + "ipv6" + kindLabel = scwPrefix + "kind" + nameLabel = scwPrefix + "name" + nodeLabel = scwPrefix + "node" + offerLabel = scwPrefix + "offer" + orgLabel = scwPrefix + "org" + placementGroupIdentifierLabel = scwPrefix + "placement_group_id" + placementGroupNameLabel = scwPrefix + "placement_group_name" + platformLabel = scwPrefix + "platform" + privateHostLabel = scwPrefix + "private_host" + privateIPLabel = scwPrefix + "private_ipv4" + projectLabel = scwPrefix + "project" + protectedLabel = scwPrefix + "protected" + publicHostLabel = scwPrefix + "public_host" + publicIPLabel = scwPrefix + "public_ipv4" + securityGroupIdentifierLabel = scwPrefix + "security_group_id" + securityGroupNameLabel = scwPrefix + "security_group_name" + stateDetailLabel = scwPrefix + "state_detail" + stateLabel = scwPrefix + "state" + statusLabel = scwPrefix + "status" + tagsLabel = scwPrefix + "tags" + zoneLabel = scwPrefix + "zone" ) var ( @@ -46,15 +72,22 @@ var ( // ErrClientForbidden defines an error if the authentication fails. ErrClientForbidden = errors.New("failed to authenticate client") + + // ErrInvalidZone defines an error if an invalid zone have been provided. + ErrInvalidZone = errors.New("invalid zone provided") ) // Discoverer implements the Prometheus discoverer interface. type Discoverer struct { - clients map[string]*api.ScalewayAPI - logger log.Logger - refresh int - separator string - lasts map[string]struct{} + clients map[string]*scw.Client + logger log.Logger + refresh int + checkInstance bool + instanceZones []string + checkBaremetal bool + baremetalZones []string + separator string + lasts map[string]struct{} } // Run initializes fetching the targets for service discovery. @@ -82,73 +115,283 @@ func (d *Discoverer) getTargets(ctx context.Context) ([]*targetgroup.Group, erro targets := make([]*targetgroup.Group, 0) for project, client := range d.clients { + if d.checkInstance { + zones := make([]scw.Zone, 0) + + if zone, _ := client.GetDefaultZone(); zone != "" { + zones = []scw.Zone{ + zone, + } + } else { + for _, raw := range d.instanceZones { + zones = append(zones, scw.Zone(raw)) + } + } - now := time.Now() - servers, err := client.GetServers(false, 0) - requestDuration.WithLabelValues(project).Observe(time.Since(now).Seconds()) + for _, zone := range zones { + now := time.Now() - if err != nil { - level.Warn(d.logger).Log( - "msg", "Failed to fetch servers", - "project", project, - "err", err, - ) + resp, err := instance.NewAPI(client).ListServers( + &instance.ListServersRequest{ + Zone: zone, + }, + scw.WithAllPages(), + scw.WithContext(ctx), + ) + + requestDuration.WithLabelValues(project, "instance", zone.String()).Observe(time.Since(now).Seconds()) + + if err != nil { + level.Warn(d.logger).Log( + "msg", "Failed to fetch servers", + "project", project, + "kind", "instance", + "zone", zone, + "err", err, + ) + + requestFailures.WithLabelValues(project, "instance", zone.String()).Inc() + continue + } + + level.Debug(d.logger).Log( + "msg", "Requested servers", + "project", project, + "kind", "instance", + "zone", zone, + "count", resp.TotalCount, + ) + + for _, server := range resp.Servers { + var ( + imageIdentifier string + imageName string + locationCluster string + locationHypervisor string + locationNode string + locationPlatform string + bootscriptIdentifier string + bootscriptTitle string + bootscriptKernel string + bootscriptInitrd string + securityGroupIdentifier string + securityGroupName string + placementGroupIdentifier string + placementGroupName string + ipv6Address string + ) + + if server.Image != nil { + imageIdentifier = server.Image.ID + imageName = server.Image.Name + } + + if server.Location != nil { + locationCluster = server.Location.ClusterID + locationHypervisor = server.Location.HypervisorID + locationNode = server.Location.NodeID + locationPlatform = server.Location.PlatformID + } + + if server.Bootscript != nil { + bootscriptIdentifier = server.Bootscript.ID + bootscriptTitle = server.Bootscript.Title + bootscriptKernel = server.Bootscript.Kernel + bootscriptInitrd = server.Bootscript.Initrd + } + + if server.SecurityGroup != nil { + securityGroupIdentifier = server.SecurityGroup.ID + securityGroupName = server.SecurityGroup.Name + } + + if server.PlacementGroup != nil { + placementGroupIdentifier = server.PlacementGroup.ID + placementGroupName = server.PlacementGroup.Name + } - requestFailures.WithLabelValues(project).Inc() - return nil, err + addresses := make([]model.LabelSet, 0) + + addresses = append(addresses, model.LabelSet{ + model.AddressLabel: model.LabelValue(server.PublicIP.Address.String()), + }) + + if server.EnableIPv6 && server.IPv6 != nil { + ipv6Address = server.IPv6.Address.String() + + addresses = append(addresses, model.LabelSet{ + model.AddressLabel: model.LabelValue(ipv6Address), + }) + } + + target := &targetgroup.Group{ + Source: fmt.Sprintf("instance/%s", server.ID), + Targets: addresses, + Labels: model.LabelSet{ + model.AddressLabel: model.LabelValue(server.PublicIP.Address.String()), + model.LabelName(projectLabel): model.LabelValue(project), + model.LabelName(identifierLabel): model.LabelValue(server.ID), + model.LabelName(nameLabel): model.LabelValue(server.Name), + model.LabelName(orgLabel): model.LabelValue(server.Organization), + model.LabelName(allowedActionsLabel): model.LabelValue(actionsToString(d.separator, server.AllowedActions)), + model.LabelName(tagsLabel): model.LabelValue(tagsToString(d.separator, server.Tags)), + model.LabelName(commercialTypeLabel): model.LabelValue(server.CommercialType), + model.LabelName(dynamicIPRequiredLabel): model.LabelValue(boolToString(server.DynamicIPRequired)), + model.LabelName(enableIPv6Label): model.LabelValue(boolToString(server.EnableIPv6)), + model.LabelName(hostnameLabel): model.LabelValue(server.Hostname), + model.LabelName(imageIdentifierLabel): model.LabelValue(imageIdentifier), + model.LabelName(imageNameLabel): model.LabelValue(imageName), + model.LabelName(protectedLabel): model.LabelValue(boolToString(server.Protected)), + model.LabelName(privateIPLabel): model.LabelValue(*server.PrivateIP), + model.LabelName(privateHostLabel): model.LabelValue(fmt.Sprintf("%s.priv.cloud.scaleway.com", server.ID)), + model.LabelName(publicIPLabel): model.LabelValue(server.PublicIP.Address.String()), + model.LabelName(publicHostLabel): model.LabelValue(fmt.Sprintf("%s.pub.cloud.scaleway.com", server.ID)), + model.LabelName(stateLabel): model.LabelValue(server.State), + model.LabelName(clusterLabel): model.LabelValue(locationCluster), + model.LabelName(hypervisorLabel): model.LabelValue(locationHypervisor), + model.LabelName(nodeLabel): model.LabelValue(locationNode), + model.LabelName(platformLabel): model.LabelValue(locationPlatform), + model.LabelName(ipv6Label): model.LabelValue(ipv6Address), + model.LabelName(bootscriptIdentifierLabel): model.LabelValue(bootscriptIdentifier), + model.LabelName(bootscriptTitleLabel): model.LabelValue(bootscriptTitle), + model.LabelName(bootscriptKernelLabel): model.LabelValue(bootscriptKernel), + model.LabelName(bootscriptInitrdLabel): model.LabelValue(bootscriptInitrd), + model.LabelName(bootTypeLabel): model.LabelValue(server.BootType), + model.LabelName(securityGroupIdentifierLabel): model.LabelValue(securityGroupIdentifier), + model.LabelName(securityGroupNameLabel): model.LabelValue(securityGroupName), + model.LabelName(stateDetailLabel): model.LabelValue(server.StateDetail), + model.LabelName(archLabel): model.LabelValue(server.Arch), + model.LabelName(placementGroupIdentifierLabel): model.LabelValue(placementGroupIdentifier), + model.LabelName(placementGroupNameLabel): model.LabelValue(placementGroupName), + model.LabelName(zoneLabel): model.LabelValue(server.Zone), + model.LabelName(kindLabel): model.LabelValue("instance"), + }, + } + + level.Debug(d.logger).Log( + "msg", "Server added", + "project", project, + "kind", "instance", + "zone", zone, + "source", target.Source, + ) + + current[target.Source] = struct{}{} + targets = append(targets, target) + + } + } } - level.Debug(d.logger).Log( - "msg", "Requested servers", - "project", project, - "count", len(*servers), - ) - - for _, server := range *servers { - target := &targetgroup.Group{ - Source: fmt.Sprintf("scaleway/%s", server.Identifier), - Targets: []model.LabelSet{ - { - model.AddressLabel: model.LabelValue(server.PublicAddress.IP), - }, - }, - Labels: model.LabelSet{ - model.AddressLabel: model.LabelValue(server.PublicAddress.IP), - model.LabelName(projectLabel): model.LabelValue(project), - model.LabelName(nameLabel): model.LabelValue(server.Name), - model.LabelName(identifierLabel): model.LabelValue(server.Identifier), - model.LabelName(archLabel): model.LabelValue(server.Arch), - model.LabelName(imageIdentifierLabel): model.LabelValue(server.Image.Identifier), - model.LabelName(imageNameLabel): model.LabelValue(server.Image.Name), - model.LabelName(publicIPLabel): model.LabelValue(server.PublicAddress.IP), - model.LabelName(publicHostLabel): model.LabelValue(fmt.Sprintf("%s.pub.cloud.scaleway.com", server.Identifier)), - model.LabelName(stateLabel): model.LabelValue(server.State), - model.LabelName(privateIPLabel): model.LabelValue(server.PrivateIP), - model.LabelName(privateHostLabel): model.LabelValue(fmt.Sprintf("%s.priv.cloud.scaleway.com", server.Identifier)), - model.LabelName(hostnameLabel): model.LabelValue(server.Hostname), - model.LabelName(orgLabel): model.LabelValue(server.Organization), - model.LabelName(commercialTypeLabel): model.LabelValue(server.CommercialType), - model.LabelName(platformLabel): model.LabelValue(server.Location.Platform), - model.LabelName(hypervisorLabel): model.LabelValue(server.Location.Hypervisor), - model.LabelName(nodeLabel): model.LabelValue(server.Location.Node), - model.LabelName(bladeLabel): model.LabelValue(server.Location.Blade), - model.LabelName(chassisLabel): model.LabelValue(server.Location.Chassis), - model.LabelName(clusterLabel): model.LabelValue(server.Location.Cluster), - model.LabelName(zoneLabel): model.LabelValue(server.Location.ZoneID), - model.LabelName(tagsLabel): model.LabelValue(strings.Join(server.Tags, d.separator)), - }, + if d.checkBaremetal { + zones := make([]scw.Zone, 0) + + if zone, _ := client.GetDefaultZone(); zone != "" { + zones = []scw.Zone{ + zone, + } + } else { + for _, raw := range d.baremetalZones { + zones = append(zones, scw.Zone(raw)) + } } - level.Debug(d.logger).Log( - "msg", "Server added", - "project", project, - "source", target.Source, - ) + for _, zone := range zones { + now := time.Now() - current[target.Source] = struct{}{} - targets = append(targets, target) - } + resp, err := baremetal.NewAPI(client).ListServers( + &baremetal.ListServersRequest{ + Zone: zone, + }, + scw.WithAllPages(), + scw.WithContext(ctx), + ) + + requestDuration.WithLabelValues(project, "baremetal", zone.String()).Observe(time.Since(now).Seconds()) + + if err != nil { + level.Warn(d.logger).Log( + "msg", "Failed to fetch servers", + "project", project, + "kind", "baremetal", + "zone", zone, + "err", err, + ) + + requestFailures.WithLabelValues(project, "baremetal", zone.String()).Inc() + continue + } + + level.Debug(d.logger).Log( + "msg", "Requested servers", + "project", project, + "kind", "baremetal", + "zone", zone, + "count", resp.TotalCount, + ) + + for _, server := range resp.Servers { + if len(server.IPs) < 1 { + continue + } + + var ( + installOs string + installHostname string + installStatus string + ) + + if server.Install != nil { + installOs = server.Install.OsID + installHostname = server.Install.Hostname + installStatus = server.Install.Status.String() + } + addresses := make([]model.LabelSet, len(server.IPs)) + + for _, ip := range server.IPs { + addresses = append(addresses, model.LabelSet{ + model.AddressLabel: model.LabelValue(ip.Address.String()), + }) + } + + target := &targetgroup.Group{ + Source: fmt.Sprintf("baremetal/%s", server.ID), + Targets: addresses, + Labels: model.LabelSet{ + model.AddressLabel: model.LabelValue(server.IPs[0].Address.String()), + model.LabelName(projectLabel): model.LabelValue(project), + model.LabelName(identifierLabel): model.LabelValue(server.ID), + model.LabelName(orgLabel): model.LabelValue(server.OrganizationID), + model.LabelName(nameLabel): model.LabelValue(server.Name), + model.LabelName(descriptionLabel): model.LabelValue(server.Description), + model.LabelName(statusLabel): model.LabelValue(server.Status), + model.LabelName(offerLabel): model.LabelValue(server.OfferID), + model.LabelName(installOsLabel): model.LabelValue(installOs), + model.LabelName(installHostnameLabel): model.LabelValue(installHostname), + model.LabelName(installStatusLabel): model.LabelValue(installStatus), + model.LabelName(tagsLabel): model.LabelValue(tagsToString(d.separator, server.Tags)), + model.LabelName(ipsLabel): model.LabelValue(ipsToString(d.separator, server.IPs)), + model.LabelName(domainLabel): model.LabelValue(server.Domain), + model.LabelName(bootTypeLabel): model.LabelValue(server.BootType), + model.LabelName(zoneLabel): model.LabelValue(server.Zone), + model.LabelName(kindLabel): model.LabelValue("baremetal"), + }, + } + + level.Debug(d.logger).Log( + "msg", "Server added", + "project", project, + "kind", "baremetal", + "zone", zone, + "source", target.Source, + ) + + current[target.Source] = struct{}{} + targets = append(targets, target) + } + } + } } for k := range d.lasts { @@ -170,3 +413,38 @@ func (d *Discoverer) getTargets(ctx context.Context) ([]*targetgroup.Group, erro d.lasts = current return targets, nil } + +// actionsToString transforms a slice if actions to a string separated by defined separator. +func actionsToString(separator string, vals []instance.ServerAction) string { + res := []string{} + + for _, val := range vals { + res = append(res, val.String()) + } + + return strings.Join(res, separator) +} + +// tagsToString transforms a slice if tags to a string separated by defined separator. +func tagsToString(separator string, vals []string) string { + return strings.Join(vals, separator) +} + +// ipsToString transforms a slice if ips to a string separated by defined separator. +func ipsToString(separator string, vals []*baremetal.IP) string { + res := []string{} + + for _, val := range vals { + res = append(res, val.Address.String()) + } + + return strings.Join(res, separator) +} + +func boolToString(val bool) string { + if val { + return "true" + } + + return "false" +} diff --git a/pkg/action/metrics.go b/pkg/action/metrics.go index 5813dec..bb627dc 100644 --- a/pkg/action/metrics.go +++ b/pkg/action/metrics.go @@ -22,7 +22,7 @@ var ( Help: "Histogram of latencies for requests to the Scaleway API.", Buckets: []float64{0.001, 0.01, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0}, }, - []string{"project"}, + []string{"project", "kind", "zone"}, ) requestFailures = prometheus.NewCounterVec( @@ -31,7 +31,7 @@ var ( Name: "request_failures_total", Help: "Total number of failed requests to the Scaleway API.", }, - []string{"project"}, + []string{"project", "kind", "zone"}, ) ) diff --git a/pkg/action/server.go b/pkg/action/server.go index 8f9bd66..81587fb 100644 --- a/pkg/action/server.go +++ b/pkg/action/server.go @@ -2,10 +2,12 @@ package action import ( "context" + "fmt" "io" "net/http" "os" "os/signal" + "runtime" "time" "github.com/go-chi/chi" @@ -17,64 +19,91 @@ import ( "github.com/promhippie/prometheus-scw-sd/pkg/config" "github.com/promhippie/prometheus-scw-sd/pkg/middleware" "github.com/promhippie/prometheus-scw-sd/pkg/version" - "github.com/scaleway/go-scaleway" - scwlog "github.com/scaleway/go-scaleway/logger" + "github.com/scaleway/scaleway-sdk-go/scw" ) // Server handles the server sub-command. func Server(cfg *config.Config, logger log.Logger) error { level.Info(logger).Log( "msg", "Launching Prometheus Scaleway SD", - "version", version.Version, + "version", version.String, "revision", version.Revision, - "date", version.BuildDate, - "go", version.GoVersion, + "date", version.Date, + "go", version.Go, ) var gr run.Group { ctx := context.Background() - clients := make(map[string]*api.ScalewayAPI, len(cfg.Target.Credentials)) + clients := make(map[string]*scw.Client, len(cfg.Target.Credentials)) for _, credential := range cfg.Target.Credentials { - client, err := api.NewScalewayAPI( - credential.Org, - credential.Token, - "", - credential.Region, - func(s *api.ScalewayAPI) { - s.Logger = scwlog.NewDisableLogger() - }, - ) + opts := make([]scw.ClientOption, 0) + + opts = append(opts, scw.WithUserAgent( + fmt.Sprintf( + "prometheus-scw-sd/%s (%s; %s; %s)", + version.String, + runtime.Version(), + runtime.GOOS, + runtime.GOARCH, + ), + )) + + opts = append(opts, scw.WithAuth( + credential.AccessKey, + credential.SecretKey, + )) + + if credential.Org != "" { + opts = append(opts, scw.WithDefaultOrganizationID( + credential.Org, + )) + } - if err != nil { - level.Error(logger).Log( - "msg", ErrClientFailed, - "project", credential.Project, - ) + if credential.Zone != "" { + zone, err := scw.ParseZone(credential.Zone) - return ErrClientFailed + if err != nil { + level.Error(logger).Log( + "msg", ErrInvalidZone, + "project", credential.Project, + "zone", credential.Zone, + ) + + return ErrInvalidZone + } + + opts = append(opts, scw.WithDefaultZone( + zone, + )) } - if err := client.CheckCredentials(); err != nil { + client, err := scw.NewClient(opts...) + + if err != nil { level.Error(logger).Log( - "msg", ErrClientForbidden, + "msg", ErrClientFailed, "project", credential.Project, ) - return ErrClientForbidden + return ErrClientFailed } clients[credential.Project] = client } disc := Discoverer{ - clients: clients, - logger: logger, - refresh: cfg.Target.Refresh, - separator: ",", - lasts: make(map[string]struct{}), + clients: clients, + logger: logger, + refresh: cfg.Target.Refresh, + checkInstance: cfg.Target.CheckInstance, + instanceZones: cfg.Zones.Instance, + checkBaremetal: cfg.Target.CheckBaremetal, + baremetalZones: cfg.Zones.Baremetal, + separator: ",", + lasts: make(map[string]struct{}), } a := adapter.NewAdapter(ctx, cfg.Target.File, "scaleway-sd", disc, logger) diff --git a/pkg/command/command.go b/pkg/command/command.go new file mode 100644 index 0000000..304211e --- /dev/null +++ b/pkg/command/command.go @@ -0,0 +1,60 @@ +package command + +import ( + "os" + + "github.com/promhippie/prometheus-scw-sd/pkg/config" + "github.com/promhippie/prometheus-scw-sd/pkg/version" + "github.com/urfave/cli/v2" +) + +// Run parses the command line arguments and executes the program. +func Run() error { + cfg := config.Load() + + app := &cli.App{ + Name: "prometheus-scw-sd", + Version: version.String, + Usage: "Prometheus Scaleway SD", + Authors: []*cli.Author{ + { + Name: "Thomas Boerger", + Email: "thomas@webhippie.de", + }, + }, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "log.level", + Value: "info", + Usage: "Only log messages with given severity", + EnvVars: []string{"PROMETHEUS_SCW_LOG_LEVEL"}, + Destination: &cfg.Logs.Level, + }, + &cli.BoolFlag{ + Name: "log.pretty", + Value: false, + Usage: "Enable pretty messages for logging", + EnvVars: []string{"PROMETHEUS_SCW_LOG_PRETTY"}, + Destination: &cfg.Logs.Pretty, + }, + }, + Commands: []*cli.Command{ + Health(cfg), + Server(cfg), + }, + } + + cli.HelpFlag = &cli.BoolFlag{ + Name: "help", + Aliases: []string{"h"}, + Usage: "Show the help, so what you see now", + } + + cli.VersionFlag = &cli.BoolFlag{ + Name: "version", + Aliases: []string{"v"}, + Usage: "Print the current version of that tool", + } + + return app.Run(os.Args) +} diff --git a/cmd/prometheus-scw-sd/health.go b/pkg/command/health.go similarity index 85% rename from cmd/prometheus-scw-sd/health.go rename to pkg/command/health.go index 59118de..491e44a 100644 --- a/cmd/prometheus-scw-sd/health.go +++ b/pkg/command/health.go @@ -1,4 +1,4 @@ -package main +package command import ( "fmt" @@ -6,7 +6,7 @@ import ( "github.com/go-kit/kit/log/level" "github.com/promhippie/prometheus-scw-sd/pkg/config" - "gopkg.in/urfave/cli.v2" + "github.com/urfave/cli/v2" ) // Health provides the sub-command to perform a health check. @@ -23,10 +23,11 @@ func Health(cfg *config.Config) *cli.Command { Destination: &cfg.Server.Addr, }, &cli.StringFlag{ - Name: "scw.config", - Value: "", - Usage: "Path to Scaleway configuration file", - EnvVars: []string{"PROMETHEUS_SCW_CONFIG"}, + Name: "scw.config", + Value: "", + Usage: "Path to Scaleway configuration file", + EnvVars: []string{"PROMETHEUS_SCW_CONFIG"}, + Destination: nil, }, }, Action: func(c *cli.Context) error { diff --git a/cmd/prometheus-scw-sd/server.go b/pkg/command/server.go similarity index 51% rename from cmd/prometheus-scw-sd/server.go rename to pkg/command/server.go index 4bd5f27..9c29b03 100644 --- a/cmd/prometheus-scw-sd/server.go +++ b/pkg/command/server.go @@ -1,4 +1,4 @@ -package main +package command import ( "errors" @@ -6,21 +6,7 @@ import ( "github.com/go-kit/kit/log/level" "github.com/promhippie/prometheus-scw-sd/pkg/action" "github.com/promhippie/prometheus-scw-sd/pkg/config" - "gopkg.in/urfave/cli.v2" -) - -var ( - // ErrMissingOutputFile defines the error if output.file is empty. - ErrMissingOutputFile = errors.New("Missing path for output.file") - - // ErrMissingScwToken defines the error if scw.token is empty. - ErrMissingScwToken = errors.New("Missing required scw.token") - - // ErrMissingScwOrg defines the error if scw.org is empty. - ErrMissingScwOrg = errors.New("Missing required scw.org") - - // ErrMissingAnyCredentials defines the error if no credentials are provided. - ErrMissingAnyCredentials = errors.New("Missing any credentials") + "github.com/urfave/cli/v2" ) // Server provides the sub-command to start the server. @@ -57,11 +43,31 @@ func Server(cfg *config.Config) *cli.Command { EnvVars: []string{"PROMETHEUS_SCW_OUTPUT_REFRESH"}, Destination: &cfg.Target.Refresh, }, + &cli.BoolFlag{ + Name: "scw.check_instance", + Value: true, + Usage: "Enable instance gathering", + EnvVars: []string{"PROMETHEUS_SCW_CHECK_INSTANCE"}, + Destination: &cfg.Target.CheckInstance, + }, + &cli.BoolFlag{ + Name: "scw.check_baremetal", + Value: true, + Usage: "Enable baremetal gathering", + EnvVars: []string{"PROMETHEUS_SCW_CHECK_BAREMETAL"}, + Destination: &cfg.Target.CheckBaremetal, + }, &cli.StringFlag{ - Name: "scw.token", + Name: "scw.access_key", Value: "", - Usage: "Access token for the Scaleway API", - EnvVars: []string{"PROMETHEUS_SCW_TOKEN"}, + Usage: "Access key for the Scaleway API", + EnvVars: []string{"PROMETHEUS_SCW_ACESS_KEY"}, + }, + &cli.StringFlag{ + Name: "scw.secret_key", + Value: "", + Usage: "Secret key for the Scaleway API", + EnvVars: []string{"PROMETHEUS_SCW_SECRET_KEY"}, }, &cli.StringFlag{ Name: "scw.org", @@ -70,10 +76,10 @@ func Server(cfg *config.Config) *cli.Command { EnvVars: []string{"PROMETHEUS_SCW_ORG"}, }, &cli.StringFlag{ - Name: "scw.region", + Name: "scw.zone", Value: "", - Usage: "Region for the Scaleway API", - EnvVars: []string{"PROMETHEUS_SCW_REGION"}, + Usage: "Zone for the Scaleway API", + EnvVars: []string{"PROMETHEUS_SCW_ZONE"}, }, &cli.StringFlag{ Name: "scw.config", @@ -81,6 +87,26 @@ func Server(cfg *config.Config) *cli.Command { Usage: "Path to Scaleway configuration file", EnvVars: []string{"PROMETHEUS_SCW_CONFIG"}, }, + &cli.StringSliceFlag{ + Name: "scw.instance_zone", + Value: cli.NewStringSlice("fr-par-1", "nl-ams-1"), + Usage: "List of available zones for instance API", + EnvVars: []string{"PROMETHEUS_SCW_INSTANCE_ZONES"}, + Hidden: true, + }, + &cli.StringSliceFlag{ + Name: "scw.baremetal_zone", + Value: cli.NewStringSlice("fr-par-2"), + Usage: "List of available zones for baremetal API", + EnvVars: []string{"PROMETHEUS_SCW_BAREMETAL_ZONES"}, + Hidden: true, + }, + }, + Before: func(c *cli.Context) error { + cfg.Zones.Instance = c.StringSlice("scw.instance_zone") + cfg.Zones.Baremetal = c.StringSlice("scw.baremetal_zone") + + return nil }, Action: func(c *cli.Context) error { logger := setupLogger(cfg) @@ -98,18 +124,19 @@ func Server(cfg *config.Config) *cli.Command { if cfg.Target.File == "" { level.Error(logger).Log( - "msg", ErrMissingOutputFile, + "msg", "Missing path for output.file", ) - return ErrMissingOutputFile + return errors.New("missing path for output.file") } - if c.IsSet("scw.token") && c.IsSet("scw.org") && c.IsSet("scw.region") { + if c.IsSet("scw.access_key") && c.IsSet("scw.secret_key") { credentials := config.Credential{ - Project: "default", - Token: c.String("scw.token"), - Org: c.String("scw.org"), - Region: c.String("scw.region"), + Project: "default", + AccessKey: c.String("scw.access_key"), + SecretKey: c.String("scw.secret_key"), + Org: c.String("scw.org"), + Zone: c.String("scw.zone"), } cfg.Target.Credentials = append( @@ -117,29 +144,29 @@ func Server(cfg *config.Config) *cli.Command { credentials, ) - if credentials.Token == "" { + if credentials.AccessKey == "" { level.Error(logger).Log( - "msg", ErrMissingScwToken, + "msg", "Missing required scw.access_key", ) - return ErrMissingScwToken + return errors.New("missing required scw.access_key") } - if credentials.Org == "" { + if credentials.SecretKey == "" { level.Error(logger).Log( - "msg", ErrMissingScwOrg, + "msg", "Missing required scw.secret_key", ) - return ErrMissingScwOrg + return errors.New("missing required scw.secret_key") } } if len(cfg.Target.Credentials) == 0 { level.Error(logger).Log( - "msg", ErrMissingAnyCredentials, + "msg", "Missing any credentials", ) - return ErrMissingAnyCredentials + return errors.New("missing any credentials") } return action.Server(cfg, logger) diff --git a/cmd/prometheus-scw-sd/setup.go b/pkg/command/setup.go similarity index 94% rename from cmd/prometheus-scw-sd/setup.go rename to pkg/command/setup.go index a2a68b4..64e8452 100644 --- a/cmd/prometheus-scw-sd/setup.go +++ b/pkg/command/setup.go @@ -1,9 +1,8 @@ -package main +package command import ( "encoding/json" "errors" - "gopkg.in/yaml.v2" "io/ioutil" "os" "path/filepath" @@ -12,11 +11,12 @@ import ( "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/promhippie/prometheus-scw-sd/pkg/config" + "gopkg.in/yaml.v2" ) var ( // ErrConfigFormatInvalid defines the error if ext is unsupported. - ErrConfigFormatInvalid = errors.New("Config extension is not supported") + ErrConfigFormatInvalid = errors.New("config extension is not supported") ) func setupLogger(cfg *config.Config) log.Logger { diff --git a/pkg/config/config.go b/pkg/config/config.go index d3eae04..b288fb5 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -2,10 +2,11 @@ package config // Credential defines a single project credential. type Credential struct { - Project string `json:"project" yaml:"project"` - Token string `json:"token" yaml:"token"` - Org string `json:"org" yaml:"org"` - Region string `json:"region" yaml:"region"` + Project string `json:"project" yaml:"project"` + AccessKey string `json:"access_key" yaml:"access_key"` + SecretKey string `json:"secret_key" yaml:"secret_key"` + Org string `json:"org" yaml:"org"` + Zone string `json:"zone" yaml:"zone"` } // Server defines the general server configuration. @@ -20,17 +21,26 @@ type Logs struct { Pretty bool `json:"pretty" yaml:"pretty"` } +// Zones defines the available zones per api endpoint. +type Zones struct { + Instance []string `json:"instance" yaml:"instance"` + Baremetal []string `json:"baremetal" yaml:"baremetal"` +} + // Target defines the target specific configuration. type Target struct { - File string `json:"file" yaml:"file"` - Refresh int `json:"refresh" yaml:"refresh"` - Credentials []Credential `json:"credentials" yaml:"credentials"` + File string `json:"file" yaml:"file"` + Refresh int `json:"refresh" yaml:"refresh"` + CheckInstance bool `json:"check_instance" yaml:"check_instance"` + CheckBaremetal bool `json:"check_baremetal" yaml:"check_baremetal"` + Credentials []Credential `json:"credentials" yaml:"credentials"` } // Config is a combination of all available configurations. type Config struct { Server Server `json:"server" yaml:"server"` Logs Logs `json:"logs" yaml:"logs"` + Zones Zones `json:"zones" yaml:"zones"` Target Target `json:"target" yaml:"target"` } diff --git a/pkg/version/collector.go b/pkg/version/collector.go index e69d1a8..9791d75 100644 --- a/pkg/version/collector.go +++ b/pkg/version/collector.go @@ -15,6 +15,6 @@ func Collector(ns string) *prometheus.GaugeVec { []string{"version", "revision", "goversion"}, ) - info.WithLabelValues(Version, Revision, GoVersion).Set(1) + info.WithLabelValues(String, Revision, Go).Set(1) return info } diff --git a/pkg/version/version.go b/pkg/version/version.go index a3a22de..a08b2b8 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -5,15 +5,15 @@ import ( ) var ( - // Version gets defined by the build system. - Version = "0.0.0-dev" + // String gets defined by the build system. + String = "0.0.0-dev" // Revision indicates the commit this binary was built from. Revision string - // BuildDate indicates the date this binary was built. - BuildDate string + // Date indicates the date this binary was built. + Date string - // GoVersion running this binary. - GoVersion = runtime.Version() + // Go running this binary. + Go = runtime.Version() ) diff --git a/reflex.conf b/reflex.conf new file mode 100644 index 0000000..9e99873 --- /dev/null +++ b/reflex.conf @@ -0,0 +1,2 @@ +# backend +-r '^(cmd|pkg)/.*\.go$' -s -- sh -c 'make bin/prometheus-scw-sd-debug && bin/prometheus-scw-sd-debug --log.pretty --log.level debug server' diff --git a/tools.json b/tools.json deleted file mode 100644 index 1b7fd76..0000000 --- a/tools.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Tools": [ - { - "Repository": "github.com/golang/dep/cmd/dep", - "Commit": "45be32ba4708aad5e2aa8c86f9432c4c4c1f8da2" - }, - { - "Repository": "github.com/golang/lint/golint", - "Commit": "06c8688daad7faa9da5a0c2f163a3d14aac986ca" - }, - { - "Repository": "honnef.co/go/tools/cmd/megacheck", - "Commit": "3ac6a802416d2efd6654491fe47f693e56d8eb4e" - }, - { - "Repository": "github.com/karalabe/xgo", - "Commit": "d164e4e53dfdc4e25de90a762d213f8d397e24a1" - }, - { - "Repository": "github.com/haya14busa/goverage", - "Commit": "eec3514a20b55dca311300eeb08fe5c8ab9ab781" - } - ], - "RetoolVersion": "1.3.7" -}