schedulerhttp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package schedulerhttp provides bounded scheduler inspection and recovery endpoints.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidDependencies = errors.New("scheduler http: registry and lease store are required")

ErrInvalidDependencies reports a missing registry or lease store.

Functions

This section is empty.

Types

type Handler

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

Handler exposes bounded scheduler inspection and fenced recovery endpoints.

func New

func New(registry *scheduler.Registry, leases lease.Store) (*Handler, error)

New constructs a scheduler HTTP handler with no arbitrary execution surface.

func (*Handler) ServeHTTP

func (handler *Handler) ServeHTTP(response http.ResponseWriter, request *http.Request)

type Schedule

type Schedule struct {
	Name               string                    `json:"name"`
	Task               string                    `json:"task"`
	Expression         string                    `json:"expression"`
	Timezone           string                    `json:"timezone"`
	Enabled            bool                      `json:"enabled"`
	Environments       []string                  `json:"environments,omitempty"`
	DaysOfWeek         []time.Weekday            `json:"days_of_week,omitempty"`
	TimeWindows        []scheduler.TimeWindow    `json:"time_windows,omitempty"`
	MissedRunPolicy    scheduler.MissedRunPolicy `json:"missed_run_policy"`
	MaxCatchUp         int                       `json:"max_catch_up"`
	OverlapPolicy      scheduler.OverlapPolicy   `json:"overlap_policy"`
	OnOneServer        bool                      `json:"on_one_server"`
	WithoutOverlapping bool                      `json:"without_overlapping"`
	RunInBackground    bool                      `json:"run_in_background"`
	EvenWhenPaused     bool                      `json:"even_when_paused"`
	OneServerTTL       string                    `json:"one_server_ttl,omitempty"`
	OverlapTTL         string                    `json:"overlap_ttl,omitempty"`
	Metadata           map[string]string         `json:"metadata,omitempty"`
	Next               *time.Time                `json:"next,omitempty"`
}

Schedule is the bounded public inspection view of a schedule.

Jump to

Keyboard shortcuts

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