goping

package
v0.1.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingOnChan

func PingOnChan(req *Request, c chan *Pong)

Types

type Pong

type Pong struct {
	Request *Request //The ping request
	Rtt     float64  //The  time elapsed between the ping sent over the wire and the arrived pong response
	Err     error
	Packet  *icmp.Echo
	Id      int //The id of this ping. The PID will be used
	Seq     int //Sequence of the ping created byt this api
	// contains filtered or unexported fields
}

func Ping

func Ping(p *Request) (*Pong, error)

Requests a Synchronous Ping (Internally channels are used)

type Request

type Request struct {
	To      string //The Ip or FQDN of the host to ping
	Timeout int    //Timeout to receive a pong (answer for the ping)
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL