handler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: BSD-2-Clause Imports: 9 Imported by: 0

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(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 `date` query parameter in YYYY-MM-DD format. 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(req.Context(), def, date). Per-task errors are accumulated in the response's `errors` array — the iteration does NOT short-circuit on error. The response is always HTTP 200 on a successfully parsed date and 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