aboutsummaryrefslogtreecommitdiff
path: root/cardio
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-06-03 11:09:20 -0400
committerXe Iaso <me@xeiaso.net>2023-06-03 11:09:20 -0400
commit367c295594e2c75afc0ac4fde998a990e8a838cd (patch)
treefb4eda99dc0fbcfdf1fcadde2867fa0504d6de40 /cardio
parentc87b047c47273efee996e3119900c965c3068a59 (diff)
downloadx-367c295594e2c75afc0ac4fde998a990e8a838cd.tar.xz
x-367c295594e2c75afc0ac4fde998a990e8a838cd.zip
cardio: oops, got the type backwards
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cardio')
-rw-r--r--cardio/cardio.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cardio/cardio.go b/cardio/cardio.go
index 547cd67..cdffd6a 100644
--- a/cardio/cardio.go
+++ b/cardio/cardio.go
@@ -41,7 +41,7 @@ import (
// If you are using ln's opname facility (https://pkg.go.dev/within.website/ln/opname), then an
// expvar gauge will be created that will contain the current heartbeat. This allows you to
// monitor and alert on this value changing erratically.
-func Heartbeat(ctx context.Context, min, max time.Duration) (chan<- struct{}, func(), func()) {
+func Heartbeat(ctx context.Context, min, max time.Duration) (<-chan struct{}, func(), func()) {
heartbeat := make(chan struct{}, 1) // output channel
currDelay := (max + min) / 2 // start at half speed
var currDelayLock sync.Mutex