netmon

package module
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 8 Imported by: 0

README

netmon

Network monitoring tool

Documentation

Overview

Package netmon contains the network monitoring related code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PingResult added in v0.4.0

type PingResult struct {
	ServerID string        `json:"server_id"`
	Server   string        `json:"server"`
	Latency  time.Duration `json:"latency"`
	Err      error         `json:"error"`
}

PingResult contains the ping test result.

func Ping added in v0.4.0

func Ping(ctx context.Context) ([]PingResult, error)

Ping runs a ping test against the provided servers.

type SpeedResult added in v0.4.0

type SpeedResult struct {
	ServerID string        `json:"server_id"`
	Server   string        `json:"server"`
	Latency  time.Duration `json:"latency"`
	DL       float64       `json:"dl"`
	UL       float64       `json:"ul"`
	Err      error         `json:"error"`
}

SpeedResult contains the speed test result.

func Speed added in v0.4.0

func Speed(ctx context.Context, serverIDs []string) []SpeedResult

Speed runs a speed test against the provided servers.

Directories

Path Synopsis
Package main is the entrypoint of the application.
Package main is the entrypoint of the application.

Jump to

Keyboard shortcuts

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