Documentation
¶
Overview ¶
Package schedule implements cap/schedule.Engine (cron parsing and job fire-time evaluation) and schedule fire-metadata helpers used by runner/loop.
Index ¶
- func FireMeta(metadata map[string]any) (map[string]any, bool)
- func IsFireStateless(metadata map[string]any) bool
- func IsFireTurn(metadata map[string]any) bool
- func IsStatelessSessionMode(mode string) bool
- func New(_ struct{}, _ struct{}) (capschedule.Engine, error)
- func NextFire(job capschedule.Job, after time.Time) (time.Time, bool)
- func SessionModeFromMeta(meta map[string]any) string
- type Engine
- type Schedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFireStateless ¶
IsFireStateless reports whether a schedule-fired inbound event should run in a fresh side session without parent history.
func IsFireTurn ¶
IsFireTurn reports whether metadata marks a schedule-fired inbound turn.
func IsStatelessSessionMode ¶
IsStatelessSessionMode reports whether a schedule turn should avoid inheriting the delivery conversation's active session history.
func New ¶ added in v0.3.33
func New(_ struct{}, _ struct{}) (capschedule.Engine, error)
New is the schedule/engine kind constructor.
func SessionModeFromMeta ¶
SessionModeFromMeta reads sessionMode from schedule fire metadata.
Types ¶
type Engine ¶ added in v0.3.33
type Engine struct{}
Engine is the standard capschedule.Engine: cron parsing and job fire-time evaluation. Stateless; safe to share across instances.
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
Schedule is a parsed cron expression. Times are interpreted in the location of whatever time.Time it is asked about, so a schedule built from local time behaves like an OS crontab entry.
func ParseCron ¶
ParseCron parses a 5-field cron expression: minute hour day-of-month month day-of-week. Each field accepts `*`, a number, `a-b`, comma-separated lists, and `*/n` or `a-b/n` steps. The @hourly/@daily/@weekly/@monthly/@yearly shorthands are also accepted.