Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithServiceScope ¶ added in v0.9.0
WithServiceScope an HTTP filter that trims "/services/cache" prefix from the URL.
for example: /services/cache/shards/amber/clusters/*/apis/apis.kcp.io/v1alpha1/apiexports is truncated to /shards/amber/clusters/*/apis/apis.kcp.io/v1alpha1/apiexports.
func WithShardScope ¶
WithShardScope reads a shard name from the URL path and puts it into the context. It also trims "/shards/" prefix from the URL. If the path doesn't contain the shard name then a 404 error is returned.
For example:
/shards/*/clusters/*/apis/apis.kcp.io/v1alpha1/apiexports
/shards/amber/clusters/*/apis/apis.kcp.io/v1alpha1/apiexports
/shards/sapphire/clusters/system:sapphire/apis/apis.kcp.io/v1alpha1/apiexports
/shards/amber/clusters/system:amber/apis/apis.kcp.io/v1alpha1/apiexports
Note: not all paths require to have a valid shard name, as of today the following paths pass through: "/livez", "/readyz", "/healthz".
Types ¶
type CompletedConfig ¶
type CompletedConfig struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { Options *cacheserveroptions.CompletedOptions ApiExtensions *apiextensionsapiserver.Config EmbeddedEtcd *embeddedetcd.Config ExtraConfig }
func NewConfig ¶
func NewConfig(opts *cacheserveroptions.CompletedOptions, optionalLocalShardRestConfig *rest.Config) (*Config, error)
NewConfig returns a new Config for the given options and optional rest.Config that point to the local server. Pass it only when you combine this server with a different one.
func (*Config) Complete ¶
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 ¶
type ExtraConfig struct { ApiExtensionsClusterClient kcpapiextensionsclientset.ClusterInterface }
type Server ¶
type Server struct { CompletedConfig // contains filtered or unexported fields }
func NewServer ¶
func NewServer(c CompletedConfig) (*Server, error)