{"id":19900097,"url":"https://github.com/m-lab/ndt7-client-go","last_synced_at":"2025-04-06T07:14:28.963Z","repository":{"id":37458479,"uuid":"173776955","full_name":"m-lab/ndt7-client-go","owner":"m-lab","description":"ndt7 reference client implementation in Go","archived":false,"fork":false,"pushed_at":"2024-10-29T10:24:12.000Z","size":245,"stargazers_count":47,"open_issues_count":18,"forks_count":24,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-10-29T14:48:59.967Z","etag":null,"topics":["ndt7","network-performance-test","reference-client"],"latest_commit_sha":null,"homepage":"https://www.measurementlab.net/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T16:04:41.000Z","updated_at":"2024-10-08T19:02:35.000Z","dependencies_parsed_at":"2024-11-06T16:29:43.620Z","dependency_job_id":null,"html_url":"https://github.com/m-lab/ndt7-client-go","commit_stats":{"total_commits":111,"total_committers":9,"mean_commits":"12.333333333333334","dds":0.3873873873873874,"last_synced_commit":"865af0d54c503d4f3dd427788a865250c274412e"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-lab","download_url":"https://codeload.github.com/m-lab/ndt7-client-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445681,"owners_count":20939961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ndt7","network-performance-test","reference-client"],"created_at":"2024-11-12T20:11:09.716Z","updated_at":"2025-04-06T07:14:28.935Z","avatar_url":"https://github.com/m-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/m-lab/ndt7-client-go?status.svg)](https://godoc.org/github.com/m-lab/ndt7-client-go) [![Build Status](https://travis-ci.org/m-lab/ndt7-client-go.svg?branch=master)](https://travis-ci.org/m-lab/ndt7-client-go) [![Coverage Status](https://coveralls.io/repos/github/m-lab/ndt7-client-go/badge.svg?branch=master)](https://coveralls.io/github/m-lab/ndt7-client-go?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/m-lab/ndt7-client-go)](https://goreportcard.com/report/github.com/m-lab/ndt7-client-go)\n\n# ndt7 Go client\n\nReference ndt7 Go client implementation. Useful resources:\n\n- [API exposed by this library](\n    https://godoc.org/github.com/m-lab/ndt7-client-go\n);\n\n- [Manual for the ndt7-client CLI program](\n    https://godoc.org/github.com/m-lab/ndt7-client-go/cmd/ndt7-client\n);\n\n- [ndt7 protocol specification](\n    https://github.com/m-lab/ndt-server/blob/master/spec/ndt7-protocol.md\n).\n\nThe master branch contains stable code. We don't promise we won't break\nthe API, but we'll try not to.\n\n## Installing\n\nYou need Go \u003e= 1.12. We use modules. Make sure Go knows that:\n\n```bash\nexport GO111MODULE=on\n```\n\nClone the repository wherever you want with\n\n```bash\ngit clone https://github.com/m-lab/ndt7-client-go\n```\n\nFrom inside the repository, use `go get ./cmd/ndt7-client` to\nbuild the client. Binaries will be placed in `$GOPATH/bin`, if\n`GOPATH` is set, and in `$HOME/go/bin` otherwise.\n\nIf you're into a one-off install, this\n\n```bash\ngo install -v github.com/m-lab/ndt7-client-go/cmd/ndt7-client@latest\n```\n\nis equivalent to cloning the repository, running `go get ./cmd/ndt7-client`,\nand then cancelling the repository directory.\n\n### Building with a custom client name\n\nIn case you are integrating an ndt7-client binary into a third-party\napplication, it may be useful to build it with a custom client name. Since this\nvalue is passed to the server as metadata, doing so will allow you to retrieve\nmeasurements coming from your custom integration in Measurement Lab's data\neasily.\n\nTo set a custom client name at build time:\n\n```bash\nCLIENTNAME=my-custom-client-name\n\ngo build -ldflags \"-X main.ClientName=$CLIENTNAME\" ./cmd/ndt7-client\n```\n\n### Prometheus Exporter\n\nWhile `ndt7-client` is a \"single shot\" ndt7 client, there is also a\nnon-interactive periodic test runner `ndt7-prometheus-exporter`.\n\n#### Build and Run using Docker\n\n```bash\ngit clone https://github.com/m-lab/ndt7-client-go\ndocker build -t ndt7-prometheus-exporter .\n```\n\nTo run tests repeatedly\n\n```bash\nPORT=9191\ndocker run -d -p ${PORT}:8080 ndt7-prometheus-exporter\n```\n\n#### Sample Prometheus config\n\n```\n# scrape ndt7 test metrics\n  - job_name: ndt7\n    metrics_path: /metrics\n    static_configs:\n\t  - targets:\n\t    # host:port of the exporter\n\t    - localhost:9191\n\n# scrape ndt7-prometheus-exporter itself\n  - job_name: ndt7-prometheus-exporter\n    static_configs:\n\t  - targets:\n\t    # host:port of the exporter\n\t\t- localhost:9191\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fndt7-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-lab%2Fndt7-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fndt7-client-go/lists"}