Documentation ¶
Index ¶
- type TestDDLCallback
- func (tc *TestDDLCallback) Clone() *TestDDLCallback
- func (tc *TestDDLCallback) OnChanged(err error) error
- func (tc *TestDDLCallback) OnGetJobAfter(jobType string, job *model.Job)
- func (tc *TestDDLCallback) OnGetJobBefore(jobType string)
- func (tc *TestDDLCallback) OnJobRunAfter(job *model.Job)
- func (tc *TestDDLCallback) OnJobRunBefore(job *model.Job)
- func (tc *TestDDLCallback) OnJobUpdated(job *model.Job)
- func (tc *TestDDLCallback) OnSchemaStateChanged(schemaVer int64)
- func (tc *TestDDLCallback) OnUpdateReorgInfo(job *model.Job, pid int64)
- func (tc *TestDDLCallback) OnWatched(ctx context.Context)
- type TestInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestDDLCallback ¶
type TestDDLCallback struct { *ddl.BaseCallback // We recommended to pass the domain parameter to the test ddl callback, it will ensure // domain to reload schema before your ddl stepping into the next state change. Do ddl.DomainReloader OnJobRunBeforeExported func(*model.Job) OnJobRunAfterExported func(*model.Job) OnJobUpdatedExported atomic.Pointer[func(*model.Job)] OnGetJobBeforeExported func(string) OnGetJobAfterExported func(string, *model.Job) OnJobSchemaStateChanged func(int64) OnUpdateReorgInfoExported func(job *model.Job, pid int64) // contains filtered or unexported fields }
TestDDLCallback is used to customize user callback themselves.
func (*TestDDLCallback) Clone ¶
func (tc *TestDDLCallback) Clone() *TestDDLCallback
Clone copies the callback and take its reference
func (*TestDDLCallback) OnChanged ¶
func (tc *TestDDLCallback) OnChanged(err error) error
OnChanged mock the same behavior with the main DDL hook.
func (*TestDDLCallback) OnGetJobAfter ¶
func (tc *TestDDLCallback) OnGetJobAfter(jobType string, job *model.Job)
OnGetJobAfter implements Callback.OnGetJobAfter interface.
func (*TestDDLCallback) OnGetJobBefore ¶
func (tc *TestDDLCallback) OnGetJobBefore(jobType string)
OnGetJobBefore implements Callback.OnGetJobBefore interface.
func (*TestDDLCallback) OnJobRunAfter ¶
func (tc *TestDDLCallback) OnJobRunAfter(job *model.Job)
OnJobRunAfter is used to run the user customized logic of `OnJobRunAfter` first.
func (*TestDDLCallback) OnJobRunBefore ¶
func (tc *TestDDLCallback) OnJobRunBefore(job *model.Job)
OnJobRunBefore is used to run the user customized logic of `onJobRunBefore` first.
func (*TestDDLCallback) OnJobUpdated ¶
func (tc *TestDDLCallback) OnJobUpdated(job *model.Job)
OnJobUpdated is used to run the user customized logic of `OnJobUpdated` first.
func (*TestDDLCallback) OnSchemaStateChanged ¶
func (tc *TestDDLCallback) OnSchemaStateChanged(schemaVer int64)
OnSchemaStateChanged mock the same behavior with the main ddl hook.
func (*TestDDLCallback) OnUpdateReorgInfo ¶
func (tc *TestDDLCallback) OnUpdateReorgInfo(job *model.Job, pid int64)
OnUpdateReorgInfo mock the same behavior with the main DDL reorg hook.
func (*TestDDLCallback) OnWatched ¶
func (tc *TestDDLCallback) OnWatched(ctx context.Context)
OnWatched is used to run the user customized logic of `OnWatched` first.
type TestInterceptor ¶
type TestInterceptor struct { *ddl.BaseInterceptor OnGetInfoSchemaExported func(ctx sessionctx.Context, is infoschema.InfoSchema) infoschema.InfoSchema }
TestInterceptor is a test interceptor in the ddl
func (*TestInterceptor) OnGetInfoSchema ¶
func (ti *TestInterceptor) OnGetInfoSchema(ctx sessionctx.Context, is infoschema.InfoSchema) infoschema.InfoSchema
OnGetInfoSchema is to run when to call GetInfoSchema