Documentation ¶
Index ¶
- func ConfigRegister(hookContext genericapiserver.PostStartHookContext) error
- type CompletedConfig
- type Config
- type KarporServer
- func (s *KarporServer) Error() error
- func (s *KarporServer) InstallAPIs(apiResourceConfigSource serverstorage.APIResourceConfigSource, ...) error
- func (s *KarporServer) InstallCoreServer(c *CompletedConfig) *KarporServer
- func (s *KarporServer) InstallKubernetesServer(c *CompletedConfig) *KarporServer
- func (s *KarporServer) InstallLegacyAPI(restOptionsGetter generic.RESTOptionsGetter) error
- func (s *KarporServer) InstallPublicFileServer() *KarporServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigRegister ¶
func ConfigRegister(hookContext genericapiserver.PostStartHookContext) error
ConfigRegister is a function that registers the server configuration.
Types ¶
type CompletedConfig ¶
type CompletedConfig struct { GenericConfig genericapiserver.CompletedConfig ExtraConfig *registry.ExtraConfig }
func (*CompletedConfig) New ¶
func (c *CompletedConfig) New() (*KarporServer, error)
New returns a new instance of APIServer from the given config.
type Config ¶
type Config struct { GenericConfig *genericapiserver.RecommendedConfig ExtraConfig *registry.ExtraConfig }
Config defines the config for the apiserver
func (*Config) Complete ¶
func (cfg *Config) Complete() *CompletedConfig
Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
type KarporServer ¶
type KarporServer struct { *genericapiserver.GenericAPIServer // contains filtered or unexported fields }
KarporServer is the carrier of the main process of Karpor.
func (*KarporServer) Error ¶
func (s *KarporServer) Error() error
Error returns any errors that have occurred during the setup of the KarporServer. It is designed to be called after the configuration steps to ensure any issues are captured and reported.
func (*KarporServer) InstallAPIs ¶
func (s *KarporServer) InstallAPIs( apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter, restStorageProviders ...registry.RESTStorageProvider, ) error
func (*KarporServer) InstallCoreServer ¶
func (s *KarporServer) InstallCoreServer(c *CompletedConfig) *KarporServer
InstallCoreServer installs the core server (handling non kubernetes-like API, regular HTTP requests) onto the KarporServer. This is typically the server that serves the user interface assets.
func (*KarporServer) InstallKubernetesServer ¶
func (s *KarporServer) InstallKubernetesServer(c *CompletedConfig) *KarporServer
InstallKubernetesServer installs various resource-specific REST storage implementations on the KarporServer. This method is part of the bootstrapping process of setting up the API server.
func (*KarporServer) InstallLegacyAPI ¶
func (s *KarporServer) InstallLegacyAPI(restOptionsGetter generic.RESTOptionsGetter) error
InstallLegacyAPI installs legacy API groups and resources into the server.
func (*KarporServer) InstallPublicFileServer ¶ added in v0.3.14
func (s *KarporServer) InstallPublicFileServer() *KarporServer
InstallPublicFileServer sets up the server to serve public files. It is used to serve files like stylesheets, scripts, and images for the karpor dashboard.