middleware

package
v0.0.0-...-7af979f Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeHTTP

func ServeHTTP(serve ServeWithContext) http.HandlerFunc

ServeHTTP create and returns a http.HandlerFunc, creates a context.Context and invokes the given function

Types

type HTTPClientFacade

type HTTPClientFacade interface {
	Get(ctx context.Context, url string) (*http.Response, error)
}

HTTPClientFacade encapsulates HTTP methods

func NewHTTPClient

func NewHTTPClient() HTTPClientFacade

NewHTTPClient creates a new HTTPClientFacade instance

type ServeWithContext

type ServeWithContext func(context.Context, http.ResponseWriter, *http.Request)

ServeWithContext abstracts a context.Context aware function

Jump to

Keyboard shortcuts

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