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.
Click to show internal directories.
Click to hide internal directories.