http

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingAuthentication = errors.New("missing authorization")

ErrMissingAuthentication returned when no basic or Authorization header is set.

Functions

This section is empty.

Types

type HTTPProxyError

type HTTPProxyError interface {
	error
	MarshalJSON() ([]byte, error)
	StatusCode() int
}

func NewHTTPProxyError

func NewHTTPProxyError(statusCode int, err error) HTTPProxyError

type Proxy

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

Proxy represents HTTP Proxy.

func NewProxy

func NewProxy(config mgate.Config, handler session.Handler, logger *slog.Logger) (Proxy, error)

func (Proxy) Listen

func (p Proxy) Listen(ctx context.Context) error

func (Proxy) ServeHTTP

func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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