KlokkaConfig
Configuration receiver for install(Klokka) { ... }. A fresh instance is created per installation. Every property mirrors a KlokkaSettings field and carries the same default; queue declarations and handler bindings (handle) are collected here and applied when the plugin builds the KlokkaRuntime.
Properties
Maximum jobs claimed per queue per claim round.
Payload serialization strategy.
Retry policy used when a handler's registration does not specify its own.
How long KlokkaRuntime.drain waits for in-flight jobs before cancelling stragglers.
How often in-flight jobs' leases are renewed.
A start later than scheduledFor by more than this marks the run late in events.
Fallback interval between claim rounds when no push wakeup arrives.
Retention for terminal job runs.
Which parts of the runtime this process runs.
How often the retention sweep runs.
Functions
Binds a JobHandler object to type: the form for handlers with dependencies or their own unit tests. retry overrides defaultRetry and timeout overrides defaultTimeout for this kind; see JobRegistry.handle for the timeout semantics.
Binds a suspend lambda to type. Same semantics as the object form; retry overrides defaultRetry and timeout overrides defaultTimeout for this kind.
Declares a queue this process drains. Declaration order is drain priority: queues declared earlier are claimed first, mirroring KlokkaSettings.queues. If no queue is declared, the runtime falls back to a single queue named QueueName.DEFAULT.
queue with the name as a plain string.
The zero-payload convenience form: declares the schedule AND binds block as the handler in one call. The schedule id doubles as the job kind, so it shares the kind namespace and character rules and must not collide with a kind bound via handle. Graduating to the full form (a JobType, a payload, a standalone handler) changes the descriptor, not the enqueue model.
Declares a recurring schedule; see KlokkaRuntime.recurring for the semantics of every parameter. Declared here so the schedule exists before the runtime starts, which is when schedules are registered with the store.