safewrapper

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafeWrapper

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

SafeWrapper is a http.Handler which wraps another http.Handler which could be later replaced by another one.

func New

func New(handler http.Handler) *SafeWrapper

New returns a *SafeWrapper initialized with a handler

func (*SafeWrapper) ServeHTTP

func (h *SafeWrapper) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler

func (*SafeWrapper) SwapHandler

func (h *SafeWrapper) SwapHandler(handler http.Handler)

SwapHandler swaps the handler

Jump to

Keyboard shortcuts

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