utils

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFlushWriter added in v0.8.0

func MakeFlushWriter(writer io.Writer) io.Writer

MakeFlushWriter ensures content is flushed immediately after being written

func Proxy added in v0.9.0

func Proxy(request *http.Request, response http.ResponseWriter, url string, client *http.Client) (int, error)

Proxy forwards requests to an upstream provider and proxies the response content and headers back to the caller

func RespondError

func RespondError(response http.ResponseWriter, err error, statusCode int)

RespondError - logs and writes an error response with a desired status code

Types

This section is empty.

Jump to

Keyboard shortcuts

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