{"id":29251680,"url":"https://github.com/macrat/go-parallel-pinger","last_synced_at":"2026-02-12T00:03:17.478Z","repository":{"id":57581104,"uuid":"362762138","full_name":"macrat/go-parallel-pinger","owner":"macrat","description":"A easy and thread-safe way to send ping in Go.","archived":false,"fork":false,"pushed_at":"2025-02-09T07:10:35.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T09:23:08.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macrat.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-29T09:28:24.000Z","updated_at":"2025-02-09T07:10:12.000Z","dependencies_parsed_at":"2024-01-22T15:58:54.634Z","dependency_job_id":null,"html_url":"https://github.com/macrat/go-parallel-pinger","commit_stats":null,"previous_names":["macrat/go-parallel-ping"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/macrat/go-parallel-pinger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fgo-parallel-pinger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fgo-parallel-pinger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fgo-parallel-pinger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fgo-parallel-pinger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macrat","download_url":"https://codeload.github.com/macrat/go-parallel-pinger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fgo-parallel-pinger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263427317,"owners_count":23464845,"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":[],"created_at":"2025-07-04T01:08:10.711Z","updated_at":"2026-02-12T00:03:17.451Z","avatar_url":"https://github.com/macrat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-parallel-pinger\n==================\n\n[![Documents](https://pkg.go.dev/badge/github.com/macrat/go-parallel-pinger)](https://pkg.go.dev/github.com/macrat/go-parallel-pinger)\n![Supports Linux, Darwin, and Windows](https://img.shields.io/badge/platform-Linux%20%7C%20Darwin%20%7C%20Windows-lightgrey)\n[![GitHub Actions CI Status](https://github.com/macrat/go-parallel-pinger/actions/workflows/test.yml/badge.svg)](https://github.com/macrat/go-parallel-pinger/actions/workflows/test.yml)\n[![Codecov Test Coverage](https://img.shields.io/codecov/c/gh/macrat/go-parallel-pinger)](https://app.codecov.io/gh/macrat/go-parallel-pinger/)\n\nA easy and thread-safe way to send ping in Go.\n\n``` go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/macrat/go-parallel-pinger\"\n)\n\nfunc Example() {\n\ttarget, _ := net.ResolveIPAddr(\"ip\", \"127.0.0.1\")\n\n\t// 1. make Pinger for IPv4 (or, you can use NewIPv6)\n\tp := pinger.NewIPv4()\n\n\t// 2. make context for handle timeout or cancel\n\tctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)\n\tdefer cancel()\n\n\t// 3. start Pinger for send/receive ICMP packet before send ping\n\tif err := p.Start(ctx); err != nil {\n\t\tlog.Fatalf(\"failed to start pinger: %s\", err)\n\t}\n\n\t// 4. send ping for the target, and wait until receive all reply or context canceled\n\tresult, err := p.Ping(ctx, target, 4, 100*time.Millisecond)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to send ping: %s\", err)\n\t}\n\n\t// 5. check the result\n\tlog.Printf(\"sent %d packets and received %d packets\", result.Sent, result.Recv)\n\tlog.Printf(\"RTT: min=%s / avg=%s / max=%s\", result.MinRTT, result.AvgRTT, result.MaxRTT)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fgo-parallel-pinger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacrat%2Fgo-parallel-pinger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fgo-parallel-pinger/lists"}