sharedmux

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Admin is the schelling point for those who want to provide admin
	// actions and those who want to install the admin portal in some port.
	Admin = NewAdminMux()
)

Functions

This section is empty.

Types

type ConcurrentMux

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

ConcurrentMux is safe to call HandleFunc on even after it's started serving requests.

func NewAdminMux

func NewAdminMux() *ConcurrentMux

func NewConcurrentMux

func NewConcurrentMux(mux *http.ServeMux) *ConcurrentMux

NewConcurrentMux constructs a mux.

func (*ConcurrentMux) Handle

func (c *ConcurrentMux) Handle(pattern string, handler http.Handler)

Handle installs the given handler.

func (*ConcurrentMux) HandleFunc

func (c *ConcurrentMux) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

HandleFunc installs the given handler function.

func (*ConcurrentMux) ServeHTTP

func (c *ConcurrentMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves according to the added handlers.

Jump to

Keyboard shortcuts

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