http

package
v1.22.5 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRouters = errors.New("http: no server.Router is registered; register one with di.Define(NewRouter, di.Tag(http.RouterTag))")
View Source
var RouterTag = routerTag{}

Functions

func NewHttpCommand

func NewHttpCommand(
	mux server.Mux,
	global Global,
	routers []server.Router,
	command app.BaseCommand,
	addr net.Addr,
	logger pry.Logger,
	opts ...server.Option,
) *httpCommand

func Setup added in v1.11.0

func Setup(mux server.Mux, global Global, routers []server.Router) error

chi keeps the last registration for a pattern and says nothing, so without this check the domain that loses is simply unreachable.

Types

type Global added in v1.11.0

type Global []server.Middleware

func NewGlobal added in v1.13.0

func NewGlobal(layers []server.Middleware) Global

type HttpCommand

type HttpCommand interface {
	app.Command
}

type InProcess added in v1.10.8

type InProcess struct {
	URL    string
	Client *nethttp.Client
	// contains filtered or unexported fields
}

func Serve added in v1.10.8

func Serve(mux server.Mux, global Global, routers []server.Router, wrap ...func(nethttp.Handler) nethttp.Handler) (*InProcess, error)

Setup is what the daemon calls too, so the routes and the middleware under test are the ones that ship. wrap goes around the whole server, outermost last.

func (*InProcess) Close added in v1.10.8

func (s *InProcess) Close()

Jump to

Keyboard shortcuts

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