registered

package
v1.3.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddThirdPartyAPIGroupVersions

func AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversioned.GroupVersion

AddThirdPartyAPIGroupVersions sets the list of third party versions, registers them in the API machinery and enables them. Skips GroupVersions that are already registered. Returns the list of GroupVersions that were skipped.

func AllPreferredGroupVersions

func AllPreferredGroupVersions() string

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

func EnableVersions

func EnableVersions(versions ...unversioned.GroupVersion) error

EnableVersions adds the versions for the given group to the list of enabled versions. Note that the caller should call RegisterGroup before calling this method. The caller of this function is responsible to add the versions to scheme and RESTMapper.

func EnabledVersions

func EnabledVersions() []unversioned.GroupVersion

EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups are priority order from best to worst

func EnabledVersionsForGroup

func EnabledVersionsForGroup(group string) []unversioned.GroupVersion

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

func Group

func Group(group string) (*apimachinery.GroupMeta, error)

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

func GroupOrDie

func 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 IsAllowedVersion

func IsAllowedVersion(v unversioned.GroupVersion) bool

IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS environment variable. If the environment variable is empty, then it always returns true.

func IsEnabledVersion

func IsEnabledVersion(v unversioned.GroupVersion) bool

IsEnabledVersion returns if a version is enabled.

func IsRegistered

func IsRegistered(group string) bool

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

func IsRegisteredVersion

func IsRegisteredVersion(v unversioned.GroupVersion) bool

IsRegisteredVersion returns if a version is registered.

func IsThirdPartyAPIGroupVersion

func IsThirdPartyAPIGroupVersion(gv unversioned.GroupVersion) bool

IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version.

func RESTMapper

func RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper

RESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order:

  1. if KUBE_API_VERSIONS is specified, then KUBE_API_VERSIONS in order, OR
  2. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version, all other groups alphabetical.

func RegisterGroup

func RegisterGroup(groupMeta apimachinery.GroupMeta) error

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

func RegisterVersions

func RegisterVersions(availableVersions []unversioned.GroupVersion)

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

func ValidateEnvRequestedVersions

func ValidateEnvRequestedVersions() []unversioned.GroupVersion

ValidateEnvRequestedVersions returns a list of versions that are requested in the KUBE_API_VERSIONS environment variable, but not enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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