router

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 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 Router

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

Router is a general interface for any router compatible with indigo OnRequest called every time headers are parsed and ready to be processed OnError called once, and if it called, it means that connection will be closed anyway. So you can process the error, send some response, and when you are ready, just notify core that he can safely close the connection (even if it's already closed from client side).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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