羽量级回调任务,直接集成到程序中
Go to file
renzhiyuan 10f971da0a first push 2025-03-25 10:54:43 +08:00
README.md first push 2025-02-20 17:03:01 +08:00
func.go first push 2025-02-20 16:39:27 +08:00
go.mod first push 2025-02-20 17:05:55 +08:00
notify.go first push 2025-03-25 10:54:43 +08:00
notify_test.go first push 2025-02-20 16:39:27 +08:00

README.md

羽量级回调任务,直接集成到程序中

安装

$ go get -u gitea.cdlsxd.cn/self-tools/l_notify

使用

	notify := &l_notify.Notify{
            Request: &l_request.Request{
            Method:  "POST",
            Url:     reqUrl,
            Json:    r.RequestBody,
            Headers: r.header,
            },
            DelayList: []int32{3, 6, 8, 5, 8}, //[30,60,120...]从前往后分别延迟30秒60秒120秒...推送,[60]每隔60秒推送一次
            ResultHandle: func(r l_request.Response, e error) (stop bool) {
            //do something
            return
            },//推送结果处理函数,stop为true时表示停止推送
        }