switchhandler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SwitchHandler

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

SwitchHandler is a middleware used to switch handler.

func New

func New() *SwitchHandler

New creates a new handler.

func (*SwitchHandler) Delete

func (s *SwitchHandler) Delete(serviceName string)

func (*SwitchHandler) Load

func (s *SwitchHandler) Load(serviceName string) (http.Handler, bool)

func (*SwitchHandler) Name

func (*SwitchHandler) Range

func (s *SwitchHandler) Range(function func(key, value interface{}) bool)

func (*SwitchHandler) ServeHTTP

func (s *SwitchHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*SwitchHandler) Store

func (s *SwitchHandler) Store(name string, handler http.Handler)

Jump to

Keyboard shortcuts

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