extheartbeat

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 3 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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