proxy

package
v0.0.0-...-73fcc39 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy must be created using [NewProxy]

func NewServer

func NewServer(config ProxyConfig) *Proxy

func (*Proxy) ReplaceServers

func (p *Proxy) ReplaceServers(provider string, newConfigs []UpstreamConfig)

func (*Proxy) ServeHTTP

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

ServeHTTP implements the http.Handler interface. This method is the entrypoint for all requests into the proxy.

func (*Proxy) ServerReflectionInfo

ServerReflectionInfo implements grpc_reflection_v1.ServerReflectionServer.

type ProxyConfig

type ProxyConfig struct {
	// DisableReflection will not expose the reflection service
	DisableReflection bool `mapstructure:"disableReflection"`

	Logger *zap.Logger
}

type UpstreamConfig

type UpstreamConfig struct {
	Address            string `mapstructure:"address"`
	Plaintext          bool   `mapstructure:"plaintext"`
	InsecureSkipVerify bool   `mapstructure:"insecureSkipVerify"`
}

Jump to

Keyboard shortcuts

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