scheduler

package
v0.2.63 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// ListSchedules returns all schedules.
	ListSchedules(ctx context.Context, session ...codec.SessionOption) ([]*Schedule, error)

	// GetSchedule returns a schedule by id or nil if not found.
	GetSchedule(ctx context.Context, id string, session ...codec.SessionOption) (*Schedule, error)

	// Schedule creates or updates a schedule (generic upsert via Has flags).
	Schedule(ctx context.Context, in *MutableSchedule) error

	// Run creates or updates a run (generic upsert via Has flags).
	Run(ctx context.Context, in *MutableRun) error

	// GetRuns lists runs for a schedule, optionally filtered by since id.
	GetRuns(ctx context.Context, scheduleID, since string, session ...codec.SessionOption) ([]*Run, error)

	// RunDue lists all schedules, checks if they are due to run,
	// and triggers runs while avoiding duplicates. Returns number of started runs.
	RunDue(ctx context.Context) (int, error)
}

Client defines a scheduler API built on top of the schedule store. It provides generic, data-driven upserts for schedules and runs, and list/read operations.

type MutableRun

type MutableRun = runwrite.Run

Type aliases to reuse schedule models from the store package while exposing them through the scheduler client.

type MutableSchedule

type MutableSchedule = schedwrite.Schedule

Type aliases to reuse schedule models from the store package while exposing them through the scheduler client.

type Run

type Run = runpkg.RunView

Type aliases to reuse schedule models from the store package while exposing them through the scheduler client.

type Schedule

type Schedule = schedulepkg.ScheduleView

Type aliases to reuse schedule models from the store package while exposing them through the scheduler client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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