upstreamobserver

package
v0.0.0-...-90516fd Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package upstreamobserver exposes handler-local upstream state on Caddy's private admin API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	reverseproxy.Handler
	HostID   string `json:"host_id"`
	Revision string `json:"revision"`
	// contains filtered or unexported fields
}

Handler owns the stock handler in place: its upstreams must never be copied. Embedding preserves the stock JSON fields at the top level.

func (*Handler) CaddyModule

func (*Handler) CaddyModule() caddy.ModuleInfo

func (*Handler) Cleanup

func (h *Handler) Cleanup() error

Cleanup unregisters only this instance and releases stock resources once, including partial failures.

func (*Handler) Provision

func (h *Handler) Provision(ctx caddy.Context) error

Provision registers fully initialized stock upstream pointers with an instance-specific cleanup token.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

Jump to

Keyboard shortcuts

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