extheartbeat

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package extheartbeat provides a small watchdog that signals when heartbeats stop arriving within a timeout. It is used by the action- and preflight-kit SDKs to detect a stalled controlling platform; both previously carried their own identical copy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func Notify

func Notify(ch chan<- time.Time, interval, timeout time.Duration) *Monitor

Notify starts a monitor: it forwards a single value on ch (then closes ch) if no heartbeat is recorded within timeout, and closes ch when the monitor is stopped.

func (*Monitor) RecordHeartbeat

func (h *Monitor) RecordHeartbeat()

func (*Monitor) Stop

func (h *Monitor) Stop()

Stop is idempotent: concurrent or repeated Stop calls (e.g. the HTTP stop handler and the heartbeat-timeout goroutine both stopping the same execution) close the channel once.

Jump to

Keyboard shortcuts

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