Documentation
¶
Index ¶
- Constants
- func TiKVGRPCClientURL(namespace, clusterName, podName, scheme, clusterDomain string) string
- func TiKVPodClientURL(namespace, clusterName, podName, scheme, clusterDomain string) string
- type Action
- type ActionType
- type FakeTiKVClient
- type FakeTiKVControl
- type NotFoundReaction
- type Reaction
- type TiKVClient
- type TiKVClientOpts
- type TiKVControlInterface
Constants ¶
View Source
const (
DefaultTimeout = 5 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func TiKVGRPCClientURL ¶ added in v1.6.2
TiKVGRPCURL builds the url of tikv grpc client
func TiKVPodClientURL ¶
TiKVPodClientURL builds the url of tikv pod client
Types ¶
type ActionType ¶
type ActionType string
const ( GetLeaderCountActionType ActionType = "GetLeaderCount" FlushLogBackupTasksActionType ActionType = "FlushLogBackupTasks" )
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) FlushLogBackupTasks ¶ added in v1.6.2
func (c *FakeTiKVClient) FlushLogBackupTasks(ctx context.Context) error
FlushLogBackupTasks implements TiKVClient.
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, clusterDomain 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 ¶
type TiKVClient interface {
GetLeaderCount() (int, error)
FlushLogBackupTasks(ctx context.Context) error
}
TiKVClient provides tikv server's api
func NewTiKVClient ¶
func NewTiKVClient(opts TiKVClientOpts) TiKVClient
NewTiKVClient returns a new TiKVClient
type TiKVClientOpts ¶ added in v1.6.2
type TiKVControlInterface ¶
type TiKVControlInterface interface {
// GetTiKVPodClient provides TiKVClient of the TiKV cluster.
GetTiKVPodClient(namespace string, tcName string, podName, clusterDomain 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.