Documentation ¶
Index ¶
- func NewProxiedPDClient(kubeCli kubernetes.Interface, fw utilportforward.PortForward, namespace string, ...) (pdapi.PDClient, context.CancelFunc, error)
- func NewProxiedPDClientFromTidbCluster(kubeCli kubernetes.Interface, fw utilportforward.PortForward, ...) (pdapi.PDClient, context.CancelFunc, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProxiedPDClient ¶
func NewProxiedPDClient(kubeCli kubernetes.Interface, fw utilportforward.PortForward, namespace string, tcName string, tlsEnabled bool, caCert []byte) (pdapi.PDClient, context.CancelFunc, error)
NewProxiedPDClient creates an PD client which can be used outside of the Kubernetes cluster.
Example:
pdClient, cancel, err := NewProxiedPDClient(...) if err != nil { log.Fatal(err) } defer cancel()
func NewProxiedPDClientFromTidbCluster ¶
func NewProxiedPDClientFromTidbCluster(kubeCli kubernetes.Interface, fw utilportforward.PortForward, tc *v1alpha1.TidbCluster, caCert []byte) (pdapi.PDClient, context.CancelFunc, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.