Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + const SchemaChangeDirName + const SchemaChangeUser + func RegisterControllerFactory(name string, factory ControllerFactory) + func Run(ctx context.Context, controller Controller, executor Executor) error + type Controller interface + Close func() + Keyspace func() string + OnExecutorComplete func(ctx context.Context, result *ExecuteResult) error + OnReadFail func(ctx context.Context, err error) error + OnReadSuccess func(ctx context.Context) error + OnValidationFail func(ctx context.Context, err error) error + OnValidationSuccess func(ctx context.Context) error + Open func(ctx context.Context) error + Read func(ctx context.Context) (sqls []string, err error) + type ControllerFactory func(params map[string]string) (Controller, error) + func GetControllerFactory(name string) (ControllerFactory, error) + type ExecuteResult struct + CurSQLIndex int + ExecutorErr string + FailedShards []ShardWithError + Sqls []string + SuccessShards []ShardResult + TotalTimeSpent time.Duration + type Executor interface + Close func() + Execute func(ctx context.Context, sqls []string) *ExecuteResult + Open func(ctx context.Context, keyspace string) error + Validate func(ctx context.Context, sqls []string) error + type LocalController struct + func NewLocalController(schemaChangeDir string) *LocalController + func (controller *LocalController) Close() + func (controller *LocalController) Keyspace() string + func (controller *LocalController) OnExecutorComplete(ctx context.Context, result *ExecuteResult) error + func (controller *LocalController) OnReadFail(ctx context.Context, err error) error + func (controller *LocalController) OnReadSuccess(ctx context.Context) error + func (controller *LocalController) OnValidationFail(ctx context.Context, err error) error + func (controller *LocalController) OnValidationSuccess(ctx context.Context) error + func (controller *LocalController) Open(ctx context.Context) error + func (controller *LocalController) Read(ctx context.Context) ([]string, error) + type PlainController struct + func NewPlainController(sqlStr string, keyspace string) *PlainController + func (controller *PlainController) Close() + func (controller *PlainController) Keyspace() string + func (controller *PlainController) OnExecutorComplete(ctx context.Context, result *ExecuteResult) error + func (controller *PlainController) OnReadFail(ctx context.Context, err error) error + func (controller *PlainController) OnReadSuccess(ctx context.Context) error + func (controller *PlainController) OnValidationFail(ctx context.Context, err error) error + func (controller *PlainController) OnValidationSuccess(ctx context.Context) error + func (controller *PlainController) Open(ctx context.Context) error + func (controller *PlainController) Read(ctx context.Context) ([]string, error) + type ShardResult struct + Position string + Result *querypb.QueryResult + Shard string + type ShardWithError struct + Err string + Shard string + type TabletExecutor struct + func NewTabletExecutor(wr *wrangler.Wrangler, waitSlaveTimeout time.Duration) *TabletExecutor + func (exec *TabletExecutor) AllowBigSchemaChange() + func (exec *TabletExecutor) Close() + func (exec *TabletExecutor) DisallowBigSchemaChange() + func (exec *TabletExecutor) Execute(ctx context.Context, sqls []string) *ExecuteResult + func (exec *TabletExecutor) Open(ctx context.Context, keyspace string) error + func (exec *TabletExecutor) Validate(ctx context.Context, sqls []string) error + type UIController struct + func NewUIController(sqlStr string, keyspace string, writer http.ResponseWriter) *UIController + func (controller *UIController) Close() + func (controller *UIController) Keyspace() string + func (controller *UIController) OnExecutorComplete(ctx context.Context, result *ExecuteResult) error + func (controller *UIController) OnReadFail(ctx context.Context, err error) error + func (controller *UIController) OnReadSuccess(ctx context.Context) error + func (controller *UIController) OnValidationFail(ctx context.Context, err error) error + func (controller *UIController) OnValidationSuccess(ctx context.Context) error + func (controller *UIController) Open(ctx context.Context) error + func (controller *UIController) Read(ctx context.Context) ([]string, error)