cluster

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInterface

type ClientInterface interface {
	DefaultNamespace() string
	ResourceExists(schema.GroupVersionResource) bool
	Resource(schema.GroupKind) (schema.GroupVersionResource, error)
	ResetMapper()
	KubernetesClient() (kubernetes.Interface, error)
	DynamicClient() (dynamic.Interface, error)
	DiscoveryClient() (discovery.DiscoveryInterface, error)
	NamespaceClient() (NamespaceInterface, error)
	InfoClient() (InfoInterface, error)
	Close()
	RESTInterface
}

ClientInterface is a client for cluster operations.

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}

Cluster is a client for cluster operations

func FromKubeConfig

func FromKubeConfig(ctx context.Context, kubeConfigList, contextName string, initialNamespace string, providedNamespaces []string, options RESTConfigOptions) (*Cluster, error)

FromKubeConfig creates a Cluster from a kubeConfig chain.

func (*Cluster) Close

func (c *Cluster) Close()

func (*Cluster) DefaultNamespace

func (c *Cluster) DefaultNamespace() string

func (*Cluster) DiscoveryClient

func (c *Cluster) DiscoveryClient() (discovery.DiscoveryInterface, error)

DiscoveryClient returns a DiscoveryClient for the cluster.

func (*Cluster) DynamicClient

func (c *Cluster) DynamicClient() (dynamic.Interface, error)

DynamicClient returns a dynamic client.

func (*Cluster) InfoClient

func (c *Cluster) InfoClient() (InfoInterface, error)

InfoClient returns an InfoClient for the cluster.

func (*Cluster) KubernetesClient

func (c *Cluster) KubernetesClient() (kubernetes.Interface, error)

KubernetesClient returns a Kubernetes client.

func (*Cluster) NamespaceClient

func (c *Cluster) NamespaceClient() (NamespaceInterface, error)

NamespaceClient returns a namespace client.

func (*Cluster) RESTClient

func (c *Cluster) RESTClient() (rest.Interface, error)

RESTClient returns a RESTClient for the cluster.

func (*Cluster) RESTConfig

func (c *Cluster) RESTConfig() *rest.Config

RESTConfig returns configuration for communicating with the cluster.

func (*Cluster) ResetMapper added in v0.10.0

func (c *Cluster) ResetMapper()

func (*Cluster) Resource

func (*Cluster) ResourceExists

func (c *Cluster) ResourceExists(gvr schema.GroupVersionResource) bool

func (*Cluster) Version

func (c *Cluster) Version() (string, error)

Version returns a ServerVersion for the cluster.

type InfoInterface

type InfoInterface interface {
	Context() string
	Cluster() string
	Server() string
	User() string
}

InfoInterface provides connection details for a cluster

type NamespaceInterface

type NamespaceInterface interface {
	Names() ([]string, error)
	InitialNamespace() string
	ProvidedNamespaces() []string
	HasNamespace(namespace string) bool
}

NamespaceInterface is an interface for querying namespace details.

type RESTConfigOptions

type RESTConfigOptions struct {
	QPS       float32
	Burst     int
	UserAgent string
}

type RESTInterface

type RESTInterface interface {
	RESTClient() (rest.Interface, error)
	RESTConfig() *rest.Config
}

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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