apiserver

package
v0.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAPIResourceConfigSource

func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig

DefaultAPIResourceConfigSource returns a default API Resource config source

func IsErrAPIGroupDisabled

func IsErrAPIGroupDisabled(e error) bool

IsErrAPIGroupDisabled returns true if e is an error indicating that an API group is disabled

func NewStorageFactory

func NewStorageFactory(storageConfig storagebackend.Config, defaultMediaType string, serializer runtime.StorageSerializer,
	defaultResourceEncoding *serverstorage.DefaultResourceEncodingConfig, storageEncodingOverrides map[string]schema.GroupVersion, resourceEncodingOverrides []schema.GroupVersionResource,
	defaultAPIResourceConfig *serverstorage.ResourceConfig, resourceConfigOverrides utilflag.ConfigurationMap) (*serverstorage.DefaultStorageFactory, error)

NewStorageFactory builds the DefaultStorageFactory. Merges defaultResourceConfig with the user specified overrides and merges defaultAPIResourceConfig with the corresponding user specified overrides as well.

Types

type CompletedConfig

type CompletedConfig interface {
	NewServer() (*ServiceCatalogAPIServer, error)
}

CompletedConfig is the result of a Config being Complete()-ed. Calling code should call Start() to start a server from its completed config

type Config

type Config interface {
	Complete() CompletedConfig
}

Config is the raw configuration information for a server to fill in. After the config information is entered, calling code should call Complete to prepare to start the server

func NewEtcdConfig

func NewEtcdConfig(
	genCfg *genericapiserver.RecommendedConfig,
	deleteCollWorkers int,
	factory storage.StorageFactory,
) Config

NewEtcdConfig returns a new server config to describe an etcd-backed API server

type ErrAPIGroupDisabled

type ErrAPIGroupDisabled struct {
	Name string
}

ErrAPIGroupDisabled is an error indicating that an API group should be disabled

func (ErrAPIGroupDisabled) Error

func (e ErrAPIGroupDisabled) Error() string

type RESTStorageProvider

type RESTStorageProvider interface {
	// GroupName returns the API group name that the storage manages
	GroupName() string
	// NewRESTStorage returns a new group info representing the storage this provider provides. If
	// the API group should be disabled, a non-nil error will be returned, and
	// IsErrAPIGroupDisabled(e) will return true for it. Otherwise, if the storage couldn't be
	// created, a different non-nil error will be returned
	// second parameter indicates whether the API group should be enabled. A non-nil error will
	// be returned if a new group info couldn't be created
	NewRESTStorage(
		apiResourceConfigSource storage.APIResourceConfigSource,
		restOptionsGetter generic.RESTOptionsGetter,
	) (*genericapiserver.APIGroupInfo, error)
}

RESTStorageProvider is a local interface describing a REST storage factory. It can report the name of the API group and create a new storage interface for it.

type RunnableServer

type RunnableServer interface {
	// Run starts the server, and blocks until the given channel is closed, after which point
	// it returns and the server has stopped
	Run(<-chan struct{}) error
}

RunnableServer is an interface to represent a server that is completely ready to start

type ServiceCatalogAPIServer

type ServiceCatalogAPIServer struct {
	GenericAPIServer *genericapiserver.GenericAPIServer
}

ServiceCatalogAPIServer contains the base GenericAPIServer along with other configured runtime configuration

func (ServiceCatalogAPIServer) PrepareRun

func (s ServiceCatalogAPIServer) PrepareRun() RunnableServer

PrepareRun prepares s to run. The returned value represents the runnable server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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