Created public api, cleaned up internals.

This commit is contained in:
Jay
2026-04-19 14:23:10 -04:00
parent d2528d3ac7
commit dfd28d65bc
7 changed files with 158 additions and 126 deletions
+2 -2
View File
@@ -15,14 +15,14 @@ func TestRunKeepalive(t *testing.T) {
defer cancel()
w := &DefaultWorker{
Config: &WorkerConfig{KeepaliveTimeout: 100 * time.Millisecond},
Config: &WorkerConfig{KeepaliveTimeout: 200 * time.Millisecond},
Heartbeat: heartbeat,
}
go w.RunKeepalive(ctx, keepalive)
// send heartbeats faster than the timeout
for i := 0; i < 5; i++ {
time.Sleep(30 * time.Millisecond)
time.Sleep(20 * time.Millisecond)
w.Heartbeat <- struct{}{}
}