handlers

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpHandler added in v0.9.0

func BumpHandler(mgr *heartbeat.Manager, hist history.Store, logger *slog.Logger) http.Handler

BumpHandler handles POST/GET /heartbeat/{id}.

func FailHandler added in v0.9.0

func FailHandler(mgr *heartbeat.Manager, hist history.Store, logger *slog.Logger) http.Handler

FailHandler handles POST/GET /heartbeat/{id}/fail.

func Healthz

func Healthz() http.HandlerFunc

Healthz returns the HTTP handler for the /healthz endpoint.

func HomeHandler added in v0.9.0

func HomeHandler(webFS fs.FS, version string) http.HandlerFunc

HomeHandler renders the base template with navbar and footer.

func Metrics added in v0.9.0

func Metrics(hist history.Store) http.HandlerFunc

Metrics returns the HTTP handler for the /metrics endpoint.

func PartialHandler added in v0.9.0

func PartialHandler(
	webFS fs.FS,
	siteRoot string,
	mgr *heartbeat.Manager,
	hist history.Store,
	disp *notifier.Dispatcher,
	logger *slog.Logger,
) http.HandlerFunc

PartialHandler serves HTML snippets for dashboard sections: heartbeats, receivers, history.

func TestHeartbeatHandler added in v0.14.0

func TestHeartbeatHandler(mgr *heartbeat.Manager, logger *slog.Logger) http.Handler

TestHeartbeatHandler allows sending a test notification to a specific heartbeat

func TestReceiverHandler added in v0.14.0

func TestReceiverHandler(dispatcher *notifier.Dispatcher, logger *slog.Logger) http.Handler

TestReceiverHandler allows sending a test notification to a specific receiver

Types

This section is empty.

Jump to

Keyboard shortcuts

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