Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewUnderlayClientFunc = func(c client.Client) timanager.NewUnderlayClientFunc[*v1alpha1.TiFlash, tiflashapi.TiFlashClient] { return func(f *v1alpha1.TiFlash) (tiflashapi.TiFlashClient, error) { ctx := context.Background() var cluster v1alpha1.Cluster if err := c.Get(ctx, client.ObjectKey{ Name: f.Spec.Cluster.Name, Namespace: f.Namespace, }, &cluster); err != nil { return nil, fmt.Errorf("cannot find cluster %s: %w", f.Spec.Cluster.Name, err) } if coreutil.IsTLSClusterEnabled(&cluster) { tlsConfig, err := apicall.GetClientTLSConfig[scope.TiFlash](ctx, c, f) if err != nil { return nil, fmt.Errorf("cannot get tls config from secret: %w", err) } url := coreutil.TiFlashProxyStatusURL(f, true) return tiflashapi.NewTiFlashClient(url, defaultTimeout, tlsConfig), nil } url := coreutil.TiFlashProxyStatusURL(f, false) return tiflashapi.NewTiFlashClient(url, defaultTimeout, nil), nil } }
Functions ¶
func CacheKeys ¶
CacheKeys returns the keys of the TiFlash. If any keys are changed, client will be renewed The first key is primary key to get client from manager
func NewClient ¶
func NewClient( f *v1alpha1.TiFlash, underlay tiflashapi.TiFlashClient, _ timanager.SharedInformerFactory[tiflashapi.TiFlashClient], ) tiflashapi.TiFlashClient
Types ¶
type TiFlashClientManager ¶
type TiFlashClientManager = timanager.ClientManager[*v1alpha1.TiFlash, tiflashapi.TiFlashClient]
func NewTiFlashClientManager ¶
func NewTiFlashClientManager(logger logr.Logger, c client.Client) TiFlashClientManager
Click to show internal directories.
Click to hide internal directories.