client

package
v0.0.0-...-d741a62 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 13 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL