jobrunner

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package jobrunner mounts the operator-facing /jobs/{key} surface where users can run a job and see its recent history. Admin-only configuration (schedule, runtime configs) lives on /manager/jobs/{key} — this package intentionally does NOT expose those settings so operators can't accidentally change cadence or credentials.

Both surfaces share the same manager.Service + configs.Service so run history and setup-required banners stay consistent across pages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler wires /jobs/{key} routes. svc is the job lifecycle service shared with the manager package; configsSvc is the runtime-config cache used for the setup-required banner.

func NewHandler

func NewHandler(svc *manager.Service, configsSvc *configs.Service) *Handler

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux, authMidd *login.Middleware)

Register wires the operator routes onto mux. All pages require auth; the run endpoint is gated by the same auth layer because job visibility is enforced by the login middleware (default Private), not by RequireAdmin — any user with access to the job card can run it.

Directories

Path Synopsis
templ: version: v0.3.1001
templ: version: v0.3.1001

Jump to

Keyboard shortcuts

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