Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyInRebalance = errors.New("already in rebalance")
)
Functions ¶
func IsTempGroup ¶
Types ¶
type DDLPlanStatus ¶
type DDLPlanStatus struct { PlanId string `json:"plan_id,omitempty"` // PLAN_ID State string `json:"state,omitempty"` // State Progress int `json:"progress,omitempty"` // Progress }
func (*DDLPlanStatus) IsSuccess ¶
func (s *DDLPlanStatus) IsSuccess() bool
type DDLResult ¶
type DDLResult struct { JobId string `json:"job_id,omitempty"` // JOB_ID Schema string `json:"schema,omitempty"` // SCHEMA_NAME Object string `json:"object,omitempty"` // OBJECT_NAME Type string `json:"type,omitempty"` // DDL_TYPE Result string `json:"result,omitempty"` // RESULT_TYPE Content string `json:"content,omitempty"` // RESULT_CONTENT }
type DDLStatus ¶
type DDLStatus struct { JobId string `json:"job_id,omitempty"` // JOB_ID Schema string `json:"schema,omitempty"` // OBJECT_SCHEMA Object string `json:"object,omitempty"` // OBJECT_NAME Type string `json:"type,omitempty"` // DDL_TYPE State string `json:"status,omitempty"` // STATE Progress int `json:"progress,omitempty"` // PROGRESS StartTime time.Time `json:"start_time,omitempty"` // START_TIME }
type GroupManager ¶
type GroupManager interface { ListSchemas() ([]string, error) CreateSchema(schema string, createTables ...string) error ListAllGroups() (map[string][]Group, error) ListGroups(schema string) ([]Group, error) CountStorages() (int, error) GetGroupsOn(schema, storageId string) ([]Group, error) PreloadSchema(schema string, addrs ...string) error RebalanceCluster(storageExpected int) (string, error) DrainStorageNodes(storageNodes ...string) (string, error) GetClusterVersion() (string, error) ShowDDL(jobId string) (*DDLStatus, error) ShowDDLResult(jobId string) (*DDLResult, error) ShowDDLPlanStatus(planId string) (*DDLPlanStatus, error) Close() error }
func NewGroupManager ¶
func NewGroupManager(ctx context.Context, ds dbutil.MySQLDataSource, caseInsensitive bool) GroupManager
func NewGroupManagerWithDB ¶
type PlanGenerator ¶
type PlanGenerator interface { GenerateForNewStorages(curStorageIds []string, newStorageIds []string, schemaGroups map[string][]Group) []Plan GenerateForToRemoveStorages(curStorageIds []string, toRemoveStorageIds []string, schemaGroups map[string][]Group) ([]Plan, error) }
func NewPlanGenerator ¶
func NewPlanGenerator() PlanGenerator
Click to show internal directories.
Click to hide internal directories.