apiserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAPIResourceConfigSource

func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig

DefaultAPIResourceConfigSource returns which groupVersion enabled and its resources enabled/disabled.

Types

type APIServer

type APIServer struct {
	GenericAPIServer *genericapiserver.GenericAPIServer
}

APIServer contains state for a onex-apiserver.

func (*APIServer) InstallAPIs

func (s *APIServer) InstallAPIs(
	apiResourceConfigSource serverstorage.APIResourceConfigSource,
	restOptionsGetter generic.RESTOptionsGetter,
	restStorageProviders ...storage.RESTStorageProvider,
) error

APIServer will install the APIs for the restStorageProviders if they are enabled.

func (*APIServer) InstallLegacyAPI

func (s *APIServer) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic.RESTOptionsGetter) error

InstallLegacyAPI will install the legacy APIs for the restStorageProviders if they are enabled.

func (*APIServer) PrepareRun

func (s *APIServer) PrepareRun() preparedAPIServer

PrepareRun prepares the apiserver to run, by calling the generic PrepareRun.

type CompletedConfig

type CompletedConfig struct {
	// contains filtered or unexported fields
}

CompletedConfig embeds a private pointer that cannot be instantiated outside of this package.

func (CompletedConfig) New

func (c CompletedConfig) New() (*APIServer, error)

New returns a new instance of APIServer from the given config. Certain config fields will be set to a default value if unset.

type Config

type Config struct {
	GenericConfig *genericapiserver.RecommendedConfig
	ExtraConfig   ExtraConfig
}

Config defines configuration for the onex-apiserver.

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 {
	// Place you custom config here.
	APIResourceConfigSource serverstorage.APIResourceConfigSource
	StorageFactory          serverstorage.StorageFactory
	EventTTL                time.Duration
	EnableLogsSupport       bool
	VersionedInformers      informers.SharedInformerFactory
	SharedInformerFactory   informers.SharedInformerFactory
}

ExtraConfig defines extra configuration for the onex-apiserver.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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