lookup

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterNameFrom

func ClusterNameFrom(ctx context.Context) logicalcluster.Name

func ShardNameFrom added in v0.32.0

func ShardNameFrom(ctx context.Context) string

func ShardURLFrom

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

func WithClusterName

func WithClusterName(parent context.Context, cluster logicalcluster.Name) context.Context

func WithClusterResolver

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

func WithShardName added in v0.32.0

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

func WithShardURL

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

func WithWorkspaceType

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

func WorkspaceTypeFrom

func WorkspaceTypeFrom(ctx context.Context) logicalcluster.Path

Types

type ShardNameHolder added in v0.32.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 WithShardNameHolder added in v0.32.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.

Jump to

Keyboard shortcuts

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