Ai
0 Star 1 Fork 0

shallot/Go开发工具集

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
callback_status.go 522 Bytes
一键复制 编辑 原始数据 按行查看 历史
shallot 提交于 2024-08-22 14:58 +08:00 . 移入autohttp库。
package autohttp
import "context"
// 状态类的回调,需要用户自己实现
type StatusCallbackInterface interface {
// 如果要实现发送前修改Item,则复写此方法
OnTaskBuilding(c context.Context, item *Item)
// 结果判断
OnTaskResultValid(c context.Context, item Item, statusCode int, resultBytes []byte) (err error)
// 更新任务状态
OnTaskStatusUpdate(c context.Context, item Item, errMessage string)
}
// 全局状态类回调方法
var StatusCallback StatusCallbackInterface = nil
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/gxsshallot/gotool.git
git@gitee.com:gxsshallot/gotool.git
gxsshallot
gotool
Go开发工具集
d05a69787598

搜索帮助