Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewUnderlayClientFunc = func(c client.Client) timanager.NewUnderlayClientFunc[*v1alpha1.TSOGroup, tsoapi.TSOClient] { return func(tg *v1alpha1.TSOGroup) (tsoapi.TSOClient, error) { ctx := context.Background() var cluster v1alpha1.Cluster if err := c.Get(ctx, client.ObjectKey{ Name: tg.Spec.Cluster.Name, Namespace: tg.Namespace, }, &cluster); err != nil { return nil, fmt.Errorf("cannot find cluster %s: %w", tg.Spec.Cluster.Name, err) } if coreutil.IsTLSClusterEnabled(&cluster) { tlsConfig, err := apicall.GetClientTLSConfig[scope.TSOGroup](ctx, c, tg) if err != nil { return nil, fmt.Errorf("cannot get tls config from secret: %w", err) } url := coreutil.TSOServiceURL(tg, true) return tsoapi.NewTSOClient(url, tsoRequestTimeout, tlsConfig), nil } url := coreutil.TSOServiceURL(tg, false) return tsoapi.NewTSOClient(url, tsoRequestTimeout, nil), nil } }
Functions ¶
Types ¶
type TSOClientManager ¶
func NewTSOClientManager ¶
func NewTSOClientManager(logger logr.Logger, c client.Client) TSOClientManager
Click to show internal directories.
Click to hide internal directories.