Documentation
¶
Index ¶
- func ClusterNameFrom(ctx context.Context) logicalcluster.Name
- func ShardNameFrom(ctx context.Context) string
- func ShardURLFrom(ctx context.Context) *url.URL
- func WithClusterName(parent context.Context, cluster logicalcluster.Name) context.Context
- func WithClusterResolver(delegate http.Handler, mappings []types.PathMapping, index proxyindex.Index) http.Handler
- func WithShardName(parent context.Context, shardName string) context.Context
- func WithShardURL(parent context.Context, shardURL *url.URL) context.Context
- func WithWorkspaceType(parent context.Context, wsType logicalcluster.Path) context.Context
- func WorkspaceTypeFrom(ctx context.Context) logicalcluster.Path
- type ShardNameHolder
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 WithClusterName ¶
func WithClusterResolver ¶
func WithClusterResolver(delegate http.Handler, mappings []types.PathMapping, index proxyindex.Index) http.Handler
func WithShardName ¶ added in v0.32.0
func WithWorkspaceType ¶
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.
Click to show internal directories.
Click to hide internal directories.