Documentation ¶
Index ¶
- func NewConfigFromCluster(c *clusterv1beta1.Cluster) (*restclient.Config, error)
- func UnstructuredToRuntimeObject(u *unstructured.Unstructured) (runtime.Object, error)
- type MultiClusterClient
- func BuildHubClients(ctx context.Context, hubConfig *restclient.Config) (*MultiClusterClient, error)
- func BuildMultiClusterClient(ctx context.Context, hubConfig *restclient.Config, name string) (*MultiClusterClient, error)
- func BuildSpokeClients(ctx context.Context, hubDynamicClient *dynamic.DynamicClient, name string) (*MultiClusterClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigFromCluster ¶
func NewConfigFromCluster(c *clusterv1beta1.Cluster) (*restclient.Config, error)
NewConfigFromCluster takes in a v1beta1.Cluster object and return the corresponding restclient.Config object for client-go
func UnstructuredToRuntimeObject ¶
func UnstructuredToRuntimeObject(u *unstructured.Unstructured) (runtime.Object, error)
unstructuredToRuntimeObject converts an unstructured.Unstructured into a typed runtime.Object
Types ¶
type MultiClusterClient ¶
type MultiClusterClient struct { ClientSet *kubernetes.Clientset DynamicClient *dynamic.DynamicClient MetricsClient *metricsv1beta1.MetricsV1beta1Client }
MultiClusterClient represents the client used to interact with multiple Kubernetes clusters.
func BuildHubClients ¶
func BuildHubClients( ctx context.Context, hubConfig *restclient.Config, ) (*MultiClusterClient, error)
func BuildMultiClusterClient ¶
func BuildMultiClusterClient( ctx context.Context, hubConfig *restclient.Config, name string, ) (*MultiClusterClient, error)
BuildMultiClusterClient returns a MultiClusterClient based on the cluster name in the request
func BuildSpokeClients ¶
func BuildSpokeClients( ctx context.Context, hubDynamicClient *dynamic.DynamicClient, name string, ) (*MultiClusterClient, error)
BuildSpokeClients returns a MultiClusterClient for the spoke cluster based on the cluster name in the request
Click to show internal directories.
Click to hide internal directories.