Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8sClient ¶
type K8sClient interface { // InitClient 初始化指定集群 ID 的 Kubernetes 客户端 InitClient(ctx context.Context, clusterID int, kubeConfig *rest.Config) error // GetKubeClient 获取指定集群 ID 的 Kubernetes 客户端 GetKubeClient(clusterID int) (*kubernetes.Clientset, error) // GetKruiseClient 获取指定集群 ID 的 Kruise 客户端 GetKruiseClient(clusterID int) (*versioned.Clientset, error) // GetMetricsClient 获取指定集群 ID 的 Metrics 客户端 GetMetricsClient(clusterID int) (*metricsClient.Clientset, error) // GetDynamicClient 获取指定集群 ID 的动态客户端 GetDynamicClient(clusterID int) (*dynamic.DynamicClient, error) // GetDiscoveryClient 获取指定集群 ID 的 Discovery 客户端 GetDiscoveryClient(clusterID int) (*discovery2.DiscoveryClient, error) // RefreshClients 刷新客户端 RefreshClients(ctx context.Context) error }
func NewK8sClient ¶
func NewK8sClient(l *zap.Logger, dao admin.ClusterDAO) K8sClient
Click to show internal directories.
Click to hide internal directories.