discovery

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryHelper

type DiscoveryHelper interface {
	// APIGroups returns current supported APIGroups in kubernetes cluster
	APIGroups() []metav1.APIGroup

	// ServerVersion returns kubernetes version information
	ServerVersion() *version.Info

	// Resources returns the current set of resources retrieved from discovery
	Resources() []*metav1.APIResourceList

	// ByGroupVersionKind gets a fully-resolved GroupVersionResource and an
	// APIResource for the provided GroupVersionKind.
	ByGroupVersionKind(input schema.GroupVersionKind) (schema.GroupVersionResource,
		metav1.APIResource,
		error)

	// ByKind gets a fully-resolved preferred GroupVersionResource list all
	// APIResource for the kind for the provided GroupVersionKind.
	ByKind(kind string) (*metav1.APIResource,
		[]*metav1.APIResource,
		error)

	// Refresh updates API resource list with discovery helper
	Refresh() error

	GetNamespaceScopedAPIResources() ([]*metav1.APIResource, error)

	GetClusterScopedAPIResources() ([]*metav1.APIResource, error)
}

DiscoveryHelper exposes functions for Kubernetes API discovery.

func NewDiscoveryHelper

func NewDiscoveryHelper(discoveryClient discovery.DiscoveryInterface,
	logger log.FieldLogger) (DiscoveryHelper, error)

Jump to

Keyboard shortcuts

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