stats

package
v0.0.0-...-e4798cc Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Here we store all of the packet loss and latency data for each host. We store the packets using a ring buffer so we can keep track of the last 100 and 1000 packets. We also store the total number of packets dropped.

This is mostly an attempt for me to use a complicated memory struct vs a more standard slice.

Index

Constants

This section is empty.

Variables

View Source
var Hosts map[string]*hostLongTerm
View Source
var RingHosts map[string]*RingStats

Functions

func InitHost

func InitHost(host string)

Add a host to the longterm Stats

func RegisterRingHost

func RegisterRingHost(host string) error

Add a new Ring Host for monitoring; we don't lock it since we aren't messing with the ring We do DNS resolution and for each IP address we find we are going to init a stats ring for the last 100 and 1k packets.

Types

type RingStats

type RingStats struct {
	Hostname string
	Ips      []ipRings
}

Jump to

Keyboard shortcuts

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