Discover Packages
github.com/TrilliumIT/go-multiping
ping
internal
timeoutmap
package
Version:
v0.0.0-...-d9fbfd9
Opens a new window with list of versions in this module.
Published: Apr 2, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Map
func (m *Map) Add(ip net.IP, id ping.ID, seq ping.Seq, t time.Time)
func (m *Map) Del(ip net.IP, id ping.ID, seq ping.Seq)
func (m *Map) Next(ctx context.Context) (ip net.IP, id ping.ID, seq ping.Seq, t time.Time)
func (m *Map) Update(ip net.IP, id ping.ID, seq ping.Seq, t time.Time)
Map holds a timeout map, a map of when different pings time out
New creates a new timeout map
Add adds an entry to the timeout map
Del deletes an entry from the timeout map, this should be called when
the ping is received
Next blocks until the next packet times out, then returns the information for that packet.
Update updates the timeout on an existing entry
It does nothing if the entry does not exist, because it may have already
been deleted by being recieved
Source Files
¶
Click to show internal directories.
Click to hide internal directories.