rest

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetThirdPartyGroupName

func GetThirdPartyGroupName(path string) string

func MakeThirdPartyPath

func MakeThirdPartyPath(group string) string

Types

type RESTStorageProvider

type RESTStorageProvider struct {
	ResourceInterface ResourceInterface
}

func (RESTStorageProvider) GroupName

func (p RESTStorageProvider) GroupName() string

func (RESTStorageProvider) NewRESTStorage

func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool)

func (RESTStorageProvider) PostStartHook

type ResourceInterface

type ResourceInterface interface {
	// Remove a third party resource based on the RESTful path for that resource, the path is <api-group-path>/<resource-plural-name>
	RemoveThirdPartyResource(path string) error
	// Install a third party resource described by 'rsrc'
	InstallThirdPartyResource(rsrc *extensions.ThirdPartyResource) error
	// Is a particular third party resource currently installed?
	HasThirdPartyResource(rsrc *extensions.ThirdPartyResource) (bool, error)
	// List all currently installed third party resources, the returned
	// names are of the form <api-group-path>/<resource-plural-name>
	ListThirdPartyResources() []string
}

ResourceInterface is the interface for the parts of the master that know how to add/remove third party resources. Extracted into an interface for injection for testing.

type ThirdPartyController

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

ThirdPartyController is a control loop that knows how to synchronize ThirdPartyResource objects with RESTful resources which are present in the API server.

func (*ThirdPartyController) SyncOneResource

func (t *ThirdPartyController) SyncOneResource(rsrc *extensions.ThirdPartyResource) error

SyncOneResource synchronizes a single resource with RESTful resources on the master

func (*ThirdPartyController) SyncResources

func (t *ThirdPartyController) SyncResources() error

Synchronize all resources with RESTful resources on the master

Jump to

Keyboard shortcuts

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