proxy

package
v1.1.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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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
}

HttpProxy is the main proxy server

func New

func New(logger logr.Logger, client *http.Client) *HttpProxy

New creates a new instance of HttpProxy

func (*HttpProxy) RegisterOrUpdate

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

RegisterOrUpdate adds a target to the proxy or updates it if it already exists

func (*HttpProxy) ServeHTTP

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

func (*HttpProxy) Unregister

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

Unregister removes a service from the proxy

type OAUTH2Proxy

type OAUTH2Proxy struct {
	Host        string
	Service     string
	RedirectURI string
	Paths       []string
	Port        int32
	Object      client.ObjectKey
}

OAUTH2Proxy defines the serivce which is proxied

Jump to

Keyboard shortcuts

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