Documentation
¶
Overview ¶
Package client is the client for kubeconfig
Index ¶
- func MappingFor(restMapper meta.RESTMapper, resourceOrKindArg string) (*meta.RESTMapping, error)
- func MappingForResources(restMapper meta.RESTMapper, filters []string) ([]*meta.RESTMapping, []error)
- func MatchGK(arl []*metav1.APIResourceList, gvk schema.GroupKind) (gvr schema.GroupVersionResource, resource *metav1.APIResource, err error)
- func MatchGVK(arl []*metav1.APIResourceList, gvk schema.GroupVersionKind) (gvr schema.GroupVersionResource, resource *metav1.APIResource, err error)
- func MatchShortResourceName(arl []*metav1.APIResourceList, name string) (gvr schema.GroupVersionResource, resource *metav1.APIResource, err error)
- type Clientset
- type DynamicClientImpersonator
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MappingFor ¶ added in v0.4.0
func MappingFor(restMapper meta.RESTMapper, resourceOrKindArg string) (*meta.RESTMapping, error)
MappingFor returns the RESTMapping for the given resource or kind argument.
func MappingForResources ¶ added in v0.5.0
func MappingForResources(restMapper meta.RESTMapper, filters []string) ([]*meta.RESTMapping, []error)
MappingForResources is a wrapper of MappingFor.
func MatchGK ¶ added in v0.5.0
func MatchGK(arl []*metav1.APIResourceList, gvk schema.GroupKind) (gvr schema.GroupVersionResource, resource *metav1.APIResource, err error)
MatchGK returns the GroupVersionKind for the given resource name.
func MatchGVK ¶ added in v0.5.0
func MatchGVK(arl []*metav1.APIResourceList, gvk schema.GroupVersionKind) (gvr schema.GroupVersionResource, resource *metav1.APIResource, err error)
MatchGVK returns the GroupVersionKind for the given resource name.
func MatchShortResourceName ¶ added in v0.5.0
func MatchShortResourceName(arl []*metav1.APIResourceList, name string) (gvr schema.GroupVersionResource, resource *metav1.APIResource, err error)
MatchShortResourceName returns the GroupVersionResource for the given resource name.
Types ¶
type Clientset ¶
type Clientset interface { ToRESTConfig() (*rest.Config, error) ToRawKubeConfigLoader() clientcmd.ClientConfig ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error) ToRESTMapper() (meta.RESTMapper, error) ToDynamicClient() (dynamic.Interface, error) ToImpersonatingDynamicClient() DynamicClientImpersonator }
Clientset is a set of Kubernetes clients.
type DynamicClientImpersonator ¶ added in v0.5.0
type DynamicClientImpersonator interface {
Impersonate(impersonateConfig rest.ImpersonationConfig) (dynamic.Interface, error)
}
type Option ¶
type Option func(*clientset)
Option is a function that configures a clientset.
func WithImpersonate ¶
func WithImpersonate(impersonateConfig rest.ImpersonationConfig) Option
WithImpersonate sets the impersonation config.
Click to show internal directories.
Click to hide internal directories.