proxy

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForbiddenHandler added in v0.34.0

func ForbiddenHandler() http.Handler

ForbiddenHandler rejects every request with 403.

func ShardNameFrom added in v0.34.0

func ShardNameFrom(ctx context.Context) string

func ShardURLFrom added in v0.34.0

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

func WithClusterResolver added in v0.34.0

func WithClusterResolver(delegate http.Handler, mappings []types.PathMapping, idx index.Index) http.Handler

func WithShardName added in v0.34.0

func WithShardName(parent context.Context, shardName string) context.Context

func WithShardURL added in v0.34.0

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

func WithWorkspaceType added in v0.34.0

func WithWorkspaceType(parent context.Context, wsType logicalcluster.Path) context.Context

func WorkspaceTypeFrom added in v0.34.0

func WorkspaceTypeFrom(ctx context.Context) logicalcluster.Path

Types

type HttpHandler

type HttpHandler struct {
	Mappings       types.HttpHandlerMappings
	DefaultHandler http.Handler
}

func (*HttpHandler) ServeHTTP

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

type ShardNameHolder added in v0.34.0

type ShardNameHolder struct {
	Name string
}

ShardNameHolder is a mutable container for the shard name that can be stored in context before the shard is known, then updated later. This allows outer middleware to access the shard name even when inner handlers create new request objects with WithContext().

func ShardNameHolderFrom added in v0.34.0

func ShardNameHolderFrom(ctx context.Context) *ShardNameHolder

func WithShardNameHolder added in v0.34.0

func WithShardNameHolder(parent context.Context) (context.Context, *ShardNameHolder)

WithShardNameHolder stores a ShardNameHolder in the context. The holder can be updated later when WithShardName is called. If the context already has a holder, it is reused so that nested middlewares all observe the same name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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