Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultTimeout = 5 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func TiKVPodClientURL ¶
TiKVPodClientURL builds the url of tikv pod client
Types ¶
type ActionType ¶
type ActionType string
const (
GetLeaderCountActionType ActionType = "GetLeaderCount"
)
type FakeTiKVClient ¶
type FakeTiKVClient struct {
// contains filtered or unexported fields
}
FakeTiKVClient implements a fake version of TiKVClient.
func NewFakeTiKVClient ¶
func NewFakeTiKVClient() *FakeTiKVClient
func (*FakeTiKVClient) AddReaction ¶
func (c *FakeTiKVClient) AddReaction(actionType ActionType, reaction Reaction)
func (*FakeTiKVClient) GetLeaderCount ¶
func (c *FakeTiKVClient) GetLeaderCount() (int, error)
type FakeTiKVControl ¶
type FakeTiKVControl struct {
// contains filtered or unexported fields
}
FakeTiKVControl implements a fake version of TiKVControlInterface.
func NewFakeTiKVControl ¶
func NewFakeTiKVControl(secretLister corelisterv1.SecretLister) *FakeTiKVControl
func (*FakeTiKVControl) GetTiKVPodClient ¶
func (ftc *FakeTiKVControl) GetTiKVPodClient(namespace, tcName, podName string, tlsEnabled bool) TiKVClient
func (*FakeTiKVControl) SetTiKVPodClient ¶
func (ftc *FakeTiKVControl) SetTiKVPodClient(namespace, tcName, podName string, tikvPodClient TiKVClient)
type NotFoundReaction ¶
type NotFoundReaction struct {
// contains filtered or unexported fields
}
func (*NotFoundReaction) Error ¶
func (nfr *NotFoundReaction) Error() string
type TiKVClient ¶
TiKVClient provides tikv server's api
func NewTiKVClient ¶
func NewTiKVClient(url string, timeout time.Duration, tlsConfig *tls.Config, disableKeepalive bool) TiKVClient
NewTiKVClient returns a new TiKVClient
type TiKVControlInterface ¶
type TiKVControlInterface interface { // GetTiKVPodClient provides TiKVClient of the TiKV cluster. GetTiKVPodClient(namespace string, tcName string, podName string, tlsEnabled bool) TiKVClient }
TiKVControlInterface is an interface that knows how to manage and get client for TiKV
func NewDefaultTiKVControl ¶
func NewDefaultTiKVControl(secretLister corelisterv1.SecretLister) TiKVControlInterface
NewDefaultTiKVControl returns a defaultTiKVControl instance
Click to show internal directories.
Click to hide internal directories.