Documentation ¶
Index ¶
- Constants
- func GetTLSConfig(cli client.Client, namespace, secretName string) (*tls.Config, error)
- func LoadTlsConfigFromSecret(secret *corev1.Secret) (*tls.Config, error)
- func MasterClientURL(namespace, clusterName, podName, scheme string) string
- type Executor
- type ExecutorsInfo
- type LeaderInfo
- type Master
- type MasterClient
- type MastersInfo
Constants ¶
View Source
const (
DefaultTimeout = 5 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func GetTLSConfig ¶
GetTLSConfig returns *tls.Config for given TiDB cluster.
func LoadTlsConfigFromSecret ¶
func MasterClientURL ¶
MasterClientURL builds the url of master client
Types ¶
type ExecutorsInfo ¶
type ExecutorsInfo struct {
Executors []*Executor `json:"executors,omitempty"`
}
type LeaderInfo ¶
type LeaderInfo struct {
AdvertiseAddr string `json:"advertise_addr,omitempty"`
}
type MasterClient ¶
type MasterClient interface { // GetMasters returns all master members from cluster GetMasters() (MastersInfo, error) GetExecutors() (ExecutorsInfo, error) GetLeader() (LeaderInfo, error) GetURL() string EvictLeader() error DeleteMaster(name string) error DeleteExecutor(name string) error }
MasterClient provides master server's api
func GetMasterClient ¶
func GetMasterClient(cli client.Client, namespace, tcName, podName string, tlsEnabled bool) MasterClient
GetMasterClient provides a MasterClient of real tiflow-master cluster podName == "": get load balancer service of tiflow-master cluster podNAme != "": get exact pod's service of tiflow-master client
func NewMasterClient ¶
NewMasterClient returns a new MasterClient
type MastersInfo ¶
type MastersInfo struct {
Masters []*Master `json:"masters,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.