package
0.0.0-20250303095208-d379ee86d136
Repository: https://github.com/codeready-toolchain/toolchain-common.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
GetCachedToolchainCluster returns a kube client for the cluster (with the given name) and info if the client exists.
GetHostCluster returns the kube client for the host cluster from the cache of the clusters and info if such a client exists.
GetMemberClusters returns the kube clients for the host clusters from the cache of the clusters.
No description provided by the author
No description provided by the author
NewClusterConfig generate a new cluster config by fetching the necessary info the given ToolchainCluster's associated Secret and taking all data from ToolchainCluster CR.
NewToolchainClusterService creates a new instance of ToolchainClusterService object and assigns the refreshCache function to the cache instance.
NewToolchainClusterServiceWithClient creates a new instance of ToolchainClusterService object and assigns the given newClient function to be used for creating a client.
RoleLabel returns a label key that should be used to specific assign roles to clusters.

# Constants

No description provided by the author
No description provided by the author

# Variables

HostCluster the func to retrieve the host cluster.
MemberClusters the func to retrieve the member clusters.
Ready checks that the cluster is in a 'Ready' status condition.

# Structs

CachedToolchainCluster stores cluster client; cluster related info and previous health check probe results.
No description provided by the author
ToolchainClusterService manages cached cluster kube clients and related ToolchainCluster CRDs it's used for adding/updating/deleting.

# Type aliases

Condition an expected cluster condition.
GetHostClusterFunc a func that returns the Host cluster from the cache, along with a bool to indicate if there was a match or not.
GetMemberClustersFunc a func that returns the member clusters from the cache.
No description provided by the author
Role defines the role of the cluster.