summaryrefslogtreecommitdiff
path: root/internal/failover/failover.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-12-21 18:04:44 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-12-21 18:28:52 +0100
commite378d715a02ca749aec3e54f8496a51daea61404 (patch)
tree5d371152edb521d0ada4a112a02ebc75de8bc065 /internal/failover/failover.go
parenta8e71f7f20a1d5640d08ff637dc209206f536b8d (diff)
Failover: Pass logger and add debug statements
Diffstat (limited to 'internal/failover/failover.go')
-rw-r--r--internal/failover/failover.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/internal/failover/failover.go b/internal/failover/failover.go
index f239eeb..31fb2b0 100644
--- a/internal/failover/failover.go
+++ b/internal/failover/failover.go
@@ -1,6 +1,10 @@
package failover
-import "time"
+import (
+ "time"
+
+ "github.com/eduvpn/eduvpn-common/internal/log"
+)
const (
// Send a ping every 2 seconds to the gateway
@@ -16,6 +20,6 @@ const (
// New creates a failover monitor for the gateway and the rx bytes function reader
// This is a simple wrapper over `NewDroppedMonitor` to create one with the default settings
// If this function returns True, the connection is dropped. False means it has exited and we don't know for sure if it's dropped or not
-func New(readRxBytes func() (int64, error)) (*DroppedConMon, error) {
- return NewDroppedMonitor(pInterval, pAlive, pDropped, readRxBytes)
+func New(readRxBytes func() (int64, error), logger log.FileLogger) (*DroppedConMon, error) {
+ return NewDroppedMonitor(pInterval, pAlive, pDropped, readRxBytes, logger)
}