Documentation
¶
Index ¶
- func CreateCommandSender(syncProducer libkafka.SyncProducer, branch cqrsbase.Branch, dryRun bool) task.CreateCommandSender
- func CreateHealthzHandler() http.Handler
- func CreatePublisher(sender task.CreateCommandSender, dryRun bool) publisher.Publisher
- func CreateScheduleStore(client versioned.Interface, namespace string) (externalversions.SharedInformerFactory, store.ScheduleStore)
- func CreateTick(ctx context.Context, scheduleStore store.ScheduleStore, ...) tick.Tick
- func CreateTickLoop(ctx context.Context, scheduleStore store.ScheduleStore, ...) tick.Tick
- func CreateTriggerHandler(scheduleStore store.ScheduleStore, pub publisher.Publisher) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommandSender ¶
func CreateCommandSender( syncProducer libkafka.SyncProducer, branch cqrsbase.Branch, dryRun bool, ) task.CreateCommandSender
CreateCommandSender builds the task.CreateCommandSender. When dryRun is true, returns a no-op sender. Pure plumbing.
func CreateHealthzHandler ¶
CreateHealthzHandler returns the liveness-probe HTTP handler. Pure plumbing.
func CreatePublisher ¶
func CreatePublisher(sender task.CreateCommandSender, dryRun bool) publisher.Publisher
CreatePublisher builds a publisher.Publisher that sends through the given task.CreateCommandSender. When dryRun is true, the publisher logs the would-be CreateCommand and skips the sender call. Pure plumbing: no business logic.
func CreateScheduleStore ¶
func CreateScheduleStore( client versioned.Interface, namespace string, ) (externalversions.SharedInformerFactory, store.ScheduleStore)
CreateScheduleStore builds the informer-backed ScheduleStore for the given namespace. The caller is responsible for starting the returned factory (StartWithContext) and waiting for cache sync before reading.
func CreateTick ¶
func CreateTick( ctx context.Context, scheduleStore store.ScheduleStore, pub publisher.Publisher, clock libtime.CurrentDateTimeGetter, metrics tick.Metrics, ) tick.Tick
CreateTick builds the hourly cron loop. scheduleStore provides the current recurring-task definitions per tick; pub sends one CreateCommand per inventory entry; clock is the wall-clock source; metrics records per-publish outcomes and the tick-start timestamp.
NewTick can fail at construction time if time.LoadLocation("Europe/Berlin") fails (tzdata missing from the container image). That is a container-build bug, not a runtime fault — CreateTick panics with a wrapped error if it happens. The binary will CrashLoopBackOff with the tzdata error visible in the pod logs.
func CreateTickLoop ¶
func CreateTickLoop( ctx context.Context, scheduleStore store.ScheduleStore, syncProducer libkafka.SyncProducer, branch cqrsbase.Branch, dryRun bool, ) tick.Tick
CreateTickLoop builds a one-shot tick loop for cmd/run-once. It wires the store, publisher, clock, and metrics then delegates to CreateTick.
func CreateTriggerHandler ¶
CreateTriggerHandler returns the operator-replay HTTP handler. The handler reads the current task definitions from scheduleStore, date-filters them via schedule.TasksForDate(all, date) (slug-sorted), and calls publisher.Publish for each entry against the parsed date. Pure plumbing: no business logic, no closure capture, no state.
Types ¶
This section is empty.