pinger

package
v0.3.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPingDevice

func BuildPingDevice(
	cfg *Config,
) func(context.Context, model.Device) (PerformancePingResponseEvent, error)

func PerformancePingerFilter

func PerformancePingerFilter(cfg *Config) model.DeviceFilter

func SetFlags added in v0.2.0

func SetFlags(fs *pflag.FlagSet, cfg *Config)

Types

type Config added in v0.2.0

type Config struct {
	Enabled         bool
	Privileged      bool
	MaxWorkers      int
	PingCount       int
	Timeout         time.Duration
	CheckInterval   time.Duration
	DefaultInterval time.Duration
	ServerInterval  time.Duration
}

type PerfPingDevicesEvent

type PerfPingDevicesEvent struct{}

type PerformancePingResponseEvent

type PerformancePingResponseEvent struct {
	Device   model.Device
	Stats    nettools.Icmp4EchoResponseStatistics
	Start    time.Time
	Duration time.Duration
}

type Point added in v0.2.0

type Point struct {
	Device  model.Device
	Start   time.Time
	Minimum time.Duration
	Average time.Duration
	Maximum time.Duration
	Loss    float64
}

type TsPointBase

type TsPointBase struct {
	Time  time.Time
	Value float64
}

type Worker added in v0.2.0

func NewWorker added in v0.2.0

func NewWorker(cfg *Config) *Worker

func (*Worker) Close added in v0.2.0

func (w *Worker) Close()

func (*Worker) Run added in v0.2.0

func (w *Worker) Run(ctx context.Context, max int)

Jump to

Keyboard shortcuts

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