router

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 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 OnStarter

type OnStarter interface {
	OnStart()
}

OnStarter is an interface that provides OnStart() method that will be called just once, when server is initializing.

type Router

type Router interface {
	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