stdadapter

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router adapts http.ServeMux to api.Router.

func New

func New(mux *http.ServeMux, registry *api.Registry) *Router

New creates a net/http adapter.

func (*Router) Handle

func (router *Router) Handle(method string, path string, handler http.HandlerFunc, opts ...api.RouteOption)

Handle registers an HTTP handler and stores its metadata.

func (*Router) ServeHTTP

func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP delegates to the wrapped ServeMux.

Jump to

Keyboard shortcuts

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