router

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestDoer

type RequestDoer interface {
	DoRequest(*types.Request) (*types.Response, error)
}

type Router

type Router interface {
	http.Handler
	// While this method signature is the same as ServeHTTP, it is
	// intended to support a different use case altogether.
	DoRequest(http.ResponseWriter, *http.Request)
	Configure(*manifest.Manifest)
}

func NewRouter

func NewRouter(logger logging.Logger, doer RequestDoer) Router

Builds a router from a service manifest. While we could fetch the manfiest from the service, making it a parameter gives some more options about how and when we acquire one.

Jump to

Keyboard shortcuts

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