api

package
v0.0.0-...-2262de7 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: NCSA Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultInterruptHandler

func DefaultInterruptHandler(fn func(), close chan struct{})

The defaultInterruptHandler simply calls the specified function when receiving a SIGINT.

Types

type ApplicationLoader

type ApplicationLoader interface {
	// AddApplicationHandler assigns an http.Handler to the specified URI.
	// Whenever a URI matches the pattern passed here, `handler` will be called
	// instead.
	//
	// Not all types implementing ApplicationLoader handle URIs equivalently.
	AddApplicationHandler(uri string, handler http.Handler) error

	// Handler returns the http.Handler assigned to the specified URI. This is
	// usually called by multiAppProxy.
	Handler(uri url.URL) (http.Handler, bool)

	// DefaultHandler returns an http.Handler to use whenever no handler is
	// assigned for a given URI pattern via AddApplicationHandler.
	DefaultHandler() http.Handler

	// SetDefaultHandler configures the loader to use the specified handler for
	// requests that otherwise do not map to an existing route.
	SetDefaultHandler(http.Handler)
}

ApplicationLoader definition. Loaders providing multi-application support must implement this API.

Jump to

Keyboard shortcuts

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