ui

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: MIT Imports: 13 Imported by: 3

README

Web UI

Easily monitor your queues via the provided web UI.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.5.0

type Config struct {
	// DB is the Backlite database.
	DB *sql.DB

	// BasePath is an optional base path to prepend to all URL paths.
	BasePath string

	// ItemsPerPage is the maximum amount of items to display per page. This defaults to 25.
	ItemsPerPage int

	// ReleaseAfter is the duration after which a task is released back to a queue if it has not finished executing.
	// Ths defaults to one hour, but it should match the value you use in your Backlite client.
	ReleaseAfter time.Duration
}

Config contains configuration for the Handler.

type Handler

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

Handler handles HTTP requests for the Backlite UI.

func NewHandler

func NewHandler(config Config) (*Handler, error)

NewHandler creates a new handler for the Backlite web UI.

func (*Handler) Failed

func (h *Handler) Failed(w http.ResponseWriter, req *http.Request) error

Failed renders the completed tasks that have failed.

func (*Handler) Register added in v0.3.0

func (h *Handler) Register(mux *http.ServeMux) *http.ServeMux

Register registers all available routes.

func (*Handler) Running

func (h *Handler) Running(w http.ResponseWriter, req *http.Request) error

Running renders the running tasks.

func (*Handler) Succeeded

func (h *Handler) Succeeded(w http.ResponseWriter, req *http.Request) error

Succeeded renders the completed tasks that have succeeded.

func (*Handler) Task added in v0.2.0

func (h *Handler) Task(w http.ResponseWriter, req *http.Request) error

Task renders a task.

func (*Handler) TaskCompleted added in v0.2.0

func (h *Handler) TaskCompleted(w http.ResponseWriter, req *http.Request) error

TaskCompleted renders a completed task.

func (*Handler) Upcoming

func (h *Handler) Upcoming(w http.ResponseWriter, req *http.Request) error

Upcoming renders the upcoming tasks.

Jump to

Keyboard shortcuts

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