proxy

package
v0.0.0-...-2b6d021 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIRequestForwarder

func NewAPIRequestForwarder(
	resp ResponseHandler,
	onError ErrorHandler) (*httputil.ReverseProxy, error)

NewAPIRequestForwarder returns a ReverseProxy that will ensure a request is handled by the downstream API service BEFORE any subsequent handling we want to do is done

func NewErrHandler

func NewErrHandler() func(w http.ResponseWriter, r *http.Request, err error)

NewErrHandler returns a handler for processing downstream errors of the filehandler service

Types

type ErrorHandler

type ErrorHandler func(http.ResponseWriter, *http.Request, error)

ErrorHandler defines a type of pluggable error handlers for responding to downstream requests that have failed

type ResponseHandler

type ResponseHandler func(*http.Response) error

ResponseHandler is the pluggable func format for response handlers from the downstream service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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