cluster

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

Cluster is a client for cluster operations

func FromClientConfig added in v0.18.0

func FromClientConfig(
	ctx context.Context,
	clientConfig clientcmd.ClientConfig,
	opts ...ClusterOption,
) (*Cluster, error)

FromClientConfig creates a Cluster from a k8s.io/client-go ClientConfig

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() (clusterTypes.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() (clusterTypes.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 ClusterOption added in v0.18.0

type ClusterOption func(*clusterOptions)

func WithClientBurst added in v0.18.0

func WithClientBurst(burst int) ClusterOption

func WithClientQPS added in v0.18.0

func WithClientQPS(qps float32) ClusterOption

func WithClientUserAgent added in v0.18.0

func WithClientUserAgent(userAgent string) ClusterOption

func WithInitialNamespace added in v0.18.0

func WithInitialNamespace(initialNamespace string) ClusterOption

func WithProvidedNamespaces added in v0.18.0

func WithProvidedNamespaces(providedNamespaces []string) ClusterOption

func WithRESTConfigOptions added in v0.18.0

func WithRESTConfigOptions(restConfigOptions clusterTypes.RESTConfigOptions) ClusterOption

type DiscoveryResourceInfo added in v0.17.0

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

DiscoveryResourceInfo returns information about resources.

func NewDiscoveryResourceInfo added in v0.17.0

func NewDiscoveryResourceInfo(resourceLists []*metav1.APIResourceList, optionList ...Option) *DiscoveryResourceInfo

NewDiscoveryResourceInfo creates an instance of DiscoveryResourceInfo.

func (*DiscoveryResourceInfo) PreferredVersion added in v0.17.0

func (dri *DiscoveryResourceInfo) PreferredVersion(groupKind schema.GroupKind) (string, error)

PreferredVersion returns the preferred version for a group/kind pair.

type GroupVersionParserFunc added in v0.17.0

type GroupVersionParserFunc func(groupVersion string) (schema.GroupVersion, error)

GroupVersionParserFunc is a function that parses a string group/version into a schema GroupVersion. If it is unable, it returns an error.

type Option added in v0.17.0

type Option func(o *options)

Option is a functional option for configuring this package.

func GroupVersionParser added in v0.17.0

func GroupVersionParser(gvp GroupVersionParserFunc) Option

GroupVersionParser sets the group version parser.

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