Documentation ¶
Index ¶
- type ClientInterface
- type Cluster
- func (c *Cluster) Close()
- func (c *Cluster) DefaultNamespace() string
- func (c *Cluster) DiscoveryClient() (discovery.DiscoveryInterface, error)
- func (c *Cluster) DynamicClient() (dynamic.Interface, error)
- func (c *Cluster) InfoClient() (clusterTypes.InfoInterface, error)
- func (c *Cluster) KubernetesClient() (kubernetes.Interface, error)
- func (c *Cluster) NamespaceClient() (clusterTypes.NamespaceInterface, error)
- func (c *Cluster) RESTClient() (rest.Interface, error)
- func (c *Cluster) RESTConfig() *rest.Config
- func (c *Cluster) ResetMapper()
- func (c *Cluster) Resource(gk schema.GroupKind) (schema.GroupVersionResource, bool, error)
- func (c *Cluster) ResourceExists(gvr schema.GroupVersionResource) bool
- func (c *Cluster) Version() (string, error)
- type ClusterOption
- func WithClientBurst(burst int) ClusterOption
- func WithClientQPS(qps float32) ClusterOption
- func WithClientUserAgent(userAgent string) ClusterOption
- func WithInitialNamespace(initialNamespace string) ClusterOption
- func WithProvidedNamespaces(providedNamespaces []string) ClusterOption
- func WithRESTConfigOptions(restConfigOptions RESTConfigOptions) ClusterOption
- type DiscoveryResourceInfo
- type GroupVersionParserFunc
- type Option
- type RESTConfigOptions
- type RESTInterface
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, bool, error) ResetMapper() KubernetesClient() (kubernetes.Interface, error) DynamicClient() (dynamic.Interface, error) DiscoveryClient() (discovery.DiscoveryInterface, error) NamespaceClient() (clusterTypes.NamespaceInterface, error) InfoClient() (clusterTypes.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 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) DefaultNamespace ¶
func (*Cluster) DiscoveryClient ¶
func (c *Cluster) DiscoveryClient() (discovery.DiscoveryInterface, error)
DiscoveryClient returns a DiscoveryClient for the cluster.
func (*Cluster) DynamicClient ¶
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 ¶
RESTClient returns a RESTClient for the cluster.
func (*Cluster) RESTConfig ¶
RESTConfig returns configuration for communicating with the cluster.
func (*Cluster) ResetMapper ¶ added in v0.10.0
func (c *Cluster) ResetMapper()
func (*Cluster) ResourceExists ¶
func (c *Cluster) ResourceExists(gvr schema.GroupVersionResource) bool
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 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.