registered

package
v1.11.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package to keep track of API Versions that can be registered and are enabled in a Scheme.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRegistrationManager

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

APIRegistrationManager provides the concept of what API groups are enabled.

TODO: currently, it also provides a "registered" concept. But it's wrong to have both concepts in the same object. Therefore the "announced" package is going to take over the registered concept. After all the install packages are switched to using the announce package instead of this package, then we can combine the registered/enabled concepts in this object. Simplifying this isn't easy right now because there are so many callers of this package.

func NewAPIRegistrationManager

func NewAPIRegistrationManager() *APIRegistrationManager

NewAPIRegistrationManager constructs a new manager.

func (*APIRegistrationManager) AllPreferredGroupVersions

func (m *APIRegistrationManager) AllPreferredGroupVersions() string

AllPreferredGroupVersions returns the preferred versions of all registered groups in the form of "group1/version1,group2/version2,..."

func (*APIRegistrationManager) Group

Group returns the metadata of a group if the group is registered, otherwise an error is returned.

func (*APIRegistrationManager) GroupOrDie

func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta

TODO: This is an expedient function, because we don't check if a Group is supported throughout the code base. We will abandon this function and checking the error returned by the Group() function.

func (*APIRegistrationManager) IsRegistered

func (m *APIRegistrationManager) IsRegistered(group string) bool

IsRegistered takes a string and determines if it's one of the registered groups

func (*APIRegistrationManager) IsRegisteredVersion

func (m *APIRegistrationManager) IsRegisteredVersion(v schema.GroupVersion) bool

IsRegisteredVersion returns if a version is registered.

func (*APIRegistrationManager) RegisterGroup

func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error

RegisterGroup adds the given group to the list of registered groups.

func (*APIRegistrationManager) RegisterVersions

func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.GroupVersion)

RegisterVersions adds the given group versions to the list of registered group versions.

func (*APIRegistrationManager) RegisteredGroupVersions

func (m *APIRegistrationManager) RegisteredGroupVersions() []schema.GroupVersion

RegisteredGroupVersions returns all registered group versions. Groups are randomly ordered, but versions within groups are priority order from best to worst

func (*APIRegistrationManager) RegisteredVersionsForGroup

func (m *APIRegistrationManager) RegisteredVersionsForGroup(group string) []schema.GroupVersion

RegisteredVersionsForGroup returns all enabled versions for a group in order of best to worst

Jump to

Keyboard shortcuts

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