router

package
v0.0.0-...-cb92cc7 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithErrorWriter

func WithErrorWriter(writer http.ErrorWriter) internal.OptionSetter[MuxRouter]

func WithPostInterceptors

func WithPostInterceptors(handlers ...interceptor.PostHandler) internal.OptionSetter[MuxRouter]

func WithPreInterceptors

func WithPreInterceptors(handlers ...interceptor.PreHandler) internal.OptionSetter[MuxRouter]

Types

type MuxRouter

type MuxRouter struct {
	interceptor.Interceptors
	// contains filtered or unexported fields
}

func (*MuxRouter) Apply

func (t *MuxRouter) Apply(nodes []discovery.Node) (err error)

func (*MuxRouter) Close

func (t *MuxRouter) Close() error

func (*MuxRouter) Context

func (t *MuxRouter) Context() context.Context

func (*MuxRouter) Endpoints

func (t *MuxRouter) Endpoints() map[string]http.Endpoint

func (*MuxRouter) Register

func (t *MuxRouter) Register(path string) error

func (*MuxRouter) ServeHTTP

func (t *MuxRouter) ServeHTTP(writer std.ResponseWriter, request *std.Request)

type Router

type Router interface {
	http.Handler
	Register(path string) error
	Apply(nodes []discovery.Node) error
}

func New

Jump to

Keyboard shortcuts

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