scheduled

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package scheduled is the chassis `scheduled` inlet: a per-period poll loop that drains the scheduled_events store (chassis/scheduled) and fires due events into their tenant's `_scheduled/0` stack.

Unlike cron (which fans out one tick per tenant every period), the scheduler is table-driven: each pass reclaims stale claims, atomically CLAIMS due rows (so exactly one fleet node fires each — the claim is the coordination), dispatches the stored payload onto the bus, and marks the row done/failed. The bus re-entry mirrors cron: detectTenantBody routes `_txc.src=scheduled` + `_txc.scheduled.tenant` into the tenant's `_scheduled/0` (the sanctioned _sys→tenant pin).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is the scheduled inlet. It satisfies the server's Start()/Stop() controller contract.

func NewController

func NewController(ctx context.Context, pu *processor.Unit, store *sched.Store) *Controller

NewController builds the scheduled controller around an opened store. A nil store (scheduled personality not active / no --db-scheduled-dsn) yields an inert controller whose Start is a no-op.

func (*Controller) Start

func (c *Controller) Start()

Start launches the poll loop. No-op when the scheduled personality is disabled or no store was opened (data-plane-only chassis / tests).

func (*Controller) Stop

func (c *Controller) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL