26 lines
1.2 KiB
Go
26 lines
1.2 KiB
Go
// Package scheduler runs feedkit sources and forwards their events to the
|
|
// daemon event bus.
|
|
//
|
|
// External API surface:
|
|
// - Scheduler: runs configured polling and streaming jobs
|
|
// - Job: one scheduler task bound to a source
|
|
// - StreamExitPolicy: stream supervision policy for non-fatal exits
|
|
// - StreamBackoff: restart pacing for supervised stream sources
|
|
//
|
|
// Optional helpers from helpers.go:
|
|
// - JobFromSourceConfig: build a scheduler job from a configured source and
|
|
// feedkit-owned scheduling params
|
|
//
|
|
// Poll sources are run on a fixed cadence with optional jitter. Stream sources
|
|
// are supervised long-lived workers. Their generic feedkit controls live under
|
|
// sources[].params:
|
|
// - stream_exit_policy: restart|stop|fatal (default restart)
|
|
// - stream_backoff_initial: positive duration (default 1s)
|
|
// - stream_backoff_max: positive duration (default 1m)
|
|
// - stream_backoff_jitter: non-negative duration (default 250ms)
|
|
//
|
|
// Stream sources can classify exits with sources.StreamRetryable and
|
|
// sources.StreamFatal. Plain errors are treated as retryable by default, while
|
|
// fatal exits are propagated from Scheduler.Run so the daemon can shut down.
|
|
package scheduler
|