A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/go-kit/kit@v0.13.0/transport/httprp below:

httprp package - github.com/go-kit/kit/transport/httprp - Go Packages

Overview

Package httprp provides an HTTP reverse-proxy transport. HTTP handlers that need to proxy requests to another HTTP service can do so with this package by specifying the URL to forward the request to.

Index Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types type RequestFunc
type RequestFunc func(context.Context, *http.Request) context.Context

RequestFunc may take information from an HTTP request and put it into a request context. BeforeFuncs are executed prior to invoking the endpoint.

type Server
type Server struct {
	// contains filtered or unexported fields
}

Server is a proxying request handler.

func NewServer
func NewServer(
	baseURL *url.URL,
	options ...ServerOption,
) *Server

NewServer constructs a new server that implements http.Server and will proxy requests to the given base URL using its scheme, host, and base path. If the target's path is "/base" and the incoming request was for "/dir", the target request will be for /base/dir.

func (Server) ServeHTTP
func (s Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

type ServerOption
type ServerOption func(*Server)

ServerOption sets an optional parameter for servers.

func ServerBefore
func ServerBefore(before ...RequestFunc) ServerOption

ServerBefore functions are executed on the HTTP request object before the request is decoded.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4