proxy

package
v0.6.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(o *proxyoptions.Options, index index.Index) (http.Handler, error)

func ShardURLFrom

func ShardURLFrom(ctx context.Context) *url.URL

func WithProxyAuthHeaders

func WithProxyAuthHeaders(delegate http.HandlerFunc, UserHeader, GroupHeader string) http.HandlerFunc

WithProxyAuthHeaders does client cert termination by extracting the user and groups and passing them through access headers to the shard.

func WithShardURL

func WithShardURL(parent context.Context, shardURL *url.URL) context.Context

Types

type PathMapping

type PathMapping struct {
	Path            string `json:"path"`
	Backend         string `json:"backend"`
	BackendServerCA string `json:"backend_server_ca"`
	ProxyClientCert string `json:"proxy_client_cert"`
	ProxyClientKey  string `json:"proxy_client_key"`
	UserHeader      string `json:"user_header,omitempty"`
	GroupHeader     string `json:"group_header,omitempty"`
}

PathMapping describes how to route traffic from a path to a backend server. Each Path is registered with the DefaultServeMux with a handler that delegates to the specified backend.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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