client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config(kubeconfig string) (*rest.Config, error)

Config returns a *rest.Config, using either the kubeconfig (if specified) or an in-cluster configuration.

Types

type Dynamic

type Dynamic interface {
	// Create creates an object.
	Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
	// List lists all the objects of a given resource.
	List(metav1.ListOptions) (runtime.Object, error)
	// Watch watches for changes to objects of a given resource.
	Watch(metav1.ListOptions) (watch.Interface, error)
}

Dynamic contains client methods that Ark needs for backing up and restoring resources.

type DynamicFactory

type DynamicFactory interface {
	// ClientForGroupVersionResource returns a Dynamic client for the given Group and Version
	// (specified in gvr) and Resource (specified in resource) for the given namespace.
	ClientForGroupVersionResource(gvr schema.GroupVersionResource, resource metav1.APIResource, namespace string) (Dynamic, error)
	// ClientForGroupVersionKind returns a Dynamic client for the given Group and Version
	// (specified in gvk) and Resource (specified in resource) for the given namespace.
	ClientForGroupVersionKind(gvk schema.GroupVersionKind, resource metav1.APIResource, namespace string) (Dynamic, error)
}

DynamicFactory contains methods for retrieving dynamic clients for GroupVersionResources and GroupVersionKinds.

func NewDynamicFactory

func NewDynamicFactory(clientPool dynamic.ClientPool) DynamicFactory

NewDynamicFactory returns a new ClientPool-based dynamic factory.

type Factory

type Factory interface {
	// BindFlags binds common flags such as --kubeconfig to the passed-in FlagSet.
	BindFlags(flags *pflag.FlagSet)
	// Client returns an ArkClient. It uses the following priority to specify the cluster
	// configuration:  --kubeconfig flag, KUBECONFIG environment variable, in-cluster configuration.
	Client() (clientset.Interface, error)
}

Factory knows how to create an ArkClient.

func NewFactory

func NewFactory() Factory

NewFactory returns a Factory.

Jump to

Keyboard shortcuts

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