handler

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: BSD-2-Clause Imports: 12 Imported by: 1 module, 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHealthzHandler

func NewHealthzHandler() http.Handler

NewHealthzHandler returns an HTTP handler that responds with HTTP 200 and a fixed JSON body {"status":"ok"}. It is the liveness-probe target for the Service in the Spec 5 manifests. No state, no I/O, no dependencies — safe to call at any cadence from any source.

func NewTriggerHandler

func NewTriggerHandler(
	currentDateTimeGetter libtime.CurrentDateTimeGetter,
	scheduleStore store.ScheduleStore,
	pub publisher.Publisher,
) http.Handler

NewTriggerHandler returns an HTTP handler that replays the recurring-task publishes for one civil date. The date is supplied as the optional `date` query parameter (any libtime-parseable format, e.g. YYYY-MM-DD or RFC3339); when missing, empty, or unparseable, the handler falls back to the clock's current civil date. scheduleStore provides the current recurring-task definitions; a store error returns HTTP 500. For each entry in the date-filtered inventory (schedule.TasksForDate, slug-sorted), the handler calls publisher.Publish(ctx, def, date). Per-task errors are accumulated in the response's `errors` array — the iteration does NOT short-circuit. The response is always HTTP 200 on a successful store read, regardless of whether any individual publish failed.

Security: this handler intentionally has no authentication. The service is deployed cluster-internal-only (no k8s Ingress); idempotency via deterministic UUID5 makes accidental replay safe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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