From 74e36f0ead717105f26087c2cab08b41ba5a7ce8 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 12 Feb 2024 19:18:05 +0100 Subject: All: Document everything to pass revive lint --- internal/failover/monitor.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/failover/monitor.go') diff --git a/internal/failover/monitor.go b/internal/failover/monitor.go index d9028f2..5d81f22 100644 --- a/internal/failover/monitor.go +++ b/internal/failover/monitor.go @@ -20,6 +20,10 @@ type DroppedConMon struct { readRxBytes func() (int64, error) } +// NewDroppedMonitor creates a new failover monitor +// `pingInterval` is the interval in which to send pings +// `pDropped` is how many pings we need to send before we deem it is dropped +// `readRxBytes` is a function that gets the rx bytes from the client func NewDroppedMonitor(pingInterval time.Duration, pDropped int, readRxBytes func() (int64, error)) *DroppedConMon { return &DroppedConMon{pInterval: pingInterval, pDropped: pDropped, readRxBytes: readRxBytes} } -- cgit v1.2.3