Registry / networking / prometheus-community-pro-bing

prometheus-community-pro-bing

JSON →
library0.8.0gogounverified

Package probing is a simple but powerful ICMP echo (ping) library for Go that sends and receives ICMP Echo Request packets.

go get github.com/prometheus-community/pro-bing
INSTALL
IMPORT
SIG · PROMETHEUS-COMMUNI
P
prometheus-community-pro-bing
networkinggov0.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

probing
✓ github.com/prometheus-community/pro-bing

Creates a pinger, sends 3 ICMP echo requests, and prints statistics.

package main import ( "fmt" "github.com/prometheus-community/pro-bing" ) func main() { pinger, err := probing.NewPinger("8.8.8.8") if err != nil { panic(err) } pinger.Count = 3 err = pinger.Run() if err != nil { panic(err) } stats := pinger.Statistics() fmt.Printf("Sent: %d, Received: %d\n", stats.PacketsSent, stats.PacketsRecv) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.8.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
prometheus-community-pro-bing — go get prometheus-community-pro-bing · libregistry