package discovery
import "k8s.io/kubernetes/pkg/client/typed/discovery"
Index ¶
- type DiscoveryClient
- func NewDiscoveryClient(c *restclient.RESTClient) *DiscoveryClient
- func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error)
- func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient
- func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error)
- func (d *DiscoveryClient) ServerResources() (map[string]*unversioned.APIResourceList, error)
- func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *unversioned.APIResourceList, err error)
- func (d *DiscoveryClient) ServerVersion() (*version.Info, error)
- func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error)
- type DiscoveryInterface
- type ServerGroupsInterface
- type ServerResourcesInterface
- type ServerVersionInterface
- type SwaggerSchemaInterface
Types ¶
type DiscoveryClient ¶
type DiscoveryClient struct { *restclient.RESTClient }
DiscoveryClient implements the functions that discover server-supported API groups, versions and resources.
func NewDiscoveryClient ¶
func NewDiscoveryClient(c *restclient.RESTClient) *DiscoveryClient
New creates a new DiscoveryClient for the given RESTClient.
func NewDiscoveryClientForConfig ¶
func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error)
NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client can be used to discover supported resources in the API server.
func NewDiscoveryClientForConfigOrDie ¶
func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient
NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If there is an error, it panics.
func (*DiscoveryClient) ServerGroups ¶
func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error)
ServerGroups returns the supported groups, with information like supported versions and the preferred version.
func (*DiscoveryClient) ServerResources ¶
func (d *DiscoveryClient) ServerResources() (map[string]*unversioned.APIResourceList, error)
ServerResources returns the supported resources for all groups and versions.
func (*DiscoveryClient) ServerResourcesForGroupVersion ¶
func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *unversioned.APIResourceList, err error)
ServerResourcesForGroupVersion returns the supported resources for a group and version.
func (*DiscoveryClient) ServerVersion ¶
func (d *DiscoveryClient) ServerVersion() (*version.Info, error)
ServerVersion retrieves and parses the server's version (git version).
func (*DiscoveryClient) SwaggerSchema ¶
func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error)
SwaggerSchema retrieves and parses the swagger API schema the server supports.
type DiscoveryInterface ¶
type DiscoveryInterface interface { ServerGroupsInterface ServerResourcesInterface ServerVersionInterface SwaggerSchemaInterface }
DiscoveryInterface holds the methods that discover server-supported API groups, versions and resources.
type ServerGroupsInterface ¶
type ServerGroupsInterface interface { // ServerGroups returns the supported groups, with information like supported versions and the // preferred version. ServerGroups() (*unversioned.APIGroupList, error) }
ServerGroupsInterface has methods for obtaining supported groups on the API server
type ServerResourcesInterface ¶
type ServerResourcesInterface interface { // ServerResourcesForGroupVersion returns the supported resources for a group and version. ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) // ServerResources returns the supported resources for all groups and versions. ServerResources() (map[string]*unversioned.APIResourceList, error) }
ServerResourcesInterface has methods for obtaining supported resources on the API server
type ServerVersionInterface ¶
type ServerVersionInterface interface { // ServerVersion retrieves and parses the server's version (git version). ServerVersion() (*version.Info, error) }
ServerVersionInterface has a method for retrieving the server's version.
type SwaggerSchemaInterface ¶
type SwaggerSchemaInterface interface { // SwaggerSchema retrieves and parses the swagger API schema the server supports. SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) }
SwaggerSchemaInterface has a method to retrieve the swagger schema.
Source Files ¶
discovery_client.go
Directories ¶
Path | Synopsis |
---|---|
pkg/client/typed/discovery/fake |
- Version
- v1.3.0-alpha.4
- Published
- May 17, 2016
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 6 minutes ago –
Tools for package owners.