jobs

package
v0.26.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package jobs provides validated constructors for tinySQL catalog jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(cfg Config) (*tinysql.CatalogJob, error)

Build validates cfg and returns a CatalogJob.

func NewCron

func NewCron(name, sqlText, cronExpr, timezone string, enabled bool) (*tinysql.CatalogJob, error)

NewCron creates a CRON job.

func NewInterval

func NewInterval(name, sqlText string, interval time.Duration, enabled bool) (*tinysql.CatalogJob, error)

NewInterval creates an INTERVAL job.

func NewOnce

func NewOnce(name, sqlText string, runAt time.Time, enabled bool) (*tinysql.CatalogJob, error)

NewOnce creates a one-shot job.

Types

type Config

type Config struct {
	Name         string
	SQL          string
	ScheduleType string
	CronExpr     string
	IntervalMs   int64
	RunAt        *time.Time
	Timezone     string
	Enabled      *bool
	CatchUp      bool
	NoOverlap    bool
	MaxRuntimeMs int64
}

Config describes a scheduled tinySQL job before validation.

Jump to

Keyboard shortcuts

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