scheduling

package
v2.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Next

func Next(expression, timezone string, after time.Time) (time.Time, error)

Types

type JobCreator

type JobCreator interface {
	Create(context.Context, model.CreateScanJobRequest, string) (model.ScanJob, error)
}

type Runner

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

func NewRunner

func NewRunner(store RunnerStore, creator JobCreator, logger *slog.Logger) *Runner

func (*Runner) RunDue

func (r *Runner) RunDue(ctx context.Context) (int, error)

type RunnerStore

type RunnerStore interface {
	ClaimDueScanSchedules(context.Context, time.Time, time.Time, int) ([]model.ScanSchedule, error)
	RecordScanScheduleRun(context.Context, string, *time.Time, *string, error) error
	StartAutomationRun(context.Context, model.StartAutomationRunRequest) (model.AutomationRun, error)
	FinishAutomationRun(context.Context, string, string, json.RawMessage, error) error
}

Jump to

Keyboard shortcuts

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