cluster

package
v0.0.0-...-389e7ce Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: Apache-2.0 Imports: 22 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(kind 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
}

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, options RestConfigOptions) (*Cluster, error)

FromKubeConfig creates a Cluster from a kubeConfig.

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)

func (*Cluster) DynamicClient

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

func (*Cluster) InfoClient

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

func (*Cluster) KubernetesClient

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

func (*Cluster) NamespaceClient

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

func (*Cluster) Resource

func (*Cluster) ResourceExists

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

func (*Cluster) RestClient

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

func (*Cluster) RestConfig

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

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
}

type RestConfigOptions

type RestConfigOptions struct {
	Qps   float32
	Burst int
}

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