Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileReplicater ¶
type FileReplicater interface {
ReplicateFileToAllMembers(ctx context.Context, name string, data []byte) error
}
FileReplicater is the interface that can save important data to all cluster nodes.
type HTTPReplicationStatus ¶
type HTTPReplicationStatus struct { Mode string `json:"mode"` DrAutoSync struct { LabelKey string `json:"label_key"` State string `json:"state"` StateID uint64 `json:"state_id,omitempty"` TotalRegions int `json:"total_regions,omitempty"` SyncedRegions int `json:"synced_regions,omitempty"` RecoverProgress float32 `json:"recover_progress,omitempty"` } `json:"dr-auto-sync,omitempty"` }
HTTPReplicationStatus is for query status from HTTP API.
type ModeManager ¶
ModeManager is used to control how raft logs are synchronized between different tikv nodes.
func NewReplicationModeManager ¶
func NewReplicationModeManager(config config.ReplicationModeConfig, storage *core.Storage, cluster opt.Cluster, fileReplicater FileReplicater) (*ModeManager, error)
NewReplicationModeManager creates the replicate mode manager.
func (*ModeManager) GetReplicationStatus ¶
func (m *ModeManager) GetReplicationStatus() *pb.ReplicationStatus
GetReplicationStatus returns the status to sync with tikv servers.
func (*ModeManager) GetReplicationStatusHTTP ¶
func (m *ModeManager) GetReplicationStatusHTTP() *HTTPReplicationStatus
GetReplicationStatusHTTP returns status for HTTP API.
func (*ModeManager) Run ¶
func (m *ModeManager) Run(quit chan struct{})
Run starts the background job.
func (*ModeManager) UpdateConfig ¶
func (m *ModeManager) UpdateConfig(config config.ReplicationModeConfig) error
UpdateConfig updates configuration online and updates internal state.
Click to show internal directories.
Click to hide internal directories.