cluster

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 25 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)
	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, kubeConfig, contextName string, initialNamespace string, options RESTConfigOptions) (*Cluster, error)

FromKubeConfig creates a Cluster from a kubeConfig.

func (*Cluster) Close

func (c *Cluster) Close()

func (*Cluster) DefaultNamespace added in v0.7.0

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) 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
}

NamespaceInterface is an interface for querying namespace details.

type RESTConfigOptions added in v0.5.0

type RESTConfigOptions struct {
	QPS       float32
	Burst     int
	UserAgent string
}

type RESTInterface

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

Jump to

Keyboard shortcuts

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