Documentation ¶
Index ¶
- func NewHandler(ctx context.Context, o *proxyoptions.Options, index index.Index) (http.Handler, error)
- func ShardURLFrom(ctx context.Context) *url.URL
- func WithProxyAuthHeaders(delegate http.Handler, userHeader, groupHeader string, ...) http.HandlerFunc
- func WithShardURL(parent context.Context, shardURL *url.URL) context.Context
- type CompletedConfig
- type Config
- type ExtraConfig
- type PathMapping
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func WithProxyAuthHeaders ¶
func WithProxyAuthHeaders(delegate http.Handler, userHeader, groupHeader string, extraHeaderPrefix string) http.HandlerFunc
WithProxyAuthHeaders does client cert termination by extracting the user and groups and passing them through access headers to the shard.
Types ¶
type CompletedConfig ¶ added in v0.9.0
type CompletedConfig struct {
// contains filtered or unexported fields
}
type Config ¶ added in v0.9.0
type Config struct { Options *proxyoptions.Options ExtraConfig }
func NewConfig ¶ added in v0.9.0
func NewConfig(opts *proxyoptions.Options) (*Config, error)
NewConfig returns a new Config for the given options
func (*Config) Complete ¶ added in v0.9.0
func (c *Config) Complete() (CompletedConfig, error)
Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
type ExtraConfig ¶ added in v0.9.0
type ExtraConfig struct { // resolveIdenties is to be called on server start until it succeeds. It injects the kcp // resource identities into the rest.Config used by the client. Only after it succeeds, // the clients can wildcard-list/watch most kcp resources. ResolveIdentities func(ctx context.Context) error RootShardConfig *rest.Config ShardsConfig *rest.Config AuthenticationInfo genericapiserver.AuthenticationInfo ServingInfo *genericapiserver.SecureServingInfo AdditionalAuthEnabled bool }
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"` ExtraHeaderPrefix string `json:"extra_header_prefix"` }
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.
type Server ¶ added in v0.9.0
type Server struct { CompletedConfig Handler http.Handler IndexController *index.Controller }
Click to show internal directories.
Click to hide internal directories.