proxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBodyLimit int64 = 10000000
)

Variables

View Source
var DefaultOptions = Options{
	Logger:        logr.Discard(),
	Client:        &http.Client{},
	BodySizeLimit: DefaultBodyLimit,
}
View Source
var (
	ErrServiceNotRegistered = errors.New("service is not registered")
)

Functions

This section is empty.

Types

type HttpProxy

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

func New

func New(opts Options) *HttpProxy

func (*HttpProxy) Close

func (h *HttpProxy) Close()

func (*HttpProxy) RegisterOrUpdate

func (h *HttpProxy) RegisterOrUpdate(dst RequestClone) error

func (*HttpProxy) ServeHTTP

func (h *HttpProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HttpProxy) Unregister

func (h *HttpProxy) Unregister(obj client.ObjectKey) error

type Options

type Options struct {
	Logger        logr.Logger
	Client        *http.Client
	BodySizeLimit int64
}

type RequestClone

type RequestClone struct {
	Host    string
	Service string
	Port    int32
	Object  client.ObjectKey
}

Jump to

Keyboard shortcuts

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