dispatcher

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPathBasedDispatcher

func NewPathBasedDispatcher(
	cfg *config.Configuration,
	log *logging.Logger,
	prx *proxy.ProxyHandler,
) (*pathBasedDispatcher, error)

Types

type Dispatcher

type Dispatcher interface {
	http.Handler
	RegisterApplication(string, config.Application, *config.Configuration) error
	Initialize() error
	AddBehaviour(...DispatcherBehaviour)
}

type DispatcherOption

type DispatcherOption func(dispatcherSetters) error

func ProxyHandler

func ProxyHandler(prx *proxy.ProxyHandler) DispatcherOption

type PathClosure

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

func (*PathClosure) Handle

func (p *PathClosure) Handle(rw http.ResponseWriter, req *http.Request, params httprouter.Params)

type PatternClosure

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

func (*PatternClosure) Handle

func (p *PatternClosure) Handle(rw http.ResponseWriter, req *http.Request, params httprouter.Params)

type RoutingBehaviour

type RoutingBehaviour interface {
	AddRoutes(*httprouter.Router) error
}

Jump to

Keyboard shortcuts

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