1 Star 0 Fork 7

kyle / gobatch

forked from chararch / gobatch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
listener.go 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
chararch 提交于 2022-03-24 00:21 . format code & add comment
package gobatch
//JobListener job listener
type JobListener interface {
//BeforeJob execute before job start
BeforeJob(execution *JobExecution) BatchError
//AfterJob execute after job end either normally or abnormally
AfterJob(execution *JobExecution) BatchError
}
//StepListener job listener
type StepListener interface {
//BeforeStep execute before step start
BeforeStep(execution *StepExecution) BatchError
//AfterStep execute after step end either normally or abnormally
AfterStep(execution *StepExecution) BatchError
}
//ChunkListener job listener
type ChunkListener interface {
//BeforeChunk execute before start of a chunk in a chunkStep
BeforeChunk(context *ChunkContext) BatchError
//AfterChunk execute after end of a chunk in a chunkStep
AfterChunk(context *ChunkContext) BatchError
//OnError execute when an error occured during a chunk in a chunkStep
OnError(context *ChunkContext, err BatchError)
}
//PartitionListener job listener
type PartitionListener interface {
//BeforePartition execute before enter into Partitioner.Partition() in a partitionStep
BeforePartition(execution *StepExecution) BatchError
//AfterPartition execute after return from Partitioner.Partition() in a partitionStep
AfterPartition(execution *StepExecution, subExecutions []*StepExecution) BatchError
//OnError execute when an error return from Partitioner.Partition() in a partitionStep
OnError(execution *StepExecution, err BatchError)
}
Go
1
https://gitee.com/workface/gobatch.git
git@gitee.com:workface/gobatch.git
workface
gobatch
gobatch
master

搜索帮助