discovery

package
v1.12.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And added in v1.12.0

And returns a composite predicate that implements a logical AND of the predicates passed to it.

Types

type Helper

type Helper interface {
	// Resources gets the current set of resources retrieved from discovery
	// that are backuppable by Velero.
	Resources() []*metav1.APIResourceList

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

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

	// Refresh pulls an updated set of Velero-backuppable resources from the
	// discovery API.
	Refresh() error

	// APIGroups gets the current set of supported APIGroups
	// in the cluster.
	APIGroups() []metav1.APIGroup

	// ServerVersion retrieves and parses the server's k8s version (git version)
	// in the cluster.
	ServerVersion() *version.Info
}

Helper exposes functions for interacting with the Kubernetes discovery API.

func NewHelper

func NewHelper(discoveryClient discovery.DiscoveryInterface, logger logrus.FieldLogger) (Helper, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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