Documentation
¶
Index ¶
- Constants
- func FireMeta(metadata map[string]any) (map[string]any, bool)
- func InFlightExpired(job capsschedule.Job, now time.Time) bool
- func IsFireStateless(metadata map[string]any) bool
- func IsFireTurn(metadata map[string]any) bool
- func IsOneShot(job capsschedule.Job) bool
- func IsStatelessSessionMode(mode string) bool
- func JobKind(job capsschedule.Job) string
- func NextFire(job capsschedule.Job, after time.Time) (time.Time, bool)
- func SessionModeFromMeta(meta map[string]any) string
- type Schedule
Constants ¶
const ( SessionModeStateless = "stateless" SessionModeReuse = "reuse" SessionModeFresh = "fresh" // alias of stateless SessionModeFixed = "fixed" )
Variables ¶
This section is empty.
Functions ¶
func InFlightExpired ¶
func InFlightExpired(job capsschedule.Job, now time.Time) bool
InFlightExpired reports whether a claimed one-shot should be reclaimed.
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 IsOneShot ¶
func IsOneShot(job capsschedule.Job) bool
IsOneShot reports whether a job fires once at an absolute time.
func IsStatelessSessionMode ¶
IsStatelessSessionMode reports whether a schedule turn should avoid inheriting the delivery conversation's active session history.
func SessionModeFromMeta ¶
SessionModeFromMeta reads sessionMode from schedule fire metadata.
Types ¶
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.