Versions in this module Expand all Collapse all v1 v1.2.3 Aug 25, 2022 v1.0.2 Aug 25, 2022 v1.0.1 Aug 25, 2022 Changes in this version + var ErrAlreadyInRebalance = errors.New("already in rebalance") + func IsTempGroup(group string) bool + type DDLPlanStatus struct + PlanId string + Progress int + State string + func (s *DDLPlanStatus) IsSuccess() bool + type DDLResult struct + Content string + JobId string + Object string + Result string + Schema string + Type string + type DDLStatus struct + JobId string + Object string + Progress int + Schema string + StartTime time.Time + State string + Type string + type Group struct + DB string + Group string + ID int + Movable bool + PhysicalDB string + StorageId string + type GroupManager interface + Close func() error + CountStorages func() (int, error) + CreateSchema func(schema string, createTables ...string) error + DrainStorageNodes func(storageNodes ...string) (string, error) + GetClusterVersion func() (string, error) + GetGroupsOn func(schema, storageId string) ([]Group, error) + ListAllGroups func() (map[string][]Group, error) + ListGroups func(schema string) ([]Group, error) + ListSchemas func() ([]string, error) + PreloadSchema func(schema string, addrs ...string) error + RebalanceCluster func(storageExpected int) (string, error) + ShowDDL func(jobId string) (*DDLStatus, error) + ShowDDLPlanStatus func(planId string) (*DDLPlanStatus, error) + ShowDDLResult func(jobId string) (*DDLResult, error) + func NewGroupManager(ctx context.Context, ds dbutil.MySQLDataSource, caseInsensitive bool) GroupManager + func NewGroupManagerWithDB(ctx context.Context, db *sql.DB, caseInsensitive bool) GroupManager + type Migrate struct + Group Group + TargetStorageID string + func (m *Migrate) String() string + type Plan struct + MigrateTasks []Migrate + Schema string + type PlanGenerator interface + GenerateForNewStorages func(curStorageIds []string, newStorageIds []string, ...) []Plan + GenerateForToRemoveStorages func(curStorageIds []string, toRemoveStorageIds []string, ...) ([]Plan, error) + func NewPlanGenerator() PlanGenerator