mmux

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MutableRouter

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

MutableRouter wraps the mux router, and allows the router to be atomically changed.

func NewMutableRouter

func NewMutableRouter() *MutableRouter

NewMutableRouter creates new mux with no handlers

func NewMutableRouterFromRouter

func NewMutableRouterFromRouter(router *mux.Router) *MutableRouter

NewMutableRouterFromRouter creates new mux from immutable parent

func (*MutableRouter) ServeHTTP

func (mr *MutableRouter) ServeHTTP(responseWriter http.ResponseWriter, request *http.Request)

ServeHTTP implements the http.Handler interface

func (*MutableRouter) UpdateRouter

func (mr *MutableRouter) UpdateRouter(newHandler *mux.Router)

UpdateRouter replaces the underlying mux with new one atomically

Jump to

Keyboard shortcuts

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