exclusivehttp

package
v1.140.1 Latest Latest
Warning

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

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

Documentation

Overview

Package exclusivehttp serves the owner's setting that a managed script runs one at a time (#1986): no run starts while another run of it is pending or running, whatever started it.

It is mounted by scripthttp, which resolves the caller and the script, refuses everybody but the script's owner and an administrator, and lands the change through the edit funnel every portal edit crosses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	// Edit applies mutate to the script in the path for a caller who owns
	// it, through the edit funnel, writing any refusal itself; it reports the
	// script as saved.
	Edit func(w http.ResponseWriter, r *http.Request, mutate func(*script.Script)) (*script.Script, bool)
}

Deps carries the edit the route makes.

type Handler

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

Handler serves the route.

func New

func New(deps Deps) *Handler

New builds the handler.

func (*Handler) Register

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

Register mounts the route, wrapped in the portal authentication middleware.

Jump to

Keyboard shortcuts

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