Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Providek8sDynamicClient ¶
func Providek8sDynamicClient(in K8sClientConstructorIn) (dynamic.Interface, error)
Providek8sDynamicClient provides a dynamic kubernetes client.
Types ¶
type K8sClient ¶
type K8sClient interface { GetClientSet() *kubernetes.Clientset GetErr() error GetErrNotInCluster() bool }
K8sClient provides an interface for kubernetes client.
func Providek8sClient ¶
func Providek8sClient(in K8sClientConstructorIn) K8sClient
Providek8sClient provides a new kubernetes client and sets logger.
type K8sClientConstructorIn ¶
K8sClientConstructorIn holds parameter for Providek8sClient and Providek8sDynamicClient.
type RealK8sClient ¶
type RealK8sClient struct {
// contains filtered or unexported fields
}
RealK8sClient implements kubernetes client set.
func NewK8sClient ¶
func NewK8sClient(clientSet *kubernetes.Clientset, err error) *RealK8sClient
NewK8sClient returns a new kubernetes client.
func (*RealK8sClient) GetClientSet ¶
func (r *RealK8sClient) GetClientSet() *kubernetes.Clientset
GetClientSet returns the kubernetes client set.
func (*RealK8sClient) GetErr ¶
func (r *RealK8sClient) GetErr() error
GetErr returns the error of the client.
func (*RealK8sClient) GetErrNotInCluster ¶
func (r *RealK8sClient) GetErrNotInCluster() bool
GetErrNotInCluster returns true if client's error equals to ErrNotInCluster, unable to load in-cluster configuration.
Click to show internal directories.
Click to hide internal directories.