router

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder added in v0.17.0

type Builder interface {
	Build() Router
}

Builder is used to type-safely separate router into two distinct stages: initialization (e.g. registering all the endpoints) and compilation (building the actual router). Builder itself represents the first stage.

type Router

type Router interface {
	OnRequest(request *http.Request) *http.Response
	OnError(request *http.Request, err error) *http.Response
}

Router is the second stage of a router, usually produced via Builder.Build. It is normally used internally in runtime by HTTP core.

Directories

Path Synopsis
uri

Jump to

Keyboard shortcuts

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