proxy

package
v0.0.0-...-7455e70 Latest Latest
Warning

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

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

Documentation

Overview

Copyright © 2023 The Spray Proxy Contributors

SPDX-License-Identifier: Apache-2.0

SPDX-License-Identifier: Apache-2.0

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SprayProxy

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

func NewSprayProxy

func NewSprayProxy(insecureTLS, insecureWebhook, enableDynamicBackends bool, logger *zap.Logger, backends map[string]string) (*SprayProxy, error)

func (*SprayProxy) Backends

func (p *SprayProxy) Backends() []string

func (*SprayProxy) GetBackends

func (p *SprayProxy) GetBackends(c *gin.Context)

GetBackends gives the list of backend servers available to be proxied

func (*SprayProxy) HandleProxy

func (p *SprayProxy) HandleProxy(c *gin.Context)

func (*SprayProxy) HandleProxyEndpoint

func (p *SprayProxy) HandleProxyEndpoint(c *gin.Context)

func (*SprayProxy) InsecureSkipTLSVerify

func (p *SprayProxy) InsecureSkipTLSVerify() bool

InsecureSkipTLSVerify indicates if the proxy is skipping TLS verification. This setting is insecure and should not be used in production.

func (*SprayProxy) RegisterBackend

func (p *SprayProxy) RegisterBackend(c *gin.Context)

RegisterBackend registers the backend server to be proxied

func (*SprayProxy) UnregisterBackend

func (p *SprayProxy) UnregisterBackend(c *gin.Context)

UnregisterBackend removes the backend server from the list of backend so that it should not be proxied anymore

type SprayWriter

type SprayWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func NewSprayWriter

func NewSprayWriter() *SprayWriter

func (*SprayWriter) Header

func (w *SprayWriter) Header() http.Header

func (*SprayWriter) Write

func (w *SprayWriter) Write(body []byte) (int, error)

func (*SprayWriter) WriteHeader

func (w *SprayWriter) WriteHeader(statusCode int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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