server

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithShardScope

func WithShardScope(handler http.Handler) http.Handler

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 default "system:cache:server" name is assigned.

For example:

/shards/*/clusters/*/apis/apis.kcp.dev/v1alpha1/apiexports

/shards/amber/clusters/*/apis/apis.kcp.dev/v1alpha1/apiexports

/shards/sapphire/clusters/system:sapphire/apis/apis.kcp.dev/v1alpha1/apiexports

/shards/amber/clusters/system:amber/apis/apis.kcp.dev/v1alpha1/apiexports

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) (*Config, error)

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 apiextensionsclient.ClusterInterface

	ApiExtensionsSharedInformerFactory apiextensionsexternalversions.SharedInformerFactory
}

type Server

type Server struct {
	CompletedConfig
}

func NewServer

func NewServer(c CompletedConfig) (*Server, error)

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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