Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHealthzHandler ¶
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.