multicluster

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientSetFromKubeConfig added in v1.9.9

func GetClientSetFromKubeConfig(clusterID, kubeConfig string) (kubernetes.Interface, error)

func GetClientset

func GetClientset(hubServerAddr, clusterID string) (kubernetes.Interface, error)

GetClientset returns a client to interact with APIServer which implements kubernetes.Interface

func GetDiscoveryClient added in v1.9.9

func GetDiscoveryClient(hubServerAddr, clusterID string) (*discovery.DiscoveryClient, error)

func GetDiscoveryClientFromKubeConfig added in v1.9.9

func GetDiscoveryClientFromKubeConfig(clusterID, kubeConfig string) (*discovery.DiscoveryClient, error)

func GetDynamicKubeclient added in v1.9.9

func GetDynamicKubeclient(hubServerAddr, clusterID string) (dynamic.Interface, error)

func GetDynamicKubeclientFromKubeConfig added in v1.9.9

func GetDynamicKubeclientFromKubeConfig(clusterID, kubeConfig string) (dynamic.Interface, error)

func GetIstioV1Alpha3Client added in v1.9.9

func GetIstioV1Alpha3Client(hubServerAddr, clusterID string) (*v1alpha3.NetworkingV1alpha3Client, error)

func GetIstioV1Alpha3ClientFromKubeConfig added in v1.9.9

func GetIstioV1Alpha3ClientFromKubeConfig(clusterID, kubeConfig string) (*v1alpha3.NetworkingV1alpha3Client, error)

func GetKubeAPIReader

func GetKubeAPIReader(hubServerAddr, clusterID string) (client.Reader, error)

func GetKubeClient

func GetKubeClient(hubServerAddr, clusterID string) (client.Client, error)

func GetKubeClientFromKubeConfig added in v1.9.9

func GetKubeClientFromKubeConfig(clusterID, kubeConfig string) (client.Client, error)

func GetKubeClientSet added in v1.9.9

func GetKubeClientSet(hubServerAddr, clusterID string) (*kubernetes.Clientset, error)

func GetKubeClientSetFromKubeConfig added in v1.9.9

func GetKubeClientSetFromKubeConfig(clusterID, kubeConfig string) (*kubernetes.Clientset, error)

func GetKubeMetricsClient added in v1.9.9

func GetKubeMetricsClient(hubServerAddr, clusterID string) (*v1beta1.MetricsV1beta1Client, error)

func GetKubeMetricsClientFromKubeConfig added in v1.9.9

func GetKubeMetricsClientFromKubeConfig(clusterID, kubeConfig string) (*v1beta1.MetricsV1beta1Client, error)

func GetRESTConfig

func GetRESTConfig(hubServerAddr, clusterID string) (*rest.Config, error)

func GetRestConfigFromKubeConfig added in v1.9.9

func GetRestConfigFromKubeConfig(clusterID, kubeConfig string) (*rest.Config, error)

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(hubServerAddr string) (*Agent, error)

func (*Agent) ClusterConnected

func (s *Agent) ClusterConnected(clusterID string) bool

func (*Agent) DisconnectCluster

func (s *Agent) DisconnectCluster(username string, clusterID string, logger *zap.SugaredLogger) error

func (*Agent) GetClientGoKubeClient added in v1.9.9

func (s *Agent) GetClientGoKubeClient(clusterID string) (*kubernetes.Clientset, error)

func (*Agent) GetClientset

func (s *Agent) GetClientset(clusterID string) (kubernetes.Interface, error)

func (*Agent) GetDisCoveryClient added in v1.9.9

func (s *Agent) GetDisCoveryClient(clusterID string) (*discovery.DiscoveryClient, error)

func (*Agent) GetDynamicKubeClient added in v1.9.9

func (s *Agent) GetDynamicKubeClient(clusterID string) (dynamic.Interface, error)

func (*Agent) GetIstioV1Alpha3Client added in v1.9.9

func (s *Agent) GetIstioV1Alpha3Client(clusterID string) (*v1alpha3.NetworkingV1alpha3Client, error)

func (*Agent) GetKubeClient

func (s *Agent) GetKubeClient(clusterID string) (client.Client, error)

func (*Agent) GetKubeMetricsClient added in v1.9.9

func (s *Agent) GetKubeMetricsClient(clusterID string) (*v1beta1.MetricsV1beta1Client, error)

func (*Agent) ProxyAgent

func (s *Agent) ProxyAgent(writer gin.ResponseWriter, request *http.Request)

func (*Agent) ReconnectCluster

func (s *Agent) ReconnectCluster(username string, clusterID string, logger *zap.SugaredLogger) error

type HubClient

type HubClient struct {
	// contains filtered or unexported fields
}

func NewHubClient

func NewHubClient(hubServerAddr string) (*HubClient, error)

func (*HubClient) AgentProxy

func (c *HubClient) AgentProxy(w http.ResponseWriter, r *http.Request)

func (*HubClient) CreatePost

func (c *HubClient) CreatePost(uri string) (*http.Request, error)

func (*HubClient) Disconnect

func (c *HubClient) Disconnect(id string) error

func (*HubClient) Do

func (c *HubClient) Do(uri string) error

func (*HubClient) HasSession

func (c *HubClient) HasSession(id string) error

func (*HubClient) Restore

func (c *HubClient) Restore(id string) error

Jump to

Keyboard shortcuts

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